YourCityInvadedByAliens
Documentation for code of the game
Public Member Functions | Private Member Functions | Private Attributes | List of all members
YJsonObject Class Reference

#include <yjson.h>

Public Member Functions

 YJsonObject ()
 
 ~YJsonObject ()
 
bool isUndefined ()
 
bool isString ()
 
void doString ()
 
std::string getString () const
 
void setString (std::string sValue)
 
bool isNumber ()
 
void doNumber ()
 
int getNumber () const
 
void setNumber (int nValue)
 
bool isObject ()
 
void doObject ()
 
std::vector< std::string > getKeys () const
 
const YJsonObjectoperator[] (const std::string &sName) const
 
void addKeyValue (const std::string &sKey, YJsonObject *pValue)
 
bool containsKey (const std::string &sKey) const
 
bool isArray () const
 
void doArray ()
 
void push (YJsonObject *pValue)
 
int length () const
 
const YJsonObjectoperator[] (int nIndex) const
 

Private Member Functions

void reset ()
 

Private Attributes

std::string TAG
 
YJsonObjectType m_nType
 
std::string m_sValue
 
int m_nValue
 
std::map< std::string, YJsonObject * > m_mapObjects
 
std::vector< YJsonObject * > m_arrObjects
 

Constructor & Destructor Documentation

◆ YJsonObject()

YJsonObject::YJsonObject ( )

◆ ~YJsonObject()

YJsonObject::~YJsonObject ( )

Member Function Documentation

◆ addKeyValue()

void YJsonObject::addKeyValue ( const std::string &  sKey,
YJsonObject pValue 
)

◆ containsKey()

bool YJsonObject::containsKey ( const std::string &  sKey) const

◆ doArray()

void YJsonObject::doArray ( )

◆ doNumber()

void YJsonObject::doNumber ( )

◆ doObject()

void YJsonObject::doObject ( )

◆ doString()

void YJsonObject::doString ( )

◆ getKeys()

std::vector< std::string > YJsonObject::getKeys ( ) const

◆ getNumber()

int YJsonObject::getNumber ( ) const

◆ getString()

std::string YJsonObject::getString ( ) const

◆ isArray()

bool YJsonObject::isArray ( ) const

◆ isNumber()

bool YJsonObject::isNumber ( )

◆ isObject()

bool YJsonObject::isObject ( )

◆ isString()

bool YJsonObject::isString ( )

◆ isUndefined()

bool YJsonObject::isUndefined ( )

◆ length()

int YJsonObject::length ( ) const

◆ operator[]() [1/2]

const YJsonObject & YJsonObject::operator[] ( const std::string &  sName) const

◆ operator[]() [2/2]

const YJsonObject & YJsonObject::operator[] ( int  nIndex) const

◆ push()

void YJsonObject::push ( YJsonObject pValue)

◆ reset()

void YJsonObject::reset ( )
private

◆ setNumber()

void YJsonObject::setNumber ( int  nValue)

◆ setString()

void YJsonObject::setString ( std::string  sValue)

Member Data Documentation

◆ m_arrObjects

std::vector<YJsonObject *> YJsonObject::m_arrObjects
private

◆ m_mapObjects

std::map<std::string, YJsonObject *> YJsonObject::m_mapObjects
private

◆ m_nType

YJsonObjectType YJsonObject::m_nType
private

◆ m_nValue

int YJsonObject::m_nValue
private

◆ m_sValue

std::string YJsonObject::m_sValue
private

◆ TAG

std::string YJsonObject::TAG
private

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