class: ejson::Array


Description:



Constructor and Destructor:

+                                    Array           ();
+ virtual ~Array ();

Synopsis:

+         size_t                     size            () const;
+ ejson::Value* get (size_t _id);
+ const ejson::Value* get (size_t _id) const;
+ ejson::Value* operator [ ] (size_t _id);
+ const ejson::Value* operator [ ] (size_t _id) const;
+ ejson::Object* getObject (size_t _id);
+ const ejson::Object* getObject (size_t _id) const;
+ ejson::String* getString (size_t _id);
+ const ejson::String* getString (size_t _id) const;
+ std::string getStringValue (size_t _id);
+ const std::string & getStringValue (size_t _id) const;
+ std::string getStringValue (size_t _id,
const std::string & _errorValue) const;
+ ejson::Array* getArray (size_t _id);
+ const ejson::Array* getArray (size_t _id) const;
+ ejson::Null* getNull (size_t _id);
+ const ejson::Null* getNull (size_t _id) const;
+ ejson::Number* getNumber (size_t _id);
+ const ejson::Number* getNumber (size_t _id) const;
+ double getNumberValue (size_t _id,
double _errorValue) const;
+ ejson::Boolean* getBoolean (size_t _id);
+ const ejson::Boolean* getBoolean (size_t _id) const;
+ bool getBooleanValue (size_t _id,
bool _errorValue) const;
+ bool add (ejson::Value* _element);
+ bool addString (const std::string & _value);
+ bool addNull ();
+ bool addBoolean (bool _value);
+ bool addNumber (double _value);
+ virtual bool iParse (const std::string & _data,
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
+ virtual bool iGenerate (std::string & _data,
size_t _indent) const;
+ virtual void clear ();
+ virtual bool transfertIn (ejson::Value* _obj);
+ virtual ejson::Value* duplicate () const;

Object Hierarchy:

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

Detail:

Array

+  Array ();
basic element of a xml structure


~Array

+ virtual  ~Array ();
destructor


size

+ size_t size () const;
get the number of sub element in the current one


get

+ ejson::Value* get (size_t _id);
+ const ejson::Value* get (size_t _id) const;
+ ejson::Value* operator [ ] (size_t _id);
+ const ejson::Value* operator [ ] (size_t _id) const;
get the pointer on an element reference with his ID.


getObject

+ ejson::Object* getObject (size_t _id);
+ const ejson::Object* getObject (size_t _id) const;
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);
+ const ejson::String* getString (size_t _id) const;
get the pointer on an element reference with his ID (casted in String if it is an String).


getStringValue

+ std::string getStringValue (size_t _id);
+ const std::string & getStringValue (size_t _id) const;
get the value of the string element (if not a string return "")


getStringValue

+ std::string getStringValue (size_t _id,
const std::string & _errorValue) const;
get the value of the string element


getArray

+ ejson::Array* getArray (size_t _id);
+ const ejson::Array* getArray (size_t _id) const;
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);
+ const ejson::Null* getNull (size_t _id) const;
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);
+ const ejson::Number* getNumber (size_t _id) const;
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) const;
get the value of the Number element


getBoolean

+ ejson::Boolean* getBoolean (size_t _id);
+ const ejson::Boolean* getBoolean (size_t _id) const;
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) const;
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 ();
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

+ virtual bool iParse (const std::string & _data,
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
parse the Current node [pure VIRUAL]


iGenerate

+ virtual bool iGenerate (std::string & _data,
size_t _indent) const;
generate a string with the tree of the xml


clear

+ virtual void clear ();
clear the Node


transfertIn

+ virtual bool transfertIn (ejson::Value* _obj);
Tranfert all element in the element set in parameter
Note: all element is remove from the curent element.


duplicate

+ virtual ejson::Value* duplicate () const;
Copy the curent node and all the child in the curent one.