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
Return: the Number of stored element
get ()
const ejson::Value * get(size_t _id);
get the pointer on an element reference with his ID.
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
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).
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
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).
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
getStringValue ()
const std::string & getStringValue(size_t _id);
get the value of the string element (if not a string return "")
Parameter [input]: _id Id of the element.
Return: value of the element.
getStringValue ()
std::string getStringValue(size_t _id,
const std::string & _errorValue);
get the value of the string element
Parameter [input]: _id Id of the element.
Parameter [input]: _errorValue The return value if an error occured.
Return: value of the element, or the _errorValue.
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).
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
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).
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
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).
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
getNumberValue ()
double getNumberValue(size_t _id,
double _errorValue);
get the value of the Number element
Parameter [input]: _id Id of the element.
Parameter [input]: _errorValue The return value if an error occured.
Return: value of the element, or the _errorValue.
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).
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
getBooleanValue ()
bool getBooleanValue(size_t _id,
bool _errorValue);
get the value of the Boolean element
Parameter [input]: _id Id of the element.
Parameter [input]: _errorValue The return value if an error occured.
Return: value of the element, or the _errorValue.
add ()
bool add(ejson::Value * _element);
add an element on the array.
Parameter [input]: _element element to add.
Return: false if an error occured.
addString ()
bool addString(const std::string & _value);
add a string element in the Object (automatic creation)
Parameter [input]: _value string value to add
Return: false if an error occured
addNull ()
bool addNull(void);
add a "null" element in the Object (automatic creation)
Return: false if an error occured
addBoolean ()
bool addBoolean(bool _value);
add a boolean element in the Object (automatic creation)
Parameter [input]: _value boolean value to add
Return: false if an error occured
addNumber ()
bool addNumber(double _value);
add a double element in the Object (automatic creation)
Parameter [input]: _value double value to add
Return: false if an error occured
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);
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
-
Return: the Number of stored element
get ()
const ejson::Value * get(size_t _id);
get the pointer on an element reference with his ID.
-
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
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).
-
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
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).
-
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
getStringValue ()
const std::string & getStringValue(size_t _id);
get the value of the string element (if not a string return "")
-
Parameter [input]: _id Id of the element.
Return: value of the element.
getStringValue ()
std::string getStringValue(size_t _id, const std::string & _errorValue);
get the value of the string element
-
Parameter [input]: _id Id of the element.
Parameter [input]: _errorValue The return value if an error occured.
Return: value of the element, or the _errorValue.
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).
-
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
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).
-
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
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).
-
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
getNumberValue ()
double getNumberValue(size_t _id, double _errorValue);
get the value of the Number element
-
Parameter [input]: _id Id of the element.
Parameter [input]: _errorValue The return value if an error occured.
Return: value of the element, or the _errorValue.
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).
-
Parameter [input]: _id Id of the element.
Return: NULL if the element does not exist.
getBooleanValue ()
bool getBooleanValue(size_t _id, bool _errorValue);
get the value of the Boolean element
-
Parameter [input]: _id Id of the element.
Parameter [input]: _errorValue The return value if an error occured.
Return: value of the element, or the _errorValue.
add ()
bool add(ejson::Value * _element);
add an element on the array.
-
Parameter [input]: _element element to add.
Return: false if an error occured.
addString ()
bool addString(const std::string & _value);
add a string element in the Object (automatic creation)
-
Parameter [input]: _value string value to add
Return: false if an error occured
addNull ()
bool addNull(void);
add a "null" element in the Object (automatic creation)
-
Return: false if an error occured
addBoolean ()
bool addBoolean(bool _value);
add a boolean element in the Object (automatic creation)
-
Parameter [input]: _value boolean value to add
Return: false if an error occured
addNumber ()
bool addNumber(double _value);
add a double element in the Object (automatic creation)
-
Parameter [input]: _value double value to add
Return: false if an error occured
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);