CoolProp  4.2.5
An open-source fluid property and humid air property database
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rapidjson::PrettyWriter< Stream, Encoding, Allocator > Class Template Reference

Writer with indentation and spacing. More...

#include <prettywriter.h>

Inheritance diagram for rapidjson::PrettyWriter< Stream, Encoding, Allocator >:
rapidjson::Writer< Stream, Encoding, Allocator > rapidjson::Handler

Public Types

typedef Writer< Stream,
Encoding, Allocator
Base
 
typedef Base::Ch Ch
 
- Public Types inherited from rapidjson::Writer< Stream, Encoding, Allocator >
typedef Encoding::Ch Ch
 

Public Member Functions

 PrettyWriter (Stream &stream, Allocator *allocator=0, size_t levelDepth=Base::kDefaultLevelDepth)
 Constructor. More...
 
PrettyWriterSetIndent (Ch indentChar, unsigned indentCharCount)
 Set custom indentation. More...
 
PrettyWriterString (const Ch *str)
 Simpler but slower overload. More...
 
PrettyWriterNull ()
 
PrettyWriterBool (bool b)
 
PrettyWriterInt (int i)
 
PrettyWriterUint (unsigned u)
 
PrettyWriterInt64 (int64_t i64)
 
PrettyWriterUint64 (uint64_t u64)
 
PrettyWriterDouble (double d)
 
PrettyWriterString (const Ch *str, SizeType length, bool copy=false)
 
PrettyWriterStartObject ()
 
PrettyWriterEndObject (SizeType memberCount=0)
 
PrettyWriterStartArray ()
 
PrettyWriterEndArray (SizeType memberCount=0)
 
- Public Member Functions inherited from rapidjson::Writer< Stream, Encoding, Allocator >
 Writer (Stream &stream, Allocator *allocator=0, size_t levelDepth=kDefaultLevelDepth)
 
WriterString (const Ch *str)
 Simpler but slower overload. More...
 
WriterNull ()
 
WriterBool (bool b)
 
WriterInt (int i)
 
WriterUint (unsigned u)
 
WriterInt64 (int64_t i64)
 
WriterUint64 (uint64_t u64)
 
WriterDouble (double d)
 
WriterString (const Ch *str, SizeType length, bool copy=false)
 
WriterStartObject ()
 
WriterEndObject (SizeType memberCount=0)
 
WriterStartArray ()
 
WriterEndArray (SizeType elementCount=0)
 

Protected Member Functions

void PrettyPrefix (Type type)
 
void WriteIndent ()
 
- Protected Member Functions inherited from rapidjson::Writer< Stream, Encoding, Allocator >
void WriteNull ()
 
void WriteBool (bool b)
 
void WriteInt (int i)
 
void WriteUint (unsigned u)
 
void WriteInt64 (int64_t i64)
 
void WriteUint64 (uint64_t u64)
 
void WriteDouble (double d)
 
void WriteString (const Ch *str, SizeType length)
 
void WriteStartObject ()
 
void WriteEndObject ()
 
void WriteStartArray ()
 
void WriteEndArray ()
 
void Prefix (Type type)
 

Protected Attributes

Ch indentChar_
 
unsigned indentCharCount_
 
- Protected Attributes inherited from rapidjson::Writer< Stream, Encoding, Allocator >
Streamstream_
 
internal::Stack< Allocatorlevel_stack_
 

Additional Inherited Members

- Static Protected Attributes inherited from rapidjson::Writer< Stream, Encoding, Allocator >
static const size_t kDefaultLevelDepth = 32
 

Detailed Description

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
class rapidjson::PrettyWriter< Stream, Encoding, Allocator >

Writer with indentation and spacing.

Template Parameters
StreamType of ouptut stream.
EncodingEncoding of both source strings and output.
AllocatorType of allocator for allocating memory of stack.

Definition at line 15 of file prettywriter.h.

Member Typedef Documentation

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
typedef Writer<Stream, Encoding, Allocator> rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Base

Definition at line 17 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
typedef Base::Ch rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Ch

Definition at line 18 of file prettywriter.h.

Constructor & Destructor Documentation

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
rapidjson::PrettyWriter< Stream, Encoding, Allocator >::PrettyWriter ( Stream stream,
Allocator allocator = 0,
size_t  levelDepth = Base::kDefaultLevelDepth 
)
inline

Constructor.

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

Definition at line 25 of file prettywriter.h.

Member Function Documentation

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Bool ( bool  b)
inline

Definition at line 44 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Double ( double  d)
inline

Definition at line 49 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::EndArray ( SizeType  memberCount = 0)
inline

Definition at line 86 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::EndObject ( SizeType  memberCount = 0)
inline

Definition at line 65 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Int ( int  i)
inline

Definition at line 45 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Int64 ( int64_t  i64)
inline

Definition at line 47 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Null ( )
inline

Definition at line 43 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
void rapidjson::PrettyWriter< Stream, Encoding, Allocator >::PrettyPrefix ( Type  type)
inlineprotected

Definition at line 106 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::SetIndent ( Ch  indentChar,
unsigned  indentCharCount 
)
inline

Set custom indentation.

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

Definition at line 33 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::StartArray ( )
inline

Definition at line 79 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::StartObject ( )
inline

Definition at line 58 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::String ( const Ch str,
SizeType  length,
bool  copy = false 
)
inline

Definition at line 51 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::String ( const Ch str)
inline

Simpler but slower overload.

Definition at line 103 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Uint ( unsigned  u)
inline

Definition at line 46 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
PrettyWriter& rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Uint64 ( uint64_t  u64)
inline

Definition at line 48 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
void rapidjson::PrettyWriter< Stream, Encoding, Allocator >::WriteIndent ( )
inlineprotected

Definition at line 145 of file prettywriter.h.

Member Data Documentation

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
Ch rapidjson::PrettyWriter< Stream, Encoding, Allocator >::indentChar_
protected

Definition at line 150 of file prettywriter.h.

template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
unsigned rapidjson::PrettyWriter< Stream, Encoding, Allocator >::indentCharCount_
protected

Definition at line 151 of file prettywriter.h.


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