Class: ejson::Array


Synopsis:

+                        Array           (void);
+ ~Array (void);
+ size_t size (void);
+ const ejson::Value * get (size_t _id);
+ ejson::Value * get (size_t _id);
+ ejson::Object * getObject (size_t _id);
+ ejson::String * getString (size_t _id);
+ const std::string & getStringValue (size_t _id);
+ std::string getStringValue (size_t _id,
const std::string & _errorValue);
+ ejson::Array * getArray (size_t _id);
+ ejson::Null * getNull (size_t _id);
+ ejson::Number * getNumber (size_t _id);
+ double getNumberValue (size_t _id,
double _errorValue);
+ ejson::Boolean * getBoolean (size_t _id);
+ bool getBooleanValue (size_t _id,
bool _errorValue);
+ bool add (ejson::Value * _element);
+ bool addString (const std::string & _value);
+ bool addNull (void);
+ bool addBoolean (bool _value);
+ bool addNumber (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::Array * toArray (void);
+ const ejson::Array * toArray (void);
+ void clear (void);
+ bool transfertIn (ejson::Value * _obj);
+ ejson::Value * duplicate (void);

Object Hierarchy:

ejson::Value
    +--> ejson::Array

Detail:

ejson::Array ()

Array(void);

basic element of a xml structure


ejson::~Array ()

~Array(void);

destructor


size ()

size_t size(void);

get the number of sub element in the current one


get ()

const ejson::Value * get(size_t _id);

get the pointer on an element reference with his ID.


get ()

ejson::Value * get(size_t _id);



getObject ()

ejson::Object * getObject(size_t _id);

get the pointer on an element reference with his ID (casted in Object if it is an object).


getString ()

ejson::String * getString(size_t _id);

get the pointer on an element reference with his ID (casted in String if it is an String).


getStringValue ()

const std::string & getStringValue(size_t _id);

get the value of the string element (if not a string return "")


getStringValue ()

std::string getStringValue(size_t _id,
                           const std::string & _errorValue);

get the value of the string element


getArray ()

ejson::Array * getArray(size_t _id);

get the pointer on an element reference with his ID (casted in Array if it is an Array).


getNull ()

ejson::Null * getNull(size_t _id);

get the pointer on an element reference with his ID (casted in Null if it is an Null).


getNumber ()

ejson::Number * getNumber(size_t _id);

get the pointer on an element reference with his ID (casted in Number if it is an Number).


getNumberValue ()

double getNumberValue(size_t _id,
                      double _errorValue);

get the value of the Number element


getBoolean ()

ejson::Boolean * getBoolean(size_t _id);

get the pointer on an element reference with his ID (casted in Boolean if it is an Boolean).


getBooleanValue ()

bool getBooleanValue(size_t _id,
                     bool _errorValue);

get the value of the Boolean element


add ()

bool add(ejson::Value * _element);

add an element on the array.


addString ()

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

add a string element in the Object (automatic creation)


addNull ()

bool addNull(void);

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


addBoolean ()

bool addBoolean(bool _value);

add a boolean element in the Object (automatic creation)


addNumber ()

bool addNumber(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);



toArray ()

ejson::Array * toArray(void);



toArray ()

const ejson::Array * toArray(void);



clear ()

void clear(void);



transfertIn ()

bool transfertIn(ejson::Value * _obj);



duplicate ()

ejson::Value * duplicate(void);