XII Release 0.1.0
Loading...
Searching...
No Matches
xiiJSONWriter Class Referenceabstract

The base class for JSON writers. More...

#include <JSONWriter.h>

Inheritance diagram for xiiJSONWriter:
[legend]

Public Types

enum class  WhitespaceMode {
  All , LessIndentation , NoIndentation , NewlinesOnly ,
  None
}
 Modes to configure how much whitespace the JSON writer will output. More...
 
enum class  ArrayMode { InOneLine , OneLinePerItem }
 Modes to configure how arrays are written. More...
 

Public Member Functions

 xiiJSONWriter ()
 Constructor.
 
virtual ~xiiJSONWriter ()
 Destructor.
 
void SetWhitespaceMode (WhitespaceMode whitespaceMode)
 Configures how much whitespace is output.
 
void SetArrayMode (ArrayMode arrayMode)
 Configures how arrays are written.
 
void AddVariableBool (xiiStringView sName, bool value)
 Shorthand for "BeginVariable(szName); WriteBool(value); EndVariable(); ".
 
void AddVariableInt32 (xiiStringView sName, xiiInt32 value)
 Shorthand for "BeginVariable(szName); WriteInt32(value); EndVariable(); ".
 
void AddVariableUInt32 (xiiStringView sName, xiiUInt32 value)
 Shorthand for "BeginVariable(szName); WriteUInt32(value); EndVariable(); ".
 
void AddVariableInt64 (xiiStringView sName, xiiInt64 value)
 Shorthand for "BeginVariable(szName); WriteInt64(value); EndVariable(); ".
 
void AddVariableUInt64 (xiiStringView sName, xiiUInt64 value)
 Shorthand for "BeginVariable(szName); WriteUInt64(value); EndVariable(); ".
 
void AddVariableFloat (xiiStringView sName, float value)
 Shorthand for "BeginVariable(szName); WriteFloat(value); EndVariable(); ".
 
void AddVariableDouble (xiiStringView sName, double value)
 Shorthand for "BeginVariable(szName); WriteDouble(value); EndVariable(); ".
 
void AddVariableString (xiiStringView sName, xiiStringView value)
 Shorthand for "BeginVariable(szName); WriteString(value); EndVariable(); ".
 
void AddVariableNULL (xiiStringView sName)
 Shorthand for "BeginVariable(szName); WriteNULL(value); EndVariable(); ".
 
void AddVariableTime (xiiStringView sName, xiiTime value)
 Shorthand for "BeginVariable(szName); WriteTime(value); EndVariable(); ".
 
void AddVariableUuid (xiiStringView sName, xiiUuid value)
 Shorthand for "BeginVariable(szName); WriteUuid(value); EndVariable(); ".
 
void AddVariableAngle (xiiStringView sName, xiiAngle value)
 Shorthand for "BeginVariable(szName); WriteAngle(value); EndVariable(); ".
 
void AddVariableAngle (xiiStringView sName, xiiAngled value)
 Shorthand for "BeginVariable(szName); WriteAngle(value); EndVariable(); ".
 
void AddVariableColor (xiiStringView sName, const xiiColor &value)
 Shorthand for "BeginVariable(szName); WriteColor(value); EndVariable(); ".
 
void AddVariableColorGamma (xiiStringView sName, const xiiColorGammaUB &value)
 Shorthand for "BeginVariable(szName); WriteColorGamma(value); EndVariable(); ".
 
void AddVariableVec2 (xiiStringView sName, const xiiVec2 &value)
 Shorthand for "BeginVariable(szName); WriteVec2(value); EndVariable(); ".
 
void AddVariableVec2d (xiiStringView sName, const xiiVec2d &value)
 Shorthand for "BeginVariable(szName); WriteVec2d(value); EndVariable(); ".
 
void AddVariableVec3 (xiiStringView sName, const xiiVec3 &value)
 Shorthand for "BeginVariable(szName); WriteVec3(value); EndVariable(); ".
 
void AddVariableVec3d (xiiStringView sName, const xiiVec3d &value)
 Shorthand for "BeginVariable(szName); WriteVec3d(value); EndVariable(); ".
 
void AddVariableVec4 (xiiStringView sName, const xiiVec4 &value)
 Shorthand for "BeginVariable(szName); WriteVec4(value); EndVariable(); ".
 
void AddVariableVec4d (xiiStringView sName, const xiiVec4d &value)
 Shorthand for "BeginVariable(szName); WriteVec4d(value); EndVariable(); ".
 
void AddVariableVec2I32 (xiiStringView sName, const xiiVec2I32 &value)
 Shorthand for "BeginVariable(szName); WriteVec2I32(value); EndVariable(); ".
 
void AddVariableVec2I64 (xiiStringView sName, const xiiVec2I64 &value)
 Shorthand for "BeginVariable(szName); WriteVec2I64(value); EndVariable(); ".
 
void AddVariableVec3I32 (xiiStringView sName, const xiiVec3I32 &value)
 Shorthand for "BeginVariable(szName); WriteVec3I32(value); EndVariable(); ".
 
void AddVariableVec3I64 (xiiStringView sName, const xiiVec3I64 &value)
 Shorthand for "BeginVariable(szName); WriteVec3I64(value); EndVariable(); ".
 
void AddVariableVec4I32 (xiiStringView sName, const xiiVec4I32 &value)
 Shorthand for "BeginVariable(szName); WriteVec4I32(value); EndVariable(); ".
 
void AddVariableVec4I64 (xiiStringView sName, const xiiVec4I64 &value)
 Shorthand for "BeginVariable(szName); WriteVec4I64(value); EndVariable(); ".
 
void AddVariableVec2U32 (xiiStringView sName, const xiiVec2U32 &value)
 Shorthand for "BeginVariable(szName); WriteVec2U32(value); EndVariable(); ".
 
void AddVariableVec2U64 (xiiStringView sName, const xiiVec2U64 &value)
 Shorthand for "BeginVariable(szName); WriteVec2U64(value); EndVariable(); ".
 
void AddVariableVec3U32 (xiiStringView sName, const xiiVec3U32 &value)
 Shorthand for "BeginVariable(szName); WriteVec3U32(value); EndVariable(); ".
 
void AddVariableVec3U64 (xiiStringView sName, const xiiVec3U64 &value)
 Shorthand for "BeginVariable(szName); WriteVec3U64(value); EndVariable(); ".
 
void AddVariableVec4U32 (xiiStringView sName, const xiiVec4U32 &value)
 Shorthand for "BeginVariable(szName); WriteVec4U32(value); EndVariable(); ".
 
void AddVariableVec4U64 (xiiStringView sName, const xiiVec4U64 &value)
 Shorthand for "BeginVariable(szName); WriteVec4U64(value); EndVariable(); ".
 
void AddVariableQuat (xiiStringView sName, const xiiQuat &value)
 Shorthand for "BeginVariable(szName); WriteQuat(value); EndVariable(); ".
 
void AddVariableQuatd (xiiStringView sName, const xiiQuatd &value)
 Shorthand for "BeginVariable(szName); WriteQuatd(value); EndVariable(); ".
 
void AddVariableMat3 (xiiStringView sName, const xiiMat3 &value)
 Shorthand for "BeginVariable(szName); WriteMat3(value); EndVariable(); ".
 
void AddVariableMat3d (xiiStringView sName, const xiiMat3d &value)
 Shorthand for "BeginVariable(szName); WriteMat3d(value); EndVariable(); ".
 
void AddVariableMat4 (xiiStringView sName, const xiiMat4 &value)
 Shorthand for "BeginVariable(szName); WriteMat4(value); EndVariable(); ".
 
void AddVariableMat4d (xiiStringView sName, const xiiMat4d &value)
 Shorthand for "BeginVariable(szName); WriteMat4d(value); EndVariable(); ".
 
void AddVariableTransform (xiiStringView sName, const xiiTransform &value)
 Shorthand for "BeginVariable(szName); WriteTransform(value); EndVariable(); ".
 
void AddVariableTransformd (xiiStringView sName, const xiiTransformd &value)
 Shorthand for "BeginVariable(szName); WriteTransformd(value); EndVariable(); ".
 
void AddVariableDataBuffer (xiiStringView sName, const xiiDataBuffer &value)
 Shorthand for "BeginVariable(szName); WriteDataBuffer(value); EndVariable(); ".
 
void AddVariableVariant (xiiStringView sName, const xiiVariant &value)
 Shorthand for "BeginVariable(szName); WriteVariant(value); EndVariable(); ".
 
virtual void WriteBool (bool value)=0
 Writes a bool to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteInt32 (xiiInt32 value)=0
 Writes an int32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteUInt32 (xiiUInt32 value)=0
 Writes a uint32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteInt64 (xiiInt64 value)=0
 Writes an int64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteUInt64 (xiiUInt64 value)=0
 Writes a uint64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteFloat (float value)=0
 Writes a float to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteDouble (double value)=0
 Writes a double to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteString (xiiStringView value)=0
 Writes a string to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteNULL ()=0
 Writes the value 'null' to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteTime (xiiTime value)=0
 Writes a time value to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteColor (const xiiColor &value)=0
 Writes a xiiColor to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteColorGamma (const xiiColorGammaUB &value)=0
 Writes a xiiColorGammaUB to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec2 (const xiiVec2 &value)=0
 Writes a xiiVec2 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec2d (const xiiVec2d &value)=0
 Writes a xiiVec2d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec3 (const xiiVec3 &value)=0
 Writes a xiiVec3 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec3d (const xiiVec3d &value)=0
 Writes a xiiVec3d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec4 (const xiiVec4 &value)=0
 Writes a xiiVec4 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec4d (const xiiVec4d &value)=0
 Writes a xiiVec4d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec2I32 (const xiiVec2I32 &value)=0
 Writes a xiiVec2I32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec2I64 (const xiiVec2I64 &value)=0
 Writes a xiiVec2I64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec3I32 (const xiiVec3I32 &value)=0
 Writes a xiiVec3I32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec3I64 (const xiiVec3I64 &value)=0
 Writes a xiiVec3I64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec4I32 (const xiiVec4I32 &value)=0
 Writes a xiiVec4I32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec4I64 (const xiiVec4I64 &value)=0
 Writes a xiiVec4I64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec2U32 (const xiiVec2U32 &value)=0
 Writes a xiiVec2U32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec2U64 (const xiiVec2U64 &value)=0
 Writes a xiiVec2U64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec3U32 (const xiiVec3U32 &value)=0
 Writes a xiiVec3U32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec3U64 (const xiiVec3U64 &value)=0
 Writes a xiiVec3U64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec4U32 (const xiiVec4U32 &value)=0
 Writes a xiiVec4U32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVec4U64 (const xiiVec4U64 &value)=0
 Writes a xiiVec4U64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteQuat (const xiiQuat &value)=0
 Writes a xiiQuat to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteQuatd (const xiiQuatd &value)=0
 Writes a xiiQuatd to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteMat3 (const xiiMat3 &value)=0
 Writes a xiiMat3 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteMat3d (const xiiMat3d &value)=0
 Writes a xiiMat3d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteMat4 (const xiiMat4 &value)=0
 Writes a xiiMat4 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteMat4d (const xiiMat4d &value)=0
 Writes a xiiMat4d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteTransform (const xiiTransform &value)=0
 Writes a xiiTransform to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteTransformd (const xiiTransformd &value)=0
 Writes a xiiTransformd to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteUuid (const xiiUuid &value)=0
 Writes a xiiUuid to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteAngle (xiiAngle value)=0
 Writes a xiiAngle to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteAngle (xiiAngled value)=0
 Writes a xiiAngled to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteDataBuffer (const xiiDataBuffer &value)=0
 Writes a xiiDataBuffer to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().
 
virtual void WriteVariant (const xiiVariant &value)
 The default implementation dispatches all supported types to WriteBool, WriteInt32, etc. and asserts on the more complex types.
 
virtual void WriteBinaryData (xiiStringView sDataType, const void *pData, xiiUInt32 uiBytes, xiiStringView sValueString={})=0
 Outputs a chunk of memory in some JSON form that can be interpreted as binary data when reading it again.
 
virtual void BeginVariable (xiiStringView sName)=0
 Begins outputting a variable. szName is the variable name.
 
virtual void EndVariable ()=0
 Ends outputting a variable.
 
virtual void BeginArray (xiiStringView sName={})=0
 Begins outputting an array variable.
 
virtual void EndArray ()=0
 Ends outputting an array variable.
 
virtual void BeginObject (xiiStringView sName={})=0
 Begins outputting an object variable.
 
virtual void EndObject ()=0
 Ends outputting an object variable.
 
bool HadWriteError () const
 Indicates if an error was encountered while writing.
 

Protected Member Functions

void SetWriteErrorState ()
 called internally when there was an error during writing
 

Protected Attributes

WhitespaceMode m_WhitespaceMode = WhitespaceMode::All
 
ArrayMode m_ArrayMode = ArrayMode::InOneLine
 

Detailed Description

The base class for JSON writers.

Declares a common interface for writing JSON files. Also implements some utility functions built on top of the interface (AddVariable()).

Member Enumeration Documentation

◆ ArrayMode

enum class xiiJSONWriter::ArrayMode
strong

Modes to configure how arrays are written.

Enumerator
InOneLine 

All array items are written in a single line in the file.

OneLinePerItem 

Each array item is put on a separate line.

◆ WhitespaceMode

enum class xiiJSONWriter::WhitespaceMode
strong

Modes to configure how much whitespace the JSON writer will output.

Enumerator
All 

All whitespace is output. This is the default, it should be used for files that are read by humans.

LessIndentation 

Saves some space by using less space for indentation.

NoIndentation 

Saves even more space by dropping all indentation from the output. The result will be noticeably less readable.

NewlinesOnly 

All unnecessary whitespace, except for newlines, is not output.

None 

No whitespace, not even newlines, is output. This should be used when JSON is used for data exchange, but probably not read by humans.

Member Function Documentation

◆ BeginArray()

virtual void xiiJSONWriter::BeginArray ( xiiStringView sName = {})
pure virtual

Begins outputting an array variable.

If szName is nullptr this will create an anonymous array, which is necessary when you want to put an array as a value into another array. BeginArray() with a non-nullptr value for szName is identical to calling BeginVariable() first. In this case EndArray() will also end the variable definition, so no additional call to EndVariable() is required.

Implemented in xiiStandardJSONWriter.

◆ BeginObject()

virtual void xiiJSONWriter::BeginObject ( xiiStringView sName = {})
pure virtual

Begins outputting an object variable.

If szName is nullptr this will create an anonymous object, which is necessary when you want to put an object as a value into an array. BeginObject() with a non-nullptr value for szName is identical to calling BeginVariable() first. In this case EndObject() will also end the variable definition, so no additional call to EndVariable() is required.

Implemented in xiiStandardJSONWriter.

◆ BeginVariable()

virtual void xiiJSONWriter::BeginVariable ( xiiStringView sName)
pure virtual

Begins outputting a variable. szName is the variable name.

Between BeginVariable() and EndVariable() you can call the WriteXYZ functions once to write out the variable's data. You can also call BeginArray() and BeginObject() without a variable name to output an array or object variable.

Implemented in xiiStandardJSONWriter.

◆ EndArray()

virtual void xiiJSONWriter::EndArray ( )
pure virtual

Ends outputting an array variable.

Implemented in xiiStandardJSONWriter.

◆ EndObject()

virtual void xiiJSONWriter::EndObject ( )
pure virtual

Ends outputting an object variable.

Implemented in xiiStandardJSONWriter.

◆ EndVariable()

virtual void xiiJSONWriter::EndVariable ( )
pure virtual

Ends outputting a variable.

Implemented in xiiStandardJSONWriter.

◆ HadWriteError()

bool xiiJSONWriter::HadWriteError ( ) const

Indicates if an error was encountered while writing.

If any error was encountered at any time during writing, this will return true

◆ WriteAngle() [1/2]

virtual void xiiJSONWriter::WriteAngle ( xiiAngle value)
pure virtual

Writes a xiiAngle to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteAngle() [2/2]

virtual void xiiJSONWriter::WriteAngle ( xiiAngled value)
pure virtual

Writes a xiiAngled to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteBinaryData()

virtual void xiiJSONWriter::WriteBinaryData ( xiiStringView sDataType,
const void * pData,
xiiUInt32 uiBytes,
xiiStringView sValueString = {} )
pure virtual

Outputs a chunk of memory in some JSON form that can be interpreted as binary data when reading it again.

How exactly the raw data is represented in JSON is up to the derived class. szDataType allows to additionally output a string that identifies the type of data.

Implemented in xiiStandardJSONWriter.

◆ WriteBool()

virtual void xiiJSONWriter::WriteBool ( bool value)
pure virtual

Writes a bool to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteColor()

void xiiJSONWriter::WriteColor ( const xiiColor & value)
pure virtual

Writes a xiiColor to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteColorGamma()

void xiiJSONWriter::WriteColorGamma ( const xiiColorGammaUB & value)
pure virtual

Writes a xiiColorGammaUB to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteDataBuffer()

void xiiJSONWriter::WriteDataBuffer ( const xiiDataBuffer & value)
pure virtual

Writes a xiiDataBuffer to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteDouble()

virtual void xiiJSONWriter::WriteDouble ( double value)
pure virtual

Writes a double to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteFloat()

virtual void xiiJSONWriter::WriteFloat ( float value)
pure virtual

Writes a float to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteInt32()

virtual void xiiJSONWriter::WriteInt32 ( xiiInt32 value)
pure virtual

Writes an int32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteInt64()

virtual void xiiJSONWriter::WriteInt64 ( xiiInt64 value)
pure virtual

Writes an int64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteMat3()

void xiiJSONWriter::WriteMat3 ( const xiiMat3 & value)
pure virtual

Writes a xiiMat3 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteMat3d()

void xiiJSONWriter::WriteMat3d ( const xiiMat3d & value)
pure virtual

Writes a xiiMat3d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteMat4()

void xiiJSONWriter::WriteMat4 ( const xiiMat4 & value)
pure virtual

Writes a xiiMat4 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteMat4d()

void xiiJSONWriter::WriteMat4d ( const xiiMat4d & value)
pure virtual

Writes a xiiMat4d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteNULL()

virtual void xiiJSONWriter::WriteNULL ( )
pure virtual

Writes the value 'null' to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteQuat()

void xiiJSONWriter::WriteQuat ( const xiiQuat & value)
pure virtual

Writes a xiiQuat to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteQuatd()

void xiiJSONWriter::WriteQuatd ( const xiiQuatd & value)
pure virtual

Writes a xiiQuatd to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteString()

virtual void xiiJSONWriter::WriteString ( xiiStringView value)
pure virtual

Writes a string to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteTime()

virtual void xiiJSONWriter::WriteTime ( xiiTime value)
pure virtual

Writes a time value to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteTransform()

void xiiJSONWriter::WriteTransform ( const xiiTransform & value)
pure virtual

Writes a xiiTransform to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteTransformd()

void xiiJSONWriter::WriteTransformd ( const xiiTransformd & value)
pure virtual

Writes a xiiTransformd to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteUInt32()

virtual void xiiJSONWriter::WriteUInt32 ( xiiUInt32 value)
pure virtual

Writes a uint32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteUInt64()

virtual void xiiJSONWriter::WriteUInt64 ( xiiUInt64 value)
pure virtual

Writes a uint64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Implemented in xiiStandardJSONWriter.

◆ WriteUuid()

virtual void xiiJSONWriter::WriteUuid ( const xiiUuid & value)
pure virtual

Writes a xiiUuid to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVariant()

void xiiJSONWriter::WriteVariant ( const xiiVariant & value)
virtual

The default implementation dispatches all supported types to WriteBool, WriteInt32, etc. and asserts on the more complex types.

A derived class may override this function to implement support for the remaining variant types, if required.

◆ WriteVec2()

void xiiJSONWriter::WriteVec2 ( const xiiVec2 & value)
pure virtual

Writes a xiiVec2 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec2d()

void xiiJSONWriter::WriteVec2d ( const xiiVec2d & value)
pure virtual

Writes a xiiVec2d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec2I32()

void xiiJSONWriter::WriteVec2I32 ( const xiiVec2I32 & value)
pure virtual

Writes a xiiVec2I32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec2I64()

void xiiJSONWriter::WriteVec2I64 ( const xiiVec2I64 & value)
pure virtual

Writes a xiiVec2I64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec2U32()

void xiiJSONWriter::WriteVec2U32 ( const xiiVec2U32 & value)
pure virtual

Writes a xiiVec2U32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec2U64()

void xiiJSONWriter::WriteVec2U64 ( const xiiVec2U64 & value)
pure virtual

Writes a xiiVec2U64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec3()

void xiiJSONWriter::WriteVec3 ( const xiiVec3 & value)
pure virtual

Writes a xiiVec3 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec3d()

void xiiJSONWriter::WriteVec3d ( const xiiVec3d & value)
pure virtual

Writes a xiiVec3d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec3I32()

void xiiJSONWriter::WriteVec3I32 ( const xiiVec3I32 & value)
pure virtual

Writes a xiiVec3I32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec3I64()

void xiiJSONWriter::WriteVec3I64 ( const xiiVec3I64 & value)
pure virtual

Writes a xiiVec3I64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec3U32()

void xiiJSONWriter::WriteVec3U32 ( const xiiVec3U32 & value)
pure virtual

Writes a xiiVec3U32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec3U64()

void xiiJSONWriter::WriteVec3U64 ( const xiiVec3U64 & value)
pure virtual

Writes a xiiVec3U64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec4()

void xiiJSONWriter::WriteVec4 ( const xiiVec4 & value)
pure virtual

Writes a xiiVec4 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec4d()

void xiiJSONWriter::WriteVec4d ( const xiiVec4d & value)
pure virtual

Writes a xiiVec4d to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec4I32()

void xiiJSONWriter::WriteVec4I32 ( const xiiVec4I32 & value)
pure virtual

Writes a xiiVec4I32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec4I64()

void xiiJSONWriter::WriteVec4I64 ( const xiiVec4I64 & value)
pure virtual

Writes a xiiVec4I64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec4U32()

void xiiJSONWriter::WriteVec4U32 ( const xiiVec4U32 & value)
pure virtual

Writes a xiiVec4U32 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.

◆ WriteVec4U64()

void xiiJSONWriter::WriteVec4U64 ( const xiiVec4U64 & value)
pure virtual

Writes a xiiVec4U64 to the JSON file. Can only be called between BeginVariable() / EndVariable() or BeginArray() / EndArray().

Note
Standard JSON does not have a suitable type for this. A derived class might turn this into an object or output it via WriteBinaryData().

Implemented in xiiStandardJSONWriter.


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