DDraceNetwork Docs
CJsonWriter Class Referenceabstract

#include <jsonwriter.h>

Inheritance diagram for CJsonWriter:
[legend]

Classes

struct  SState
 

Public Member Functions

 CJsonWriter ()
 
virtual ~CJsonWriter ()=default
 
void BeginObject ()
 
void EndObject ()
 
void BeginArray ()
 
void EndArray ()
 
void WriteAttribute (const char *pName)
 
void WriteStrValue (const char *pValue)
 
void WriteIntValue (int Value)
 
void WriteBoolValue (bool Value)
 
void WriteNullValue ()
 

Protected Member Functions

virtual void WriteInternal (const char *pStr, int Length=-1)=0
 

Private Types

enum  EJsonStateKind { STATE_OBJECT , STATE_ARRAY , STATE_ATTRIBUTE }
 

Private Member Functions

bool CanWriteDatatype ()
 
void WriteInternalEscaped (const char *pStr)
 
void WriteIndent (bool EndElement)
 
void PushState (EJsonStateKind NewState)
 
SStateTopState ()
 
EJsonStateKind PopState ()
 
void CompleteDataType ()
 

Private Attributes

std::stack< SStatem_States
 
int m_Indentation
 

Detailed Description

JSON writer with abstract writing function.

Member Enumeration Documentation

◆ EJsonStateKind

Enumerator
STATE_OBJECT 
STATE_ARRAY 
STATE_ATTRIBUTE 

Constructor & Destructor Documentation

◆ CJsonWriter()

CJsonWriter::CJsonWriter ( )

◆ ~CJsonWriter()

virtual CJsonWriter::~CJsonWriter ( )
virtualdefault

Member Function Documentation

◆ BeginArray()

void CJsonWriter::BeginArray ( )

◆ BeginObject()

void CJsonWriter::BeginObject ( )

◆ CanWriteDatatype()

bool CJsonWriter::CanWriteDatatype ( )
private

◆ CompleteDataType()

void CJsonWriter::CompleteDataType ( )
private

◆ EndArray()

void CJsonWriter::EndArray ( )

◆ EndObject()

void CJsonWriter::EndObject ( )

◆ PopState()

CJsonWriter::EJsonStateKind CJsonWriter::PopState ( )
private

◆ PushState()

void CJsonWriter::PushState ( EJsonStateKind  NewState)
private

◆ TopState()

CJsonWriter::SState * CJsonWriter::TopState ( )
private

◆ WriteAttribute()

void CJsonWriter::WriteAttribute ( const char *  pName)

◆ WriteBoolValue()

void CJsonWriter::WriteBoolValue ( bool  Value)

◆ WriteIndent()

void CJsonWriter::WriteIndent ( bool  EndElement)
private

◆ WriteInternal()

virtual void CJsonWriter::WriteInternal ( const char *  pStr,
int  Length = -1 
)
protectedpure virtual

Implemented in CJsonFileWriter, and CJsonStringWriter.

◆ WriteInternalEscaped()

void CJsonWriter::WriteInternalEscaped ( const char *  pStr)
private

◆ WriteIntValue()

void CJsonWriter::WriteIntValue ( int  Value)

◆ WriteNullValue()

void CJsonWriter::WriteNullValue ( )

◆ WriteStrValue()

void CJsonWriter::WriteStrValue ( const char *  pValue)

Member Data Documentation

◆ m_Indentation

int CJsonWriter::m_Indentation
private

◆ m_States

std::stack<SState> CJsonWriter::m_States
private

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