VL
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
vl::JSONLoader Class Reference

#include <JSONLoader.h>

Public Types

typedef char Ch
 
typedef size_t SizeType
 

Public Member Functions

 JSONLoader (vl::Object &object)
 
ContainerInfo * GetCurrentContainer ()
 
ContainerInfo * PushContainer (vl::Var *ptr, const std::string &name)
 
void PopContainer ()
 
bool Null ()
 
bool Bool (bool b)
 
bool Int (int i)
 
bool Uint (unsigned i)
 
bool Int64 (int64_t i)
 
bool Uint64 (uint64_t i)
 
bool Double (double d)
 
bool RawNumber (const Ch *str, SizeType length, bool copy)
 enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length) More...
 
bool String (const Ch *str, SizeType length, bool copy)
 
bool StartObject ()
 
bool Key (const Ch *str, SizeType length, bool copy)
 
bool EndObject (SizeType memberCount)
 
bool StartArray ()
 
bool EndArray (SizeType elementCount)
 

Protected Member Functions

bool AddVar (const vl::VarPtr &ptr)
 
void PushNewList (ContainerInfo *parentContainer, const std::string &listName)
 
void PushNewObject (ContainerInfo *c, const std::string &objectName)
 
ContainerInfo * PushNewContainer (bool isObject, bool isList, ContainerInfo *parentConainer, const std::string &newContainerName)
 
void StoreUnresolvedRef (vl::Object &ref)
 
void ResolveRefs ()
 

Member Typedef Documentation

◆ Ch

typedef char vl::JSONLoader::Ch

◆ SizeType

typedef size_t vl::JSONLoader::SizeType

Constructor & Destructor Documentation

◆ JSONLoader()

vl::JSONLoader::JSONLoader ( vl::Object &  object)
inline

Member Function Documentation

◆ AddVar()

bool vl::JSONLoader::AddVar ( const vl::VarPtr &  ptr)
protected

◆ Bool()

bool vl::JSONLoader::Bool ( bool  b)

◆ Double()

bool vl::JSONLoader::Double ( double  d)

◆ EndArray()

bool vl::JSONLoader::EndArray ( SizeType  elementCount)

◆ EndObject()

bool vl::JSONLoader::EndObject ( SizeType  memberCount)

◆ GetCurrentContainer()

vl::JSONLoader::ContainerInfo * vl::JSONLoader::GetCurrentContainer ( )

◆ Int()

bool vl::JSONLoader::Int ( int  i)

◆ Int64()

bool vl::JSONLoader::Int64 ( int64_t  i)

◆ Key()

bool vl::JSONLoader::Key ( const Ch str,
SizeType  length,
bool  copy 
)

◆ Null()

bool vl::JSONLoader::Null ( )

◆ PopContainer()

void vl::JSONLoader::PopContainer ( )

◆ PushContainer()

vl::JSONLoader::ContainerInfo * vl::JSONLoader::PushContainer ( vl::Var *  ptr,
const std::string &  name 
)

◆ PushNewContainer()

vl::JSONLoader::ContainerInfo * vl::JSONLoader::PushNewContainer ( bool  isObject,
bool  isList,
ContainerInfo *  parentConainer,
const std::string &  newContainerName 
)
protected

◆ PushNewList()

void vl::JSONLoader::PushNewList ( ContainerInfo *  parentContainer,
const std::string &  listName 
)
protected

◆ PushNewObject()

void vl::JSONLoader::PushNewObject ( ContainerInfo *  c,
const std::string &  objectName 
)
protected

◆ RawNumber()

bool vl::JSONLoader::RawNumber ( const Ch str,
SizeType  length,
bool  copy 
)

enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)

◆ ResolveRefs()

void vl::JSONLoader::ResolveRefs ( )
protected

◆ StartArray()

bool vl::JSONLoader::StartArray ( )

◆ StartObject()

bool vl::JSONLoader::StartObject ( )

◆ StoreUnresolvedRef()

void vl::JSONLoader::StoreUnresolvedRef ( vl::Object &  ref)
protected

◆ String()

bool vl::JSONLoader::String ( const Ch str,
SizeType  length,
bool  copy 
)

◆ Uint()

bool vl::JSONLoader::Uint ( unsigned  i)

◆ Uint64()

bool vl::JSONLoader::Uint64 ( uint64_t  i)

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