Class: ejson::Object


Synopsis:

+                         Object          (void);
+ ~Object (void);
+ bool exist (const std::string & _name);
+ ejson::Value * get (const std::string & _name);
+ ejson::Object * getObject (const std::string & _name);
+ ejson::Array * getArray (const std::string & _name);
+ ejson::Null * getNull (const std::string & _name);
+ ejson::String * getString (const std::string & _name);
+ const std::string & getStringValue (const std::string & _name);
+ std::string getStringValue (const std::string & _name,
const std::string & _errorValue);
+ ejson::Boolean * getBoolean (const std::string & _name);
+ bool getBooleanValue (const std::string & _name,
bool _errorValue);
+ ejson::Number * getNumber (const std::string & _name);
+ double getNumberValue (const std::string & _name,
double _errorValue);
+ bool add (const std::string & _name,
ejson::Value * _value);
+ bool addString (const std::string & _name,
const std::string & _value);
+ bool addNull (const std::string & _name);
+ bool addBoolean (const std::string & _name,
bool _value);
+ bool addNumber (const std::string & _name,
double _value);
+ bool iParse (const std::string & _data,
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
+ bool iGenerate (std::string & _data,
size_t _indent);
+ enum nodeType getType (void);
+ ejson::Object * toObject (void);
+ const ejson::Object * toObject (void);
+ void clear (void);
+ bool transfertIn (ejson::Value * _obj);
+ ejson::Value * duplicate (void);

Object Hierarchy:

ejson::Value
    +--> ejson::Object
        +--> ejson::Document

Detail:

ejson::Object ()

Object(void);

basic element of a xml structure


ejson::~Object ()

~Object(void);

destructor


exist ()

bool exist(const std::string & _name);

check if an element exist.


get ()

ejson::Value * get(const std::string & _name);

get the sub element with his name (no cast check)


getObject ()

ejson::Object * getObject(const std::string & _name);

get the sub element with his name (Casted as Object if it is possible)


getArray ()

ejson::Array * getArray(const std::string & _name);

get the sub element with his name (Casted as Array if it is possible)


getNull ()

ejson::Null * getNull(const std::string & _name);

get the sub element with his name (Casted as Null if it is possible)


getString ()

ejson::String * getString(const std::string & _name);

get the sub element with his name (Casted as String if it is possible)


getStringValue ()

const std::string & getStringValue(const std::string & _name);

get the sub string value of the requested element


getStringValue ()

std::string getStringValue(const std::string & _name,
                           const std::string & _errorValue);

get the sub string value of the requested element (with error return value)


getBoolean ()

ejson::Boolean * getBoolean(const std::string & _name);

get the sub element with his name (Casted as Boolean if it is possible)


getBooleanValue ()

bool getBooleanValue(const std::string & _name,
                     bool _errorValue);

get the sub boolean value of the requested element.


getNumber ()

ejson::Number * getNumber(const std::string & _name);

get the sub element with his name (Casted as Number if it is possible)


getNumberValue ()

double getNumberValue(const std::string & _name,
                      double _errorValue);

get the sub Number value of the requested element.


add ()

bool add(const std::string & _name,
         ejson::Value * _value);

add an element in the Object


addString ()

bool addString(const std::string & _name,
               const std::string & _value);

add a string element in the Object (automatic creation)


addNull ()

bool addNull(const std::string & _name);

add a "null" element in the Object (automatic creation)


addBoolean ()

bool addBoolean(const std::string & _name,
                bool _value);

add a boolean element in the Object (automatic creation)


addNumber ()

bool addNumber(const std::string & _name,
               double _value);

add a double element in the Object (automatic creation)


iParse ()

bool iParse(const std::string & _data,
            size_t & _pos,
            ejson::filePos & _filePos,
            ejson::Document & _doc);



iGenerate ()

bool iGenerate(std::string & _data,
               size_t _indent);



getType ()

enum nodeType getType(void);



toObject ()

ejson::Object * toObject(void);



toObject ()

const ejson::Object * toObject(void);



clear ()

void clear(void);



transfertIn ()

bool transfertIn(ejson::Value * _obj);



duplicate ()

ejson::Value * duplicate(void);