bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags > Class Template Reference

Writer with indentation and spacing. More...

#include <prettywriter.h>

Inheritance diagram for PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >:
Inheritance graph
Collaboration diagram for PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >:
Collaboration graph

Public Types

typedef Writer< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags > Base
 
typedef Base::Ch Ch
 

Public Member Functions

int GetMaxDecimalPlaces () const
 
bool IsComplete () const
 Checks whether the output is a complete JSON.
 
 PrettyWriter (OutputStream &os, StackAllocator *allocator=0, size_t levelDepth=Base::kDefaultLevelDepth)
 Constructor.
 
 PrettyWriter (StackAllocator *allocator=0, size_t levelDepth=Base::kDefaultLevelDepth)
 
void Reset (OutputStream &os)
 Reset the writer with a new stream.
 
PrettyWriterSetFormatOptions (PrettyFormatOptions options)
 Set pretty writer formatting options.
 
PrettyWriterSetIndent (Ch indentChar, unsigned indentCharCount)
 Set custom indentation.
 
void SetMaxDecimalPlaces (int maxDecimalPlaces)
 Sets the maximum number of decimal places for double output.
 
Implementation of Handler
See also
Handler
bool Null ()
 
bool Bool (bool b)
 
bool Int (int i)
 
bool Uint (unsigned u)
 
bool Int64 (int64_t i64)
 
bool Uint64 (uint64_t u64)
 
bool Double (double d)
 
bool RawNumber (const Ch *str, SizeType length, bool copy=false)
 
bool String (const Ch *str, SizeType length, bool copy=false)
 
bool StartObject ()
 
bool Key (const Ch *str, SizeType length, bool copy=false)
 
bool EndObject (SizeType memberCount=0)
 
bool StartArray ()
 
bool EndArray (SizeType memberCount=0)
 
Implementation of Handler
See also
Handler
bool RawNumber (const Ch *str, SizeType length, bool copy=false)
 
bool String (const Ch *str, SizeType length, bool copy=false)
 
bool Key (const Ch *str, SizeType length, bool copy=false)
 

Static Public Attributes

static const int kDefaultMaxDecimalPlaces
 

Protected Member Functions

bool WriteDouble (double d)
 
bool WriteDouble (double d)
 
bool WriteInt (int i)
 
bool WriteInt (int i)
 
bool WriteInt64 (int64_t i64)
 
bool WriteInt64 (int64_t i64)
 
bool WriteUint (unsigned u)
 
bool WriteUint (unsigned u)
 
bool WriteUint64 (uint64_t u)
 
bool WriteUint64 (uint64_t u)
 

Convenience extensions

Ch indentChar_
 
unsigned indentCharCount_
 
PrettyFormatOptions formatOptions_
 
bool String (const Ch *str)
 Simpler but slower overload.
 
bool Key (const Ch *str)
 
bool RawValue (const Ch *json, size_t length, Type type)
 Write a raw JSON value.
 
void PrettyPrefix (Type type)
 
void WriteIndent ()
 

Convenience extensions

OutputStream * os_
 
internal::Stack< CrtAllocatorlevel_stack_
 
int maxDecimalPlaces_
 
bool hasRoot_
 
bool String (const Ch *const &str)
 Simpler but slower overload.
 
bool Key (const Ch *const &str)
 
bool RawValue (const Ch *json, size_t length, Type type)
 Write a raw JSON value.
 
void Flush ()
 Flush the output stream.
 
bool WriteInt (int i)
 
bool WriteUint (unsigned u)
 
bool WriteInt64 (int64_t i64)
 
bool WriteUint64 (uint64_t u64)
 
bool WriteDouble (double d)
 
bool WriteNull ()
 
bool WriteBool (bool b)
 
bool WriteString (const Ch *str, SizeType length)
 
bool ScanWriteUnescapedString (GenericStringStream< UTF8<> > &is, size_t length)
 
bool WriteStartObject ()
 
bool WriteEndObject ()
 
bool WriteStartArray ()
 
bool WriteEndArray ()
 
bool WriteRawValue (const Ch *json, size_t length)
 
void Prefix (Type type)
 
bool EndValue (bool ret)
 
static const size_t kDefaultLevelDepth
 

Detailed Description

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
class PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >

Writer with indentation and spacing.

Template Parameters
OutputStreamType of output os.
SourceEncodingEncoding of source string.
TargetEncodingEncoding of output stream.
StackAllocatorType of allocator for allocating memory of stack.

Definition at line 48 of file prettywriter.h.

Member Typedef Documentation

◆ Base

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Base

Definition at line 50 of file prettywriter.h.

◆ Ch

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
typedef Base::Ch PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Ch

Definition at line 51 of file prettywriter.h.

Constructor & Destructor Documentation

◆ PrettyWriter() [1/2]

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::PrettyWriter ( OutputStream & os,
StackAllocator * allocator = 0,
size_t levelDepth = Base::kDefaultLevelDepth )
inlineexplicit

Constructor.

Parameters
osOutput stream.
allocatorUser supplied allocator. If it is null, it will create a private one.
levelDepthInitial capacity of stack.

Definition at line 58 of file prettywriter.h.

◆ PrettyWriter() [2/2]

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::PrettyWriter ( StackAllocator * allocator = 0,
size_t levelDepth = Base::kDefaultLevelDepth )
inlineexplicit

Definition at line 62 of file prettywriter.h.

Member Function Documentation

◆ Bool()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Bool ( bool b)
inline

Definition at line 96 of file prettywriter.h.

◆ Double()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Double ( double d)
inline

Definition at line 101 of file prettywriter.h.

◆ EndArray()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::EndArray ( SizeType memberCount = 0)
inline

Definition at line 163 of file prettywriter.h.

◆ EndObject()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::EndObject ( SizeType memberCount = 0)
inline

Definition at line 137 of file prettywriter.h.

◆ EndValue()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::EndValue ( bool ret)
inlineprotectedinherited

Definition at line 494 of file writer.h.

◆ Flush()

void Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::Flush ( )
inlineinherited

Flush the output stream.

Allows the user to flush the output stream immediately.

Definition at line 282 of file writer.h.

◆ GetMaxDecimalPlaces()

int Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::GetMaxDecimalPlaces ( ) const
inlineinherited

Definition at line 148 of file writer.h.

◆ Int()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Int ( int i)
inline

Definition at line 97 of file prettywriter.h.

◆ Int64()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Int64 ( int64_t i64)
inline

Definition at line 99 of file prettywriter.h.

◆ IsComplete()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::IsComplete ( ) const
inlineinherited

Checks whether the output is a complete JSON.

A complete JSON has a complete root object or array.

Definition at line 144 of file writer.h.

◆ Key() [1/4]

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Key ( const Ch * str)
inline

Definition at line 188 of file prettywriter.h.

◆ Key() [2/4]

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Key ( const Ch * str,
SizeType length,
bool copy = false )
inline

Definition at line 129 of file prettywriter.h.

◆ Key() [3/4]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::Key ( const Ch *const & str)
inlineinherited

Definition at line 260 of file writer.h.

◆ Key() [4/4]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::Key ( const Ch * str,
SizeType length,
bool copy = false )
inlineinherited

Definition at line 222 of file writer.h.

◆ Null()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Null ( )
inline

Definition at line 95 of file prettywriter.h.

◆ Prefix()

void Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::Prefix ( Type type)
inlineprotectedinherited

Definition at line 473 of file writer.h.

◆ PrettyPrefix()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
void PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::PrettyPrefix ( Type type)
inlineprotected

Definition at line 208 of file prettywriter.h.

◆ RawNumber() [1/2]

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::RawNumber ( const Ch * str,
SizeType length,
bool copy = false )
inline

Definition at line 103 of file prettywriter.h.

◆ RawNumber() [2/2]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::RawNumber ( const Ch * str,
SizeType length,
bool copy = false )
inlineinherited

Definition at line 196 of file writer.h.

◆ RawValue() [1/2]

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::RawValue ( const Ch * json,
size_t length,
Type type )
inline

Write a raw JSON value.

For user to write a stringified JSON as a value.

Parameters
jsonA well-formed JSON value. It should not contain null character within [0, length - 1] range.
lengthLength of the json.
typeType of the root of json.
Note
When using PrettyWriter::RawValue(), the result json may not be indented correctly.

Definition at line 201 of file prettywriter.h.

◆ RawValue() [2/2]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::RawValue ( const Ch * json,
size_t length,
Type type )
inlineinherited

Write a raw JSON value.

For user to write a stringified JSON as a value.

Parameters
jsonA well-formed JSON value. It should not contain null character within [0, length - 1] range.
lengthLength of the json.
typeType of the root of json.

Definition at line 272 of file writer.h.

◆ Reset()

void Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::Reset ( OutputStream & os)
inlineinherited

Reset the writer with a new stream.

This function reset the writer with a new stream and default settings, in order to make a Writer object reusable for output multiple JSONs.

Parameters
osNew output stream.
writer.StartObject();
// ...
writer.EndObject();
writer.Reset(os2);
writer.StartObject();
// ...
writer.EndObject();
Writer(OutputStream &os, CrtAllocator *stackAllocator=0, size_t levelDepth=kDefaultLevelDepth)
Definition writer.h:102

Definition at line 134 of file writer.h.

◆ ScanWriteUnescapedString()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::ScanWriteUnescapedString ( GenericStringStream< UTF8<> > & is,
size_t length )
inlineprotectedinherited

Definition at line 451 of file writer.h.

◆ SetFormatOptions()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
PrettyWriter & PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::SetFormatOptions ( PrettyFormatOptions options)
inline

Set pretty writer formatting options.

Parameters
optionsFormatting options.

Definition at line 85 of file prettywriter.h.

◆ SetIndent()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
PrettyWriter & PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::SetIndent ( Ch indentChar,
unsigned indentCharCount )
inline

Set custom indentation.

Parameters
indentCharCharacter for indentation. Must be whitespace character (' ', '\t', '\n', '\r').
indentCharCountNumber of indent characters for each indentation level.
Note
The default indentation is 4 spaces.

Definition at line 75 of file prettywriter.h.

◆ SetMaxDecimalPlaces()

void Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::SetMaxDecimalPlaces ( int maxDecimalPlaces)
inlineinherited

Sets the maximum number of decimal places for double output.

This setting truncates the output with specified number of decimal places.

For example,

writer.SetMaxDecimalPlaces(3);
writer.StartArray();
writer.Double(0.12345); // "0.123"
writer.Double(0.0001); // "0.0"
writer.Double(1.234567890123456e30); // "1.234567890123456e30" (do not truncate significand for positive exponent)
writer.Double(1.23e-4); // "0.0" (do truncate significand for negative exponent)
writer.EndArray();

The default setting does not truncate any decimal places. You can restore to this setting by calling

writer.SetMaxDecimalPlaces(Writer::kDefaultMaxDecimalPlaces);

Definition at line 173 of file writer.h.

◆ StartArray()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::StartArray ( )
inline

Definition at line 157 of file prettywriter.h.

◆ StartObject()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::StartObject ( )
inline

Definition at line 123 of file prettywriter.h.

◆ String() [1/4]

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::String ( const Ch * str)
inline

Simpler but slower overload.

Definition at line 187 of file prettywriter.h.

◆ String() [2/4]

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::String ( const Ch * str,
SizeType length,
bool copy = false )
inline

Definition at line 110 of file prettywriter.h.

◆ String() [3/4]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::String ( const Ch *const & str)
inlineinherited

Simpler but slower overload.

Definition at line 259 of file writer.h.

◆ String() [4/4]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::String ( const Ch * str,
SizeType length,
bool copy = false )
inlineinherited

Definition at line 203 of file writer.h.

◆ Uint()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Uint ( unsigned u)
inline

Definition at line 98 of file prettywriter.h.

◆ Uint64()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
bool PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::Uint64 ( uint64_t u64)
inline

Definition at line 100 of file prettywriter.h.

◆ WriteBool()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteBool ( bool b)
inlineprotectedinherited

Definition at line 301 of file writer.h.

◆ WriteDouble() [1/3]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteDouble ( double d)
inlineprotectedinherited

Definition at line 349 of file writer.h.

◆ WriteDouble() [2/3]

bool Writer< StringBuffer >::WriteDouble ( double d)
inlineprotectedinherited

Definition at line 546 of file writer.h.

◆ WriteDouble() [3/3]

bool Writer< StringBuffer >::WriteDouble ( double d)
inlineprotectedinherited

Definition at line 546 of file writer.h.

◆ WriteEndArray()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteEndArray ( )
inlineprotectedinherited

Definition at line 458 of file writer.h.

◆ WriteEndObject()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteEndObject ( )
inlineprotectedinherited

Definition at line 456 of file writer.h.

◆ WriteIndent()

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
void PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::WriteIndent ( )
inlineprotected

Definition at line 252 of file prettywriter.h.

◆ WriteInt() [1/3]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteInt ( int i)
inlineprotectedinherited

Definition at line 313 of file writer.h.

◆ WriteInt() [2/3]

bool Writer< StringBuffer >::WriteInt ( int i)
inlineprotectedinherited

Definition at line 514 of file writer.h.

◆ WriteInt() [3/3]

bool Writer< StringBuffer >::WriteInt ( int i)
inlineprotectedinherited

Definition at line 514 of file writer.h.

◆ WriteInt64() [1/3]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteInt64 ( int64_t i64)
inlineprotectedinherited

Definition at line 331 of file writer.h.

◆ WriteInt64() [2/3]

bool Writer< StringBuffer >::WriteInt64 ( int64_t i64)
inlineprotectedinherited

Definition at line 530 of file writer.h.

◆ WriteInt64() [3/3]

bool Writer< StringBuffer >::WriteInt64 ( int64_t i64)
inlineprotectedinherited

Definition at line 530 of file writer.h.

◆ WriteNull()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteNull ( )
inlineprotectedinherited

Definition at line 296 of file writer.h.

◆ WriteRawValue()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteRawValue ( const Ch * json,
size_t length )
inlineprotectedinherited

Definition at line 460 of file writer.h.

◆ WriteStartArray()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteStartArray ( )
inlineprotectedinherited

Definition at line 457 of file writer.h.

◆ WriteStartObject()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteStartObject ( )
inlineprotectedinherited

Definition at line 455 of file writer.h.

◆ WriteString()

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteString ( const Ch * str,
SizeType length )
inlineprotectedinherited

Definition at line 377 of file writer.h.

◆ WriteUint() [1/3]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteUint ( unsigned u)
inlineprotectedinherited

Definition at line 322 of file writer.h.

◆ WriteUint() [2/3]

bool Writer< StringBuffer >::WriteUint ( unsigned u)
inlineprotectedinherited

Definition at line 522 of file writer.h.

◆ WriteUint() [3/3]

bool Writer< StringBuffer >::WriteUint ( unsigned u)
inlineprotectedinherited

Definition at line 522 of file writer.h.

◆ WriteUint64() [1/3]

bool Writer< StringBuffer >::WriteUint64 ( uint64_t u)
inlineprotectedinherited

Definition at line 538 of file writer.h.

◆ WriteUint64() [2/3]

bool Writer< StringBuffer >::WriteUint64 ( uint64_t u)
inlineprotectedinherited

Definition at line 538 of file writer.h.

◆ WriteUint64() [3/3]

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::WriteUint64 ( uint64_t u64)
inlineprotectedinherited

Definition at line 340 of file writer.h.

Member Data Documentation

◆ formatOptions_

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
PrettyFormatOptions PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::formatOptions_
protected

Definition at line 259 of file prettywriter.h.

◆ hasRoot_

bool Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::hasRoot_
protectedinherited

Definition at line 503 of file writer.h.

◆ indentChar_

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
Ch PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::indentChar_
protected

Definition at line 257 of file prettywriter.h.

◆ indentCharCount_

template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags>
unsigned PrettyWriter< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags >::indentCharCount_
protected

Definition at line 258 of file prettywriter.h.

◆ kDefaultLevelDepth

const size_t Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::kDefaultLevelDepth
staticinherited

Definition at line 286 of file writer.h.

◆ kDefaultMaxDecimalPlaces

const int Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::kDefaultMaxDecimalPlaces
staticinherited

Definition at line 94 of file writer.h.

◆ level_stack_

internal::Stack<CrtAllocator> Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::level_stack_
protectedinherited

Definition at line 501 of file writer.h.

◆ maxDecimalPlaces_

int Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::maxDecimalPlaces_
protectedinherited

Definition at line 502 of file writer.h.

◆ os_

OutputStream* Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, writeFlags >::os_
protectedinherited

Definition at line 500 of file writer.h.


The documentation for this class was generated from the following files: