Go to the source code of this file.
++Classes | |
class | ejson::Array |
+Namespaces | |
ejson | |
Detailed Description
+- Copyright
- 2011, Edouard DUPIN, all right reserved
- Note
- License: APACHE v2.0 (see license file)
diff --git a/_array_8hpp.html b/_array_8hpp.html new file mode 100644 index 0000000..74d0a8d --- /dev/null +++ b/_array_8hpp.html @@ -0,0 +1,201 @@ + + + +
+ + + + + + +Go to the source code of this file.
++Classes | |
class | ejson::Array |
+Namespaces | |
ejson | |
Go to the source code of this file.
++Classes | |
class | ejson::Boolean |
+Namespaces | |
ejson | |
#include <ejson/Value.hpp>
#include <vector>
#include <etk/types.hpp>
#include <ejson/String.hpp>
#include <ejson/Array.hpp>
#include <ejson/Object.hpp>
Go to the source code of this file.
++Classes | |
class | ejson::Document |
+Namespaces | |
ejson | |
#include <etk/types.hpp>
Go to the source code of this file.
++Classes | |
class | ejson::FilePos |
+Namespaces | |
ejson | |
Go to the source code of this file.
++Classes | |
class | ejson::Null |
+Namespaces | |
ejson | |
Go to the source code of this file.
++Classes | |
class | ejson::Number |
+Namespaces | |
ejson | |
#include <etk/types.hpp>
#include <etk/Hash.hpp>
#include <algorithm>
#include <ejson/Value.hpp>
#include <ejson/iterator.hpp>
Go to the source code of this file.
++Classes | |
class | ejson::Object |
+Namespaces | |
ejson | |
Go to the source code of this file.
++Classes | |
class | ejson::String |
+Namespaces | |
ejson | |
#include <etk/types.hpp>
#include <ememory/memory.hpp>
#include <ejson/FilePos.hpp>
#include <ejson/valueType.hpp>
#include <ejson/internal/Value.hpp>
#include <ejson/Array.hpp>
#include <ejson/Boolean.hpp>
#include <ejson/Null.hpp>
#include <ejson/Number.hpp>
#include <ejson/Object.hpp>
#include <ejson/String.hpp>
Go to the source code of this file.
++Classes | |
class | ejson::Value |
+Namespaces | |
ejson | |
ejson::internal | |
+Functions | |
ejson::Value | ejson::empty () |
▼Nejson | Ejson namespace containing all function for JSON interpretor |
▼Ninternal | Ejson internal data implementation (not for external user) |
CArray | Ejson Array internal data implementation |
CBoolean | Ejson Boolean internal data implementation |
CDocument | Ejson Document internal data implementation |
CNull | Ejson Null internal data implementation |
CNumber | Ejson Number internal data implementation |
CObject | Ejson Object internal data implementation |
CString | Ejson String internal data implementation |
CValue | Basic main object of all json data |
CArray | Ejson Array interface [ ... ] |
CBoolean | Ejson Boolean interface: true/false |
CDocument | Ejson Document interface (acces with the file and stream) |
CFilePos | Position in the file of the original data |
Citerator | |
CNull | Ejson Null interface: 'null' |
CNumber | Ejson Number interface |
CObject | Ejson Object interface { ... } |
CString | Ejson String interface |
CValue | Basic main object of all json elements |
-+ Array ();-
+ virtual ~Array ();
-+ 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;
-+ejson::Value-
+--> ejson::Array
-+ Array ();-basic element of a xml structure
-+ virtual ~Array ();-destructor
-+ size_t size () const;-get the number of sub element in the current one
Return: | the Number of stored element |
-+ ejson::Value* get (size_t _id);-get the pointer on an element reference with his ID.
+ const ejson::Value* get (size_t _id) const;
+ ejson::Value* operator [ ] (size_t _id);
+ const ejson::Value* operator [ ] (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | NULL if the element does not exist. |
-+ ejson::Object* getObject (size_t _id);-get the pointer on an element reference with his ID (casted in Object if it is an object).
+ const ejson::Object* getObject (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | NULL if the element does not exist. |
-+ ejson::String* getString (size_t _id);-get the pointer on an element reference with his ID (casted in String if it is an String).
+ const ejson::String* getString (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | NULL if the element does not exist. |
-+ std::string getStringValue (size_t _id);-get the value of the string element (if not a string return "")
+ const std::string & getStringValue (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | value of the element. |
-+ std::string getStringValue (size_t _id,-get the value of the string element
const std::string & _errorValue) const;
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. |
-+ ejson::Array* getArray (size_t _id);-get the pointer on an element reference with his ID (casted in Array if it is an Array).
+ const ejson::Array* getArray (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | NULL if the element does not exist. |
-+ ejson::Null* getNull (size_t _id);-get the pointer on an element reference with his ID (casted in Null if it is an Null).
+ const ejson::Null* getNull (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | NULL if the element does not exist. |
-+ ejson::Number* getNumber (size_t _id);-get the pointer on an element reference with his ID (casted in Number if it is an Number).
+ const ejson::Number* getNumber (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | NULL if the element does not exist. |
-+ double getNumberValue (size_t _id,-get the value of the Number element
double _errorValue) const;
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. |
-+ ejson::Boolean* getBoolean (size_t _id);-get the pointer on an element reference with his ID (casted in Boolean if it is an Boolean).
+ const ejson::Boolean* getBoolean (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | NULL if the element does not exist. |
-+ bool getBooleanValue (size_t _id,-get the value of the Boolean element
bool _errorValue) const;
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. |
-+ bool add (ejson::Value* _element);-add an element on the array.
Parameter [input]: | _element | element to add. | -
Return: | false if an error occured. |
-+ 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 |
-+ bool addNull ();-add a "null" element in the Object (automatic creation)
Return: | false if an error occured |
-+ 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 |
-+ 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 |
-+ virtual bool iParse (const std::string & _data,-parse the Current node [pure VIRUAL]
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
Parameter [input]: | _data | data string to parse. | -Parameter [input] [output]: | _pos | position in the string to start parse, return the position end of parsing. | -Parameter [input]: | _caseSensitive | Request a parsion of element that is not case sensitive (all element is in low case) | -Parameter [input] [output]: | file | parsing position (line x col x) | -
Return: | false if an error occured. |
-+ virtual bool iGenerate (std::string & _data,-generate a string with the tree of the xml
size_t _indent) const;
Parameter [input] [output]: | _data | string where to add the elements | -Parameter [input]: | current | indentation of the file | -
Return: | false if an error occured. |
-+ virtual void clear ();-clear the Node
-+ virtual bool transfertIn (ejson::Value* _obj);-Tranfert all element in the element set in parameter
Parameter [input] [output]: | _obj | move all parameter in the selected element | -
Return: | true if transfer is done corectly |
-+ virtual ejson::Value* duplicate () const;-Copy the curent node and all the child in the curent one.
Return: | NULL in an error occured, the pointer on the element otherwise |
-+ Boolean (bool _value);-
+ virtual ~Boolean ();
-# bool m_value;-
+ void set (bool _value);
+ bool get () const;
+ 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 bool transfertIn (ejson::Value* _obj);
+ virtual ejson::Value* duplicate () const;
-+ejson::Value-
+--> ejson::Boolean
-+ Boolean (bool _value);-basic element of a xml structure
-+ virtual ~Boolean ();-destructor
-# bool m_value;- -value of the node
-+ void set (bool _value);-set the value of the node.
Parameter [input]: | _value | New value of the node. | -
-+ bool get () const;-get the current element Value.
Return: | the reference of the string value. |
-+ virtual bool iParse (const std::string & _data,-parse the Current node [pure VIRUAL]
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
Parameter [input]: | _data | data string to parse. | -Parameter [input] [output]: | _pos | position in the string to start parse, return the position end of parsing. | -Parameter [input]: | _caseSensitive | Request a parsion of element that is not case sensitive (all element is in low case) | -Parameter [input] [output]: | file | parsing position (line x col x) | -
Return: | false if an error occured. |
-+ virtual bool iGenerate (std::string & _data,-generate a string with the tree of the xml
size_t _indent) const;
Parameter [input] [output]: | _data | string where to add the elements | -Parameter [input]: | current | indentation of the file | -
Return: | false if an error occured. |
-+ virtual bool transfertIn (ejson::Value* _obj);-Tranfert all element in the element set in parameter
Parameter [input] [output]: | _obj | move all parameter in the selected element | -
Return: | true if transfer is done corectly |
-+ virtual ejson::Value* duplicate () const;-Copy the curent node and all the child in the curent one.
Return: | NULL in an error occured, the pointer on the element otherwise |
-+ Document ();-
+ virtual ~Document ();
-+ bool parse (const std::string & _data);-
+ bool generate (std::string & _data);
+ bool load (const std::string & _file);
+ bool store (const std::string & _file);
+ void display ();
+ void displayErrorWhenDetected ();
+ void notDisplayErrorWhenDetected ();
+ void createError (const std::string & _data,
size_t _pos,
const ejson::filePos & _filePos,
const std::string & _comment);
+ void displayError ();
+ 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;
-+ejson::Value-
+--> +ejson::Object
+--> ejson::Document
-+ Document ();-Constructor
-+ virtual ~Document ();-Destructor
-+ bool parse (const std::string & _data);-parse a string that contain an XML
Parameter [input]: | _data | Data to parse | -
Return: | false : An error occured<br/>true : Parsing is OK |
-+ bool generate (std::string & _data);-generate a string that contain the created XML
Parameter [output]: | _data | Data where the xml is stored | -
Return: | false : An error occured<br/>true : Parsing is OK |
-+ bool load (const std::string & _file);-Load the file that might contain the xml
Parameter [input]: | _file | Filename of the xml (compatible with etk FSNode naming) | -
Return: | false : An error occured<br/>true : Parsing is OK |
-+ bool store (const std::string & _file);-Store the Xml in the file
Parameter [input]: | _file | Filename of the xml (compatible with etk FSNode naming) | -
Return: | false : An error occured<br/>true : Parsing is OK |
-+ void display ();-Display the Document on console
-+ void displayErrorWhenDetected ();- -
-+ void notDisplayErrorWhenDetected ();- -
-+ void createError (const std::string & _data,- -
size_t _pos,
const ejson::filePos & _filePos,
const std::string & _comment);
-+ void displayError ();- -
-+ virtual bool iParse (const std::string & _data,-parse the Current node [pure VIRUAL]
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
Parameter [input]: | _data | data string to parse. | -Parameter [input] [output]: | _pos | position in the string to start parse, return the position end of parsing. | -Parameter [input]: | _caseSensitive | Request a parsion of element that is not case sensitive (all element is in low case) | -Parameter [input] [output]: | file | parsing position (line x col x) | -
Return: | false if an error occured. |
-+ virtual bool iGenerate (std::string & _data,-generate a string with the tree of the xml
size_t _indent) const;
Parameter [input] [output]: | _data | string where to add the elements | -Parameter [input]: | current | indentation of the file | -
Return: | false if an error occured. |
-+ Null ();-
+ virtual ~Null ();
-+ 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 bool transfertIn (ejson::Value* _obj);
+ virtual ejson::Value* duplicate () const;
-+ejson::Value-
+--> ejson::Null
-+ Null ();-basic element of a xml structure
-+ virtual ~Null ();-destructor
-+ virtual bool iParse (const std::string & _data,-parse the Current node [pure VIRUAL]
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
Parameter [input]: | _data | data string to parse. | -Parameter [input] [output]: | _pos | position in the string to start parse, return the position end of parsing. | -Parameter [input]: | _caseSensitive | Request a parsion of element that is not case sensitive (all element is in low case) | -Parameter [input] [output]: | file | parsing position (line x col x) | -
Return: | false if an error occured. |
-+ virtual bool iGenerate (std::string & _data,-generate a string with the tree of the xml
size_t _indent) const;
Parameter [input] [output]: | _data | string where to add the elements | -Parameter [input]: | current | indentation of the file | -
Return: | false if an error occured. |
-+ virtual bool transfertIn (ejson::Value* _obj);-Tranfert all element in the element set in parameter
Parameter [input] [output]: | _obj | move all parameter in the selected element | -
Return: | true if transfer is done corectly |
-+ virtual ejson::Value* duplicate () const;-Copy the curent node and all the child in the curent one.
Return: | NULL in an error occured, the pointer on the element otherwise |
-+ Number (double _value);-
+ virtual ~Number ();
-# double m_value;-
+ void set (double _value);
+ double get () const;
+ int32_t getInt32 () const;
+ int64_t getInt64 () const;
+ 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 bool transfertIn (ejson::Value* _obj);
+ virtual ejson::Value* duplicate () const;
-+ejson::Value-
+--> ejson::Number
-+ Number (double _value);-basic element of a xml structure
-+ virtual ~Number ();-destructor
-# double m_value;- -value of the node
-+ void set (double _value);-set the value of the node.
Parameter [input]: | _value | New value of the node. | -
-+ double get () const;-Get the current element Value.
Return: | The double number registered |
-+ int32_t getInt32 () const;-Get the current element Value.
Return: | The 32 bit integer number registered |
-+ int64_t getInt64 () const;-Get the current element Value.
Return: | The 64 bit integer number registered |
-+ virtual bool iParse (const std::string & _data,-parse the Current node [pure VIRUAL]
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
Parameter [input]: | _data | data string to parse. | -Parameter [input] [output]: | _pos | position in the string to start parse, return the position end of parsing. | -Parameter [input]: | _caseSensitive | Request a parsion of element that is not case sensitive (all element is in low case) | -Parameter [input] [output]: | file | parsing position (line x col x) | -
Return: | false if an error occured. |
-+ virtual bool iGenerate (std::string & _data,-generate a string with the tree of the xml
size_t _indent) const;
Parameter [input] [output]: | _data | string where to add the elements | -Parameter [input]: | current | indentation of the file | -
Return: | false if an error occured. |
-+ virtual bool transfertIn (ejson::Value* _obj);-Tranfert all element in the element set in parameter
Parameter [input] [output]: | _obj | move all parameter in the selected element | -
Return: | true if transfer is done corectly |
-+ virtual ejson::Value* duplicate () const;-Copy the curent node and all the child in the curent one.
Return: | NULL in an error occured, the pointer on the element otherwise |
-+ Object ();-
+ virtual ~Object ();
-# etk::Hash<ejson::Value*> m_value;-
+ bool exist (const std::string & _name) const;
+ ejson::Value* get (const std::string & _name);
+ const ejson::Value* get (const std::string & _name) const;
+ ejson::Value* operator [ ] (const std::string & _name);
+ const ejson::Value* operator [ ] (const std::string & _name) const;
+ std::vector<std::string> getKeys () const;
+ 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;
+ std::string getKey (size_t _id) const;
+ ejson::Object* getObject (const std::string & _name);
+ const ejson::Object* getObject (const std::string & _name) const;
+ ejson::Array* getArray (const std::string & _name);
+ const ejson::Array* getArray (const std::string & _name) const;
+ ejson::Null* getNull (const std::string & _name);
+ const ejson::Null* getNull (const std::string & _name) const;
+ ejson::String* getString (const std::string & _name);
+ const ejson::String* getString (const std::string & _name) const;
+ const std::string & getStringValue (const std::string & _name) const;
+ std::string getStringValue (const std::string & _name,
const std::string & _errorValue) const;
+ ejson::Boolean* getBoolean (const std::string & _name);
+ const ejson::Boolean* getBoolean (const std::string & _name) const;
+ bool getBooleanValue (const std::string & _name,
bool _errorValue) const;
+ ejson::Number* getNumber (const std::string & _name);
+ const ejson::Number* getNumber (const std::string & _name) const;
+ double getNumberValue (const std::string & _name,
double _errorValue) const;
+ 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);
+ 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;
-+ejson::Value-
+--> ejson::Object
+--> ejson::Document
-+ Object ();-basic element of a xml structure
-+ virtual ~Object ();-destructor
-# etk::Hash<ejson::Value*> m_value;- -value of the node (for element this is the name, for text it is the inside text ...)
-+ bool exist (const std::string & _name) const;-check if an element exist.
Parameter [input]: | _name | name of the object. | -
Return: | The existance of the element. |
-+ ejson::Value* get (const std::string & _name);-get the sub element with his name (no cast check)
+ const ejson::Value* get (const std::string & _name) const;
+ ejson::Value* operator [ ] (const std::string & _name);
+ const ejson::Value* operator [ ] (const std::string & _name) const;
Parameter [input]: | _name | name of the object | -
Return: | pointer on the element requested or NULL if it not the corect type or does not existed |
-+ std::vector<std::string> getKeys () const;-Get all the element name (keys).
Return: | a vector of all name (key). |
-+ size_t size () const;-get the number of sub element in the current one
Return: | the Number of stored element |
-+ ejson::Value* get (size_t _id);-get the pointer on an element reference with his ID.
+ const ejson::Value* get (size_t _id) const;
+ ejson::Value* operator [ ] (size_t _id);
+ const ejson::Value* operator [ ] (size_t _id) const;
Parameter [input]: | _id | Id of the element. | -
Return: | NULL if the element does not exist. |
-+ std::string getKey (size_t _id) const;-Get the element name (key).
Parameter [input]: | _id | Id of the element. | -
Return: | The name (key). |
-+ ejson::Object* getObject (const std::string & _name);-get the sub element with his name (Casted as Object if it is possible)
+ const ejson::Object* getObject (const std::string & _name) const;
Parameter [input]: | _name | name of the object | -
Return: | pointer on the element requested or NULL if it not the corect type or does not existed |
-+ ejson::Array* getArray (const std::string & _name);-get the sub element with his name (Casted as Array if it is possible)
+ const ejson::Array* getArray (const std::string & _name) const;
Parameter [input]: | _name | name of the object | -
Return: | pointer on the element requested or NULL if it not the corect type or does not existed |
-+ ejson::Null* getNull (const std::string & _name);-get the sub element with his name (Casted as Null if it is possible)
+ const ejson::Null* getNull (const std::string & _name) const;
Parameter [input]: | _name | name of the object | -
Return: | pointer on the element requested or NULL if it not the corect type or does not existed |
-+ ejson::String* getString (const std::string & _name);-get the sub element with his name (Casted as String if it is possible)
+ const ejson::String* getString (const std::string & _name) const;
Parameter [input]: | _name | name of the object | -
Return: | pointer on the element requested or NULL if it not the corect type or does not existed |
-+ const std::string & getStringValue (const std::string & _name) const;-get the sub string value of the requested element
Parameter [input]: | _name | name of the object | -
Return: | Value of the string or an error string (empty) |
-+ std::string getStringValue (const std::string & _name,-get the sub string value of the requested element (with error return value)
const std::string & _errorValue) const;
Parameter [input]: | _name | name of the object | -Parameter [input]: | _errorValue | The return value if the element does not exist. | -
Return: | Value of the string or an error string (empty) |
-+ ejson::Boolean* getBoolean (const std::string & _name);-get the sub element with his name (Casted as Boolean if it is possible)
+ const ejson::Boolean* getBoolean (const std::string & _name) const;
Parameter [input]: | _name | name of the object | -
Return: | pointer on the element requested or NULL if it not the corect type or does not existed |
-+ bool getBooleanValue (const std::string & _name,-get the sub boolean value of the requested element.
bool _errorValue) const;
Parameter [input]: | _name | name of the object. | -Parameter [input]: | _errorValue | The return value if the element does not exist. | -
Return: | Value of the Boolean or the _errorValue; |
-+ ejson::Number* getNumber (const std::string & _name);-get the sub element with his name (Casted as Number if it is possible)
+ const ejson::Number* getNumber (const std::string & _name) const;
Parameter [input]: | _name | name of the object | -
Return: | pointer on the element requested or NULL if it not the corect type or does not existed |
-+ double getNumberValue (const std::string & _name,-get the sub Number value of the requested element.
double _errorValue) const;
Parameter [input]: | _name | name of the object. | -Parameter [input]: | _errorValue | The return value if the element does not exist. | -
Return: | Value of the Number or the _errorValue; |
-+ bool add (const std::string & _name,-add an element in the Object
ejson::Value* _value);
Parameter [input]: | _name | name of the object | -Parameter [input]: | _value | Element to add | -
Return: | false if an error occured |
-+ bool addString (const std::string & _name,-add a string element in the Object (automatic creation)
const std::string & _value);
Parameter [input]: | _name | name of the object | -Parameter [input]: | _value | string value to add | -
Return: | false if an error occured |
-+ bool addNull (const std::string & _name);-add a "null" element in the Object (automatic creation)
Parameter [input]: | _name | name of the object | -
Return: | false if an error occured |
-+ bool addBoolean (const std::string & _name,-add a boolean element in the Object (automatic creation)
bool _value);
Parameter [input]: | _name | name of the object | -Parameter [input]: | _value | boolean value to add | -
Return: | false if an error occured |
-+ bool addNumber (const std::string & _name,-add a double element in the Object (automatic creation)
double _value);
Parameter [input]: | _name | name of the object | -Parameter [input]: | _value | double value to add | -
Return: | false if an error occured |
-+ virtual bool iParse (const std::string & _data,-parse the Current node [pure VIRUAL]
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
Parameter [input]: | _data | data string to parse. | -Parameter [input] [output]: | _pos | position in the string to start parse, return the position end of parsing. | -Parameter [input]: | _caseSensitive | Request a parsion of element that is not case sensitive (all element is in low case) | -Parameter [input] [output]: | file | parsing position (line x col x) | -
Return: | false if an error occured. |
-+ virtual bool iGenerate (std::string & _data,-generate a string with the tree of the xml
size_t _indent) const;
Parameter [input] [output]: | _data | string where to add the elements | -Parameter [input]: | current | indentation of the file | -
Return: | false if an error occured. |
-+ virtual void clear ();-clear the Node
-+ virtual bool transfertIn (ejson::Value* _obj);-Tranfert all element in the element set in parameter
Parameter [input] [output]: | _obj | move all parameter in the selected element | -
Return: | true if transfer is done corectly |
-+ virtual ejson::Value* duplicate () const;-Copy the curent node and all the child in the curent one.
Return: | NULL in an error occured, the pointer on the element otherwise |
-+ String (const std::string & _value);-
+ virtual ~String ();
-# std::string m_value;-
+ void set (const std::string & _value);
+ const std::string & get () const;
+ 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 bool transfertIn (ejson::Value* _obj);
+ virtual ejson::Value* duplicate () const;
-+ejson::Value-
+--> ejson::String
-+ String (const std::string & _value);-basic element of a xml structure
-+ virtual ~String ();-destructor
-# std::string m_value;- -value of the node (for element this is the name, for text it is the inside text ...)
-+ void set (const std::string & _value);-set the value of the node.
Parameter [input]: | _value | New value of the node. | -
-+ const std::string & get () const;-get the current element Value.
Return: | the reference of the string value. |
-+ virtual bool iParse (const std::string & _data,-parse the Current node [pure VIRUAL]
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
Parameter [input]: | _data | data string to parse. | -Parameter [input] [output]: | _pos | position in the string to start parse, return the position end of parsing. | -Parameter [input]: | _caseSensitive | Request a parsion of element that is not case sensitive (all element is in low case) | -Parameter [input] [output]: | file | parsing position (line x col x) | -
Return: | false if an error occured. |
-+ virtual bool iGenerate (std::string & _data,-generate a string with the tree of the xml
size_t _indent) const;
Parameter [input] [output]: | _data | string where to add the elements | -Parameter [input]: | current | indentation of the file | -
Return: | false if an error occured. |
-+ virtual bool transfertIn (ejson::Value* _obj);-Tranfert all element in the element set in parameter
Parameter [input] [output]: | _obj | move all parameter in the selected element | -
Return: | true if transfer is done corectly |
-+ virtual ejson::Value* duplicate () const;-Copy the curent node and all the child in the curent one.
Return: | NULL in an error occured, the pointer on the element otherwise |
-+ Value ();-
+ virtual ~Value ();
-+ virtual bool iParse (const std::string & _data,-
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc) = 0;
+ virtual bool iGenerate (std::string & _data,
size_t _indent) = 0 const;
# void addIndent (std::string & _data,
size_t _indent) const;
# void drawElementParsed (char32_t _val,
const ejson::filePos & _filePos) const;
# bool checkString (char32_t _val) const;
# bool checkNumber (char32_t _val) const;
# int32_t countWhiteChar (const std::string & _data,
size_t _pos,
ejson::filePos & _filePos) const;
+ ejson::Value* toValue ();
+ const ejson::Value* toValue () const;
+ ejson::Document* toDocument ();
+ const ejson::Document* toDocument () const;
+ ejson::Array* toArray ();
+ const ejson::Array* toArray () const;
+ ejson::Object* toObject ();
+ const ejson::Object* toObject () const;
+ ejson::String* toString ();
+ const ejson::String* toString () const;
+ ejson::Number* toNumber ();
+ const ejson::Number* toNumber () const;
+ ejson::Boolean* toBoolean ();
+ const ejson::Boolean* toBoolean () const;
+ ejson::Null* toNull ();
+ const ejson::Null* toNull () const;
+ bool isDocument () const;
+ bool isArray () const;
+ bool isObject () const;
+ bool isString () const;
+ bool isNumber () const;
+ bool isBoolean () const;
+ bool isNull () const;
+ virtual void clear ();
+ virtual bool transfertIn (ejson::Value* _obj);
+ virtual ejson::Value* duplicate () const;
# bool isWhiteChar (char32_t _val);
-ejson::Value-
+--> ejson::String
+--> ejson::Null
+--> ejson::Object
+--> ejson::Boolean
+--> ejson::Number
+--> ejson::Array
-+ Value ();-basic element of a xml structure
-+ virtual ~Value ();-destructor
-+ virtual bool iParse (const std::string & _data,-parse the Current node [pure VIRUAL]
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc) = 0;
Parameter [input]: | _data | data string to parse. | -Parameter [input] [output]: | _pos | position in the string to start parse, return the position end of parsing. | -Parameter [input]: | _caseSensitive | Request a parsion of element that is not case sensitive (all element is in low case) | -Parameter [input] [output]: | file | parsing position (line x col x) | -
Return: | false if an error occured. |
-+ virtual bool iGenerate (std::string & _data,-generate a string with the tree of the xml
size_t _indent) = 0 const;
Parameter [input] [output]: | _data | string where to add the elements | -Parameter [input]: | current | indentation of the file | -
Return: | false if an error occured. |
-# void addIndent (std::string & _data,-add indentation of the string input.
size_t _indent) const;
Parameter [input] [output]: | _data | String where the indentation is done. | -Parameter [input]: | _indent | Number of tab to add at the string. | -
-# void drawElementParsed (char32_t _val,-Display the cuurent element that is curently parse.
const ejson::filePos & _filePos) const;
Parameter [input]: | _val | Char that is parsed. | -Parameter [input]: | _filePos | Position of the char in the file. | -
-# bool checkString (char32_t _val) const;-check if an name (for object named) (not : !"#$%&'()+,/;<=>?@[\]^`{|}~ \n\t\r).
Parameter [input]: | _val | Value to check the conformity. | -
-# bool checkNumber (char32_t _val) const;-check if an number -+.0123456789e).
Parameter [input]: | _val | Value to check the conformity. | -
-# int32_t countWhiteChar (const std::string & _data,-count the number of white char in the string from the specify position (stop at the first element that is not a white char)
size_t _pos,
ejson::filePos & _filePos) const;
Parameter [input]: | _data | Data to parse. | -Parameter [input]: | _pos | Start position in the string. | -Parameter [output]: | _filePos | new poistion of te file to add. | -
Return: | number of white element. |
-+ ejson::Value* toValue ();-Cast the element in a Value if it is possible.
+ const ejson::Value* toValue () const;
Return: | pointer on the class or NULL. |
-+ ejson::Document* toDocument ();-Cast the element in a Document if it is possible.
+ const ejson::Document* toDocument () const;
Return: | pointer on the class or NULL. |
-+ ejson::Array* toArray ();-Cast the element in a Array if it is possible.
+ const ejson::Array* toArray () const;
Return: | pointer on the class or NULL. |
-+ ejson::Object* toObject ();-Cast the element in a Object if it is possible.
+ const ejson::Object* toObject () const;
Return: | pointer on the class or NULL. |
-+ ejson::String* toString ();-Cast the element in a String if it is possible.
+ const ejson::String* toString () const;
Return: | pointer on the class or NULL. |
-+ ejson::Number* toNumber ();-Cast the element in a Number if it is possible.
+ const ejson::Number* toNumber () const;
Return: | pointer on the class or NULL. |
-+ ejson::Boolean* toBoolean ();-Cast the element in a Boolean if it is possible.
+ const ejson::Boolean* toBoolean () const;
Return: | pointer on the class or NULL. |
-+ ejson::Null* toNull ();-Cast the element in a Null if it is possible.
+ const ejson::Null* toNull () const;
Return: | pointer on the class or NULL. |
-+ bool isDocument () const;-check if the node is a ejson::Document
Return: | true if the node is a ejson::Document |
-+ bool isArray () const;-check if the node is a ejson::Array
Return: | true if the node is a ejson::Array |
-+ bool isObject () const;-check if the node is a ejson::Object
Return: | true if the node is a ejson::Object |
-+ bool isString () const;-check if the node is a ejson::String
Return: | true if the node is a ejson::String |
-+ bool isNumber () const;-check if the node is a ejson::Number
Return: | true if the node is a ejson::Number |
-+ bool isBoolean () const;-check if the node is a ejson::Boolean
Return: | true if the node is a ejson::Boolean |
-+ bool isNull () const;-check if the node is a ejson::Null
Return: | true if the node is a ejson::Null |
-+ virtual void clear ();-clear the Node
-+ virtual bool transfertIn (ejson::Value* _obj);-Tranfert all element in the element set in parameter
Parameter [input] [output]: | _obj | move all parameter in the selected element | -
Return: | true if transfer is done corectly |
-+ virtual ejson::Value* duplicate () const;-Copy the curent node and all the child in the curent one.
Return: | NULL in an error occured, the pointer on the element otherwise |
-# bool isWhiteChar (char32_t _val);-check if the current element is white or not : '\t' '\n' '\r' ' '
Return: | tue if it is white char |
-+ filePos ();-
+ filePos (size_t _line,
size_t _col);
+ ~filePos ();
-+ filePos & operator ++ ();-
+ filePos & operator -- ();
+ const filePos & operator += (const filePos & _obj);
+ const filePos & operator += (size_t _col);
+ const filePos & operator = (const filePos & _obj);
+ void newLine ();
+ bool check (char32_t _val);
+ void set (size_t _line,
size_t _col);
+ void clear ();
+ int32_t getCol () const;
+ int32_t getLine () const;
-+ filePos ();- -
-+ filePos (size_t _line,- -
size_t _col);
-+ ~filePos ();- -
-+ filePos & operator ++ ();- -
-+ filePos & operator -- ();- -
-+ const filePos & operator += (const filePos & _obj);- -
-+ const filePos & operator += (size_t _col);- -
-+ const filePos & operator = (const filePos & _obj);- -
-+ void newLine ();- -
-+ bool check (char32_t _val);- -
-+ void set (size_t _line,- -
size_t _col);
-+ void clear ();- -
-+ int32_t getCol () const;- -
-+ int32_t getLine () const;- -
This is the complete list of members for ejson::Array, including all inherited members.
+#include <Array.hpp>
+Public Types | |
using | iterator = ejson::iterator< ejson::Array > |
+Public Member Functions | |
Array (ememory::SharedPtr< ejson::internal::Value > _internalValue) | |
Array (const ejson::Array &_obj) | |
Array () | |
ejson::Array & | operator= (const ejson::Array &_obj) |
size_t | size () const |
ejson::Value | operator[] (size_t _id) |
const ejson::Value | operator[] (size_t _id) const |
bool | add (const ejson::Value &_element) |
void | remove (size_t _id) |
iterator | begin () |
iterator | end () |
const iterator | begin () const |
const iterator | end () const |
iterator | remove (const iterator &_it) |
![]() | |
enum ejson::valueType | getType () const |
Value (const ememory::SharedPtr< ejson::internal::Value > &_internalValue) | |
Value () | |
virtual | ~Value ()=default |
void | display () const |
bool | exist () const |
ejson::Document | toDocument () |
const ejson::Document | toDocument () const |
ejson::Array | toArray () |
const ejson::Array | toArray () const |
ejson::Object | toObject () |
const ejson::Object | toObject () const |
ejson::String | toString () |
const ejson::String | toString () const |
ejson::Number | toNumber () |
const ejson::Number | toNumber () const |
ejson::Boolean | toBoolean () |
const ejson::Boolean | toBoolean () const |
ejson::Null | toNull () |
const ejson::Null | toNull () const |
bool | isDocument () const |
bool | isArray () const |
bool | isObject () const |
bool | isString () const |
bool | isNumber () const |
bool | isBoolean () const |
bool | isNull () const |
void | clear () |
bool | transfertIn (ejson::Value &_obj) |
ejson::Value | clone () const |
std::string | generateHumanString () const |
std::string | generateMachineString () const |
+Additional Inherited Members | |
![]() | |
ememory::SharedPtr< ejson::internal::Value > | m_data |
ejson Array interface [ ... ].
+using ejson::Array::iterator = ejson::iterator<ejson::Array> | +
Specify iterator of the Array methode.
+ +ejson::Array::Array | +( | +ememory::SharedPtr< ejson::internal::Value > | +_internalValue | ) | ++ |
Constructor.
+[in] | _internalValue | Internal Value to set data |
ejson::Array::Array | +( | +const ejson::Array & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::Array::Array | +( | +) | ++ |
Constructor.
+ +bool ejson::Array::add | +( | +const ejson::Value & | +_element | ) | ++ |
add an element on the array.
+[in] | _element | element to add. |
iterator ejson::Array::begin | +( | +) | ++ |
const iterator ejson::Array::begin | +( | +) | +const | +
iterator ejson::Array::end | +( | +) | ++ |
const iterator ejson::Array::end | +( | +) | +const | +
ejson::Array& ejson::Array::operator= | +( | +const ejson::Array & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::Value ejson::Array::operator[] | +( | +size_t | +_id | ) | ++ |
get the pointer on an element reference with his ID.
+[in] | _id | Id of the element. |
const ejson::Value ejson::Array::operator[] | +( | +size_t | +_id | ) | +const | +
get the pointer on an element reference with his ID.
+[in] | _id | Id of the element. |
void ejson::Array::remove | +( | +size_t | +_id | ) | ++ |
Remove Value with his Id.
+[in] | _id | Id of the element. |
size_t ejson::Array::size | +( | +) | +const | +
get the number of sub element in the current one
+This is the complete list of members for ejson::Boolean, including all inherited members.
+#include <Boolean.hpp>
+Public Member Functions | |
Boolean (ememory::SharedPtr< ejson::internal::Value > _internalValue) | |
Boolean (const ejson::Boolean &_obj) | |
Boolean (bool _value=false) | |
ejson::Boolean & | operator= (const ejson::Boolean &_obj) |
void | set (bool _value) |
bool | get (bool _errorValue=false) const |
![]() | |
enum ejson::valueType | getType () const |
Value (const ememory::SharedPtr< ejson::internal::Value > &_internalValue) | |
Value () | |
virtual | ~Value ()=default |
void | display () const |
bool | exist () const |
ejson::Document | toDocument () |
const ejson::Document | toDocument () const |
ejson::Array | toArray () |
const ejson::Array | toArray () const |
ejson::Object | toObject () |
const ejson::Object | toObject () const |
ejson::String | toString () |
const ejson::String | toString () const |
ejson::Number | toNumber () |
const ejson::Number | toNumber () const |
ejson::Boolean | toBoolean () |
const ejson::Boolean | toBoolean () const |
ejson::Null | toNull () |
const ejson::Null | toNull () const |
bool | isDocument () const |
bool | isArray () const |
bool | isObject () const |
bool | isString () const |
bool | isNumber () const |
bool | isBoolean () const |
bool | isNull () const |
void | clear () |
bool | transfertIn (ejson::Value &_obj) |
ejson::Value | clone () const |
std::string | generateHumanString () const |
std::string | generateMachineString () const |
+Additional Inherited Members | |
![]() | |
ememory::SharedPtr< ejson::internal::Value > | m_data |
ejson Boolean interface: true/false.
+ejson::Boolean::Boolean | +( | +ememory::SharedPtr< ejson::internal::Value > | +_internalValue | ) | ++ |
Constructor.
+[in] | _internalValue | Internal Value to set data |
ejson::Boolean::Boolean | +( | +const ejson::Boolean & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::Boolean::Boolean | +( | +bool | +_value = false | ) | ++ |
Constructor.
+[in] | _value | bool value to store |
bool ejson::Boolean::get | +( | +bool | +_errorValue = false | ) | +const | +
ejson::Boolean& ejson::Boolean::operator= | +( | +const ejson::Boolean & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
void ejson::Boolean::set | +( | +bool | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node. |
This is the complete list of members for ejson::Document, including all inherited members.
+#include <Document.hpp>
+Public Member Functions | |
Document (ememory::SharedPtr< ejson::internal::Value > _internalValue) | |
Document (const ejson::Document &_obj) | |
Document () | |
ejson::Document & | operator= (const ejson::Document &_obj) |
bool | parse (const std::string &_data) |
bool | generate (std::string &_data) |
bool | load (const std::string &_file) |
bool | store (const std::string &_file) |
bool | storeSafe (const std::string &_file) |
void | setDisplayError (bool _value) |
bool | getDisplayError () |
void | displayError () |
![]() | |
Object (ememory::SharedPtr< ejson::internal::Value > _internalValue) | |
Object (const ejson::Object &_obj) | |
Object () | |
Object (const std::string &_data) | |
ejson::Object & | operator= (const ejson::Object &_obj) |
bool | valueExist (const std::string &_name) const |
ejson::Value | operator[] (const std::string &_name) |
const ejson::Value | operator[] (const std::string &_name) const |
std::vector< std::string > | getKeys () const |
size_t | size () const |
ejson::Value | operator[] (size_t _id) |
const ejson::Value | operator[] (size_t _id) const |
std::string | getKey (size_t _id) const |
bool | add (const std::string &_name, const ejson::Value &_value) |
void | remove (const std::string &_name) |
void | remove (size_t _id) |
iterator | begin () |
iterator | end () |
const iterator | begin () const |
const iterator | end () const |
iterator | remove (const iterator &_it) |
![]() | |
enum ejson::valueType | getType () const |
Value (const ememory::SharedPtr< ejson::internal::Value > &_internalValue) | |
Value () | |
virtual | ~Value ()=default |
void | display () const |
bool | exist () const |
ejson::Document | toDocument () |
const ejson::Document | toDocument () const |
ejson::Array | toArray () |
const ejson::Array | toArray () const |
ejson::Object | toObject () |
const ejson::Object | toObject () const |
ejson::String | toString () |
const ejson::String | toString () const |
ejson::Number | toNumber () |
const ejson::Number | toNumber () const |
ejson::Boolean | toBoolean () |
const ejson::Boolean | toBoolean () const |
ejson::Null | toNull () |
const ejson::Null | toNull () const |
bool | isDocument () const |
bool | isArray () const |
bool | isObject () const |
bool | isString () const |
bool | isNumber () const |
bool | isBoolean () const |
bool | isNull () const |
void | clear () |
bool | transfertIn (ejson::Value &_obj) |
ejson::Value | clone () const |
std::string | generateHumanString () const |
std::string | generateMachineString () const |
+Additional Inherited Members | |
![]() | |
using | iterator = ejson::iterator< ejson::Object > |
![]() | |
ememory::SharedPtr< ejson::internal::Value > | m_data |
ejson Document interface (acces with the file and stream).
+ejson::Document::Document | +( | +ememory::SharedPtr< ejson::internal::Value > | +_internalValue | ) | ++ |
Constructor.
+[in] | _internalValue | Internal Value to set data |
ejson::Document::Document | +( | +const ejson::Document & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::Document::Document | +( | +) | ++ |
Constructor.
+ +void ejson::Document::displayError | +( | +) | ++ |
Display error detected.
+ +bool ejson::Document::generate | +( | +std::string & | +_data | ) | ++ |
generate a string that contain the created Json
+[out] | _data | Data where the Json is stored |
bool ejson::Document::getDisplayError | +( | +) | ++ |
Get the display of the error status.
+bool ejson::Document::load | +( | +const std::string & | +_file | ) | ++ |
Load the file that might contain the Json.
+[in] | _file | Filename of the Json (compatible with etk FSNode naming) |
ejson::Document& ejson::Document::operator= | +( | +const ejson::Document & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
bool ejson::Document::parse | +( | +const std::string & | +_data | ) | ++ |
parse a string that contain an Json
+[in] | _data | Data to parse |
void ejson::Document::setDisplayError | +( | +bool | +_value | ) | ++ |
Set the display of the error when detected.
+[in] | _value | true: display error, false not display error (get it at end) |
bool ejson::Document::store | +( | +const std::string & | +_file | ) | ++ |
Store the Json in the file.
+[in] | _file | Filename of the Json (compatible with etk FSNode naming) |
bool ejson::Document::storeSafe | +( | +const std::string & | +_file | ) | ++ |
Store the Json in the file (safe mode mean that the file is store in a second file xxx.tmp and moved in the file xxx (only one mode to be really safe with filesystem ...)
+[in] | _file | Filename of the Json (compatible with etk FSNode naming) |
This is the complete list of members for ejson::FilePos, including all inherited members.
+check(char32_t _val) | ejson::FilePos | |
clear() | ejson::FilePos | |
FilePos() | ejson::FilePos | |
FilePos(size_t _line, size_t _col) | ejson::FilePos | |
getCol() const | ejson::FilePos | |
getLine() const | ejson::FilePos | |
newLine() | ejson::FilePos | |
operator++() | ejson::FilePos | |
operator+=(const FilePos &_obj) | ejson::FilePos | |
operator+=(size_t _col) | ejson::FilePos | |
operator--() | ejson::FilePos | |
operator=(const FilePos &_obj) | ejson::FilePos | |
set(size_t _line, size_t _col) | ejson::FilePos |
#include <FilePos.hpp>
+Public Member Functions | |
FilePos () | |
FilePos (size_t _line, size_t _col) | |
FilePos & | operator++ () |
FilePos & | operator-- () |
FilePos & | operator+= (const FilePos &_obj) |
FilePos & | operator+= (size_t _col) |
FilePos & | operator= (const FilePos &_obj) |
void | newLine () |
bool | check (char32_t _val) |
void | set (size_t _line, size_t _col) |
void | clear () |
size_t | getCol () const |
size_t | getLine () const |
Position in the file of the original data.
+ejson::FilePos::FilePos | +( | +) | ++ |
default contructor (set line and col at 0)
+ +ejson::FilePos::FilePos | +( | +size_t | +_line, | +
+ | + | size_t | +_col | +
+ | ) | ++ |
initialize constructor
+[in] | _line | Line in the file |
[in] | _col | Colomn in the file |
bool ejson::FilePos::check | +( | +char32_t | +_val | ) | ++ |
Check if the value is a new line and update internal property.
+[in] | _val | Char value to check |
void ejson::FilePos::clear | +( | +) | ++ |
Reset position at 0,0.
+ +size_t ejson::FilePos::getCol | +( | +) | +const | +
Get the colomn position.
+size_t ejson::FilePos::getLine | +( | +) | +const | +
Get the line number position.
+void ejson::FilePos::newLine | +( | +) | ++ |
Find a new line & reset colomn at 0.
+ +FilePos& ejson::FilePos::operator++ | +( | +) | ++ |
Increment the colomn position.
+Addition operator.
+[in] | _obj | Addition object.. |
FilePos& ejson::FilePos::operator+= | +( | +size_t | +_col | ) | ++ |
Colomn addition operator.
+[in] | _col | Number of colomn to add |
FilePos& ejson::FilePos::operator-- | +( | +) | ++ |
Decrement the colomn position.
+void ejson::FilePos::set | +( | +size_t | +_line, | +
+ | + | size_t | +_col | +
+ | ) | ++ |
Setter of specific data.
+[in] | _line | Line in the file |
[in] | _col | Colomn in the file |
This is the complete list of members for ejson::Null, including all inherited members.
+#include <Null.hpp>
+Public Member Functions | |
Null (ememory::SharedPtr< ejson::internal::Value > _internalValue) | |
Null (const ejson::Null &_obj) | |
Null () | |
ejson::Null & | operator= (const ejson::Null &_obj) |
![]() | |
enum ejson::valueType | getType () const |
Value (const ememory::SharedPtr< ejson::internal::Value > &_internalValue) | |
Value () | |
virtual | ~Value ()=default |
void | display () const |
bool | exist () const |
ejson::Document | toDocument () |
const ejson::Document | toDocument () const |
ejson::Array | toArray () |
const ejson::Array | toArray () const |
ejson::Object | toObject () |
const ejson::Object | toObject () const |
ejson::String | toString () |
const ejson::String | toString () const |
ejson::Number | toNumber () |
const ejson::Number | toNumber () const |
ejson::Boolean | toBoolean () |
const ejson::Boolean | toBoolean () const |
ejson::Null | toNull () |
const ejson::Null | toNull () const |
bool | isDocument () const |
bool | isArray () const |
bool | isObject () const |
bool | isString () const |
bool | isNumber () const |
bool | isBoolean () const |
bool | isNull () const |
void | clear () |
bool | transfertIn (ejson::Value &_obj) |
ejson::Value | clone () const |
std::string | generateHumanString () const |
std::string | generateMachineString () const |
+Additional Inherited Members | |
![]() | |
ememory::SharedPtr< ejson::internal::Value > | m_data |
ejson Null interface: 'null'.
+ejson::Null::Null | +( | +ememory::SharedPtr< ejson::internal::Value > | +_internalValue | ) | ++ |
Constructor.
+[in] | _internalValue | Internal Value to set data |
ejson::Null::Null | +( | +const ejson::Null & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::Null::Null | +( | +) | ++ |
Constructor.
+ +ejson::Null& ejson::Null::operator= | +( | +const ejson::Null & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
This is the complete list of members for ejson::Number, including all inherited members.
+#include <Number.hpp>
+Public Member Functions | |
Number (ememory::SharedPtr< ejson::internal::Value > _internalValue) | |
Number (const ejson::Number &_obj) | |
Number (double _value=0.0) | |
ejson::Number & | operator= (const ejson::Number &_obj) |
void | set (double _value) |
void | set (uint64_t _value) |
void | set (int64_t _value) |
double | get (double _errorValue=0.0) const |
uint64_t | getU64 (uint64_t _errorValue=0) const |
int64_t | getI64 (int64_t _errorValue=0) const |
+ejson::internal::Number::type | getType () const |
![]() | |
enum ejson::valueType | getType () const |
Value (const ememory::SharedPtr< ejson::internal::Value > &_internalValue) | |
Value () | |
virtual | ~Value ()=default |
void | display () const |
bool | exist () const |
ejson::Document | toDocument () |
const ejson::Document | toDocument () const |
ejson::Array | toArray () |
const ejson::Array | toArray () const |
ejson::Object | toObject () |
const ejson::Object | toObject () const |
ejson::String | toString () |
const ejson::String | toString () const |
ejson::Number | toNumber () |
const ejson::Number | toNumber () const |
ejson::Boolean | toBoolean () |
const ejson::Boolean | toBoolean () const |
ejson::Null | toNull () |
const ejson::Null | toNull () const |
bool | isDocument () const |
bool | isArray () const |
bool | isObject () const |
bool | isString () const |
bool | isNumber () const |
bool | isBoolean () const |
bool | isNull () const |
void | clear () |
bool | transfertIn (ejson::Value &_obj) |
ejson::Value | clone () const |
std::string | generateHumanString () const |
std::string | generateMachineString () const |
+Additional Inherited Members | |
![]() | |
ememory::SharedPtr< ejson::internal::Value > | m_data |
ejson Number interface.
+ejson::Number::Number | +( | +ememory::SharedPtr< ejson::internal::Value > | +_internalValue | ) | ++ |
Constructor.
+[in] | _internalValue | Internal Value to set data |
ejson::Number::Number | +( | +const ejson::Number & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::Number::Number | +( | +double | +_value = 0.0 | ) | ++ |
Constructor.
+[in] | _value | number value |
double ejson::Number::get | +( | +double | +_errorValue = 0.0 | ) | +const | +
int64_t ejson::Number::getI64 | +( | +int64_t | +_errorValue = 0 | ) | +const | +
uint64_t ejson::Number::getU64 | +( | +uint64_t | +_errorValue = 0 | ) | +const | +
ejson::Number& ejson::Number::operator= | +( | +const ejson::Number & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
void ejson::Number::set | +( | +double | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node. |
void ejson::Number::set | +( | +uint64_t | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node (integer mode). |
void ejson::Number::set | +( | +int64_t | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node (integer mode). |
This is the complete list of members for ejson::Object, including all inherited members.
+#include <Object.hpp>
+Public Types | |
using | iterator = ejson::iterator< ejson::Object > |
+Public Member Functions | |
Object (ememory::SharedPtr< ejson::internal::Value > _internalValue) | |
Object (const ejson::Object &_obj) | |
Object () | |
Object (const std::string &_data) | |
ejson::Object & | operator= (const ejson::Object &_obj) |
bool | valueExist (const std::string &_name) const |
ejson::Value | operator[] (const std::string &_name) |
const ejson::Value | operator[] (const std::string &_name) const |
std::vector< std::string > | getKeys () const |
size_t | size () const |
ejson::Value | operator[] (size_t _id) |
const ejson::Value | operator[] (size_t _id) const |
std::string | getKey (size_t _id) const |
bool | add (const std::string &_name, const ejson::Value &_value) |
void | remove (const std::string &_name) |
void | remove (size_t _id) |
iterator | begin () |
iterator | end () |
const iterator | begin () const |
const iterator | end () const |
iterator | remove (const iterator &_it) |
![]() | |
enum ejson::valueType | getType () const |
Value (const ememory::SharedPtr< ejson::internal::Value > &_internalValue) | |
Value () | |
virtual | ~Value ()=default |
void | display () const |
bool | exist () const |
ejson::Document | toDocument () |
const ejson::Document | toDocument () const |
ejson::Array | toArray () |
const ejson::Array | toArray () const |
ejson::Object | toObject () |
const ejson::Object | toObject () const |
ejson::String | toString () |
const ejson::String | toString () const |
ejson::Number | toNumber () |
const ejson::Number | toNumber () const |
ejson::Boolean | toBoolean () |
const ejson::Boolean | toBoolean () const |
ejson::Null | toNull () |
const ejson::Null | toNull () const |
bool | isDocument () const |
bool | isArray () const |
bool | isObject () const |
bool | isString () const |
bool | isNumber () const |
bool | isBoolean () const |
bool | isNull () const |
void | clear () |
bool | transfertIn (ejson::Value &_obj) |
ejson::Value | clone () const |
std::string | generateHumanString () const |
std::string | generateMachineString () const |
+Additional Inherited Members | |
![]() | |
ememory::SharedPtr< ejson::internal::Value > | m_data |
ejson Object interface { ... }.
+using ejson::Object::iterator = ejson::iterator<ejson::Object> | +
Specify iterator of the Object methode.
+ +ejson::Object::Object | +( | +ememory::SharedPtr< ejson::internal::Value > | +_internalValue | ) | ++ |
Constructor.
+[in] | _internalValue | Internal Value to set data |
ejson::Object::Object | +( | +const ejson::Object & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::Object::Object | +( | +) | ++ |
Constructor.
+ +ejson::Object::Object | +( | +const std::string & | +_data | ) | ++ |
Constructor.
+[in] | _data | string data to parse |
bool ejson::Object::add | +( | +const std::string & | +_name, | +
+ | + | const ejson::Value & | +_value | +
+ | ) | ++ |
add an element in the Object
+[in] | _name | name of the object |
[in] | _value | Element to add |
iterator ejson::Object::begin | +( | +) | ++ |
const iterator ejson::Object::begin | +( | +) | +const | +
iterator ejson::Object::end | +( | +) | ++ |
const iterator ejson::Object::end | +( | +) | +const | +
std::string ejson::Object::getKey | +( | +size_t | +_id | ) | +const | +
Get the element name (key).
+[in] | _id | Id of the element. |
std::vector<std::string> ejson::Object::getKeys | +( | +) | +const | +
Get all the element name (keys).
+ejson::Object& ejson::Object::operator= | +( | +const ejson::Object & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::Value ejson::Object::operator[] | +( | +const std::string & | +_name | ) | ++ |
Cet the sub element with his name (no cast check)
+[in] | _name | Name of the object |
const ejson::Value ejson::Object::operator[] | +( | +const std::string & | +_name | ) | +const | +
Get the const sub element with his name (no cast check)
+[in] | _name | Name of the object |
ejson::Value ejson::Object::operator[] | +( | +size_t | +_id | ) | ++ |
Get the value on an element reference with his ID.
+[in] | _id | Id of the element. |
const ejson::Value ejson::Object::operator[] | +( | +size_t | +_id | ) | +const | +
Get the const value on an element reference with his ID.
+[in] | _id | Id of the element. |
void ejson::Object::remove | +( | +const std::string & | +_name | ) | ++ |
Remove Value with his name.
+[in] | _name | Name of the object |
void ejson::Object::remove | +( | +size_t | +_id | ) | ++ |
Remove Value with his id.
+[in] | _id | Id of the element. |
size_t ejson::Object::size | +( | +) | +const | +
get the number of sub element in the current one
+bool ejson::Object::valueExist | +( | +const std::string & | +_name | ) | +const | +
check if an element exist.
+[in] | _name | Name of the object. |
This is the complete list of members for ejson::String, including all inherited members.
+#include <String.hpp>
+Public Member Functions | |
String (ememory::SharedPtr< ejson::internal::Value > _internalValue) | |
String (const ejson::String &_obj) | |
String (const std::string &_value="") | |
ejson::String & | operator= (const ejson::String &_obj) |
void | set (const std::string &_value) |
std::string | get (const std::string &_errorValue="") const |
![]() | |
enum ejson::valueType | getType () const |
Value (const ememory::SharedPtr< ejson::internal::Value > &_internalValue) | |
Value () | |
virtual | ~Value ()=default |
void | display () const |
bool | exist () const |
ejson::Document | toDocument () |
const ejson::Document | toDocument () const |
ejson::Array | toArray () |
const ejson::Array | toArray () const |
ejson::Object | toObject () |
const ejson::Object | toObject () const |
ejson::String | toString () |
const ejson::String | toString () const |
ejson::Number | toNumber () |
const ejson::Number | toNumber () const |
ejson::Boolean | toBoolean () |
const ejson::Boolean | toBoolean () const |
ejson::Null | toNull () |
const ejson::Null | toNull () const |
bool | isDocument () const |
bool | isArray () const |
bool | isObject () const |
bool | isString () const |
bool | isNumber () const |
bool | isBoolean () const |
bool | isNull () const |
void | clear () |
bool | transfertIn (ejson::Value &_obj) |
ejson::Value | clone () const |
std::string | generateHumanString () const |
std::string | generateMachineString () const |
+Additional Inherited Members | |
![]() | |
ememory::SharedPtr< ejson::internal::Value > | m_data |
ejson String interface.
+ejson::String::String | +( | +ememory::SharedPtr< ejson::internal::Value > | +_internalValue | ) | ++ |
Constructor.
+[in] | _internalValue | Internal Value to set data |
ejson::String::String | +( | +const ejson::String & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
ejson::String::String | +( | +const std::string & | +_value = "" | ) | ++ |
Constructor.
+[in] | _value | String value to set |
std::string ejson::String::get | +( | +const std::string & | +_errorValue = "" | ) | +const | +
get the current element Value.
+[in] | _errorValue | The return value if an error occured. |
ejson::String& ejson::String::operator= | +( | +const ejson::String & | +_obj | ) | ++ |
Copy constructor.
+[in] | _obj | Object to copy |
void ejson::String::set | +( | +const std::string & | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node. |
This is the complete list of members for ejson::Value, including all inherited members.
+#include <Value.hpp>
+Protected Attributes | |
ememory::SharedPtr< ejson::internal::Value > | m_data |
+Friends | |
+class | ejson::Array |
+class | ejson::Object |
Basic main object of all json elements.
+ejson::Value::Value | +( | +const ememory::SharedPtr< ejson::internal::Value > & | +_internalValue | ) | ++ |
basic element of a xml structure
+[in] | _internalValue | Internal reference of the Value. |
ejson::Value::Value | +( | +) | ++ |
basic element of a xml structure
+ +
+
|
+ +virtualdefault | +
Virtualize destructor.
+ +void ejson::Value::clear | +( | +) | ++ |
clear the Node
+ +ejson::Value ejson::Value::clone | +( | +) | +const | +
Copy the curent node and all the child in the curent one.
+void ejson::Value::display | +( | +) | +const | +
Display the Document on console.
+ +bool ejson::Value::exist | +( | +) | +const | +
Check if the element exit.
+std::string ejson::Value::generateHumanString | +( | +) | +const | +
generate a string that contain the created JSON
+std::string ejson::Value::generateMachineString | +( | +) | +const | +
generate a string that contain the created JSON
+enum ejson::valueType ejson::Value::getType | +( | +) | +const | +
Get Value type.
+bool ejson::Value::isArray | +( | +) | +const | +
check if the node is a ejson::Array
+bool ejson::Value::isBoolean | +( | +) | +const | +
check if the node is a ejson::Boolean
+bool ejson::Value::isDocument | +( | +) | +const | +
check if the node is a ejson::Document
+bool ejson::Value::isNull | +( | +) | +const | +
check if the node is a ejson::Null
+bool ejson::Value::isNumber | +( | +) | +const | +
check if the node is a ejson::Number
+bool ejson::Value::isObject | +( | +) | +const | +
check if the node is a ejson::Object
+bool ejson::Value::isString | +( | +) | +const | +
check if the node is a ejson::String
+ejson::Array ejson::Value::toArray | +( | +) | ++ |
Cast the element in a Array if it is possible.
+const ejson::Array ejson::Value::toArray | +( | +) | +const | +
Cast the element in a Array if it is possible.
+ejson::Boolean ejson::Value::toBoolean | +( | +) | ++ |
Cast the element in a Boolean if it is possible.
+const ejson::Boolean ejson::Value::toBoolean | +( | +) | +const | +
Cast the element in a Boolean if it is possible.
+ejson::Document ejson::Value::toDocument | +( | +) | ++ |
Cast the element in a Document if it is possible.
+const ejson::Document ejson::Value::toDocument | +( | +) | +const | +
Cast the element in a Document if it is possible.
+ejson::Null ejson::Value::toNull | +( | +) | ++ |
Cast the element in a Null if it is possible.
+const ejson::Null ejson::Value::toNull | +( | +) | +const | +
Cast the element in a Null if it is possible.
+ejson::Number ejson::Value::toNumber | +( | +) | ++ |
Cast the element in a Number if it is possible.
+const ejson::Number ejson::Value::toNumber | +( | +) | +const | +
Cast the element in a Number if it is possible.
+ejson::Object ejson::Value::toObject | +( | +) | ++ |
Cast the element in a Object if it is possible.
+const ejson::Object ejson::Value::toObject | +( | +) | +const | +
Cast the element in a Object if it is possible.
+ejson::String ejson::Value::toString | +( | +) | ++ |
Cast the element in a String if it is possible.
+const ejson::String ejson::Value::toString | +( | +) | +const | +
Cast the element in a String if it is possible.
+bool ejson::Value::transfertIn | +( | +ejson::Value & | +_obj | ) | ++ |
Tranfert all element in the element set in parameter.
+[in,out] | _obj | move all parameter in the selected element |
+
|
+ +protected | +
internal reference on a Value
+ +This is the complete list of members for ejson::internal::Array, including all inherited members.
+#include <Array.hpp>
+Public Member Functions | |
size_t | size () const |
ememory::SharedPtr< ejson::internal::Value > | get (size_t _id) |
const ememory::SharedPtr< ejson::internal::Value > | get (size_t _id) const |
bool | add (ememory::SharedPtr< ejson::internal::Value > _element) |
void | remove (size_t _id) |
bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override |
bool | iGenerate (std::string &_data, size_t _indent) const override |
void | iMachineGenerate (std::string &_data) const override |
void | clear () override |
bool | transfertIn (ememory::SharedPtr< ejson::internal::Value > _obj) override |
ememory::SharedPtr< ejson::internal::Value > | clone () const override |
![]() | |
enum ejson::valueType | getType () const |
virtual | ~Value () |
void | display () const |
![]() | |
+ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () |
+const ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () const |
+ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () |
+const ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () const |
+Static Public Member Functions | |
static ememory::SharedPtr< Array > | create () |
+Protected Member Functions | |
Array () | |
![]() | |
Value () | |
void | addIndent (std::string &_data, int32_t _indent) const |
void | drawElementParsed (char32_t _val, const ejson::FilePos &_filePos) const |
bool | checkString (char32_t _val) const |
bool | checkNumber (char32_t _val) const |
int32_t | countWhiteChar (const std::string &_data, size_t _pos, ejson::FilePos &_filePos) const |
+Additional Inherited Members | |
![]() | |
static bool | isWhiteChar (char32_t _val) |
![]() | |
enum ejson::valueType | m_type |
ejson Array internal data implementation.
+
+
|
+ +inlineprotected | +
basic element of a xml structure
+ +bool ejson::internal::Array::add | +( | +ememory::SharedPtr< ejson::internal::Value > | +_element | ) | ++ |
add an element on the array.
+[in] | _element | element to add. |
+
|
+ +overridevirtual | +
clear the Node
+ +Reimplemented from ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
Copy the curent node and all the child in the curent one.
+Reimplemented from ejson::internal::Value.
+ +
+
|
+ +static | +
Create factory on the ejson::internal::Array.
+ememory::SharedPtr<ejson::internal::Value> ejson::internal::Array::get | +( | +size_t | +_id | ) | ++ |
get the pointer on an element reference with his ID.
+[in] | _id | Id of the element. |
const ememory::SharedPtr<ejson::internal::Value> ejson::internal::Array::get | +( | +size_t | +_id | ) | +const | +
get the const pointer on an element reference with his ID.
+[in] | _id | Id of the element. |
+
|
+ +overridevirtual | +
generate a string with the tree of the json
+[in,out] | _data | string where to add the elements |
[in] | _indent | current indentation of the file |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
generate a string with the tree of the json (not human readable ==> for computer transfer)
+[in,out] | _data | string where to add the elements |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
parse the Current node [pure VIRUAL]
+[in] | _data | data string to parse. |
[in,out] | _pos | position in the string to start parse, return the position end of parsing. |
[in,out] | _filePos | Position in the file (in X/Y) |
[in,out] | _doc | Reference on the main document |
Implements ejson::internal::Value.
+ +void ejson::internal::Array::remove | +( | +size_t | +_id | ) | ++ |
Remove Value with his Id.
+[in] | _id | Id of the element. |
size_t ejson::internal::Array::size | +( | +) | +const | +
get the number of sub element in the current one
+
+
|
+ +overridevirtual | +
Tranfert all element in the element set in parameter.
+[in,out] | _obj | move all parameter in the selected element |
Reimplemented from ejson::internal::Value.
+ +This is the complete list of members for ejson::internal::Boolean, including all inherited members.
+#include <Boolean.hpp>
+Public Member Functions | |
void | set (bool _value) |
bool | get () const |
bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override |
bool | iGenerate (std::string &_data, size_t _indent) const override |
void | iMachineGenerate (std::string &_data) const override |
bool | transfertIn (ememory::SharedPtr< ejson::internal::Value > _obj) override |
ememory::SharedPtr< ejson::internal::Value > | clone () const override |
![]() | |
enum ejson::valueType | getType () const |
virtual | ~Value () |
void | display () const |
virtual void | clear () |
![]() | |
+ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () |
+const ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () const |
+ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () |
+const ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () const |
+Static Public Member Functions | |
static ememory::SharedPtr< Boolean > | create (bool _value=false) |
+Protected Member Functions | |
Boolean (bool _value=false) | |
![]() | |
Value () | |
void | addIndent (std::string &_data, int32_t _indent) const |
void | drawElementParsed (char32_t _val, const ejson::FilePos &_filePos) const |
bool | checkString (char32_t _val) const |
bool | checkNumber (char32_t _val) const |
int32_t | countWhiteChar (const std::string &_data, size_t _pos, ejson::FilePos &_filePos) const |
+Protected Attributes | |
bool | m_value |
![]() | |
enum ejson::valueType | m_type |
+Additional Inherited Members | |
![]() | |
static bool | isWhiteChar (char32_t _val) |
ejson Boolean internal data implementation.
+
+
|
+ +protected | +
basic element of a xml structure
+[in] | _value | Value to set on the Element |
+
|
+ +overridevirtual | +
Copy the curent node and all the child in the curent one.
+Reimplemented from ejson::internal::Value.
+ +
+
|
+ +static | +
Create factory on the ejson::internal::Boolean.
+[in] | _value | Value to set on the ejson::Value |
bool ejson::internal::Boolean::get | +( | +) | +const | +
get the current element Value.
+
+
|
+ +overridevirtual | +
generate a string with the tree of the json
+[in,out] | _data | string where to add the elements |
[in] | _indent | current indentation of the file |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
generate a string with the tree of the json (not human readable ==> for computer transfer)
+[in,out] | _data | string where to add the elements |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
parse the Current node [pure VIRUAL]
+[in] | _data | data string to parse. |
[in,out] | _pos | position in the string to start parse, return the position end of parsing. |
[in,out] | _filePos | Position in the file (in X/Y) |
[in,out] | _doc | Reference on the main document |
Implements ejson::internal::Value.
+ +void ejson::internal::Boolean::set | +( | +bool | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node. |
+
|
+ +overridevirtual | +
Tranfert all element in the element set in parameter.
+[in,out] | _obj | move all parameter in the selected element |
Reimplemented from ejson::internal::Value.
+ +
+
|
+ +protected | +
value of the node
+ +This is the complete list of members for ejson::internal::Document, including all inherited members.
+#include <Document.hpp>
+Public Member Functions | |
Document () | |
bool | parse (const std::string &_data) |
bool | generate (std::string &_data) |
bool | load (const std::string &_file) |
bool | store (const std::string &_file) |
void | setDisplayError (bool _value) |
bool | getDisplayError () |
void | displayError () |
void | createError (const std::string &_data, size_t _pos, const ejson::FilePos &_filePos, const std::string &_comment) |
bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override |
bool | iGenerate (std::string &_data, size_t _indent) const override |
![]() | |
bool | exist (const std::string &_name) const |
ememory::SharedPtr< ejson::internal::Value > | get (const std::string &_name) |
const ememory::SharedPtr< ejson::internal::Value > | get (const std::string &_name) const |
std::vector< std::string > | getKeys () const |
size_t | size () const |
ememory::SharedPtr< ejson::internal::Value > | get (size_t _id) |
const ememory::SharedPtr< ejson::internal::Value > | get (size_t _id) const |
std::string | getKey (size_t _id) const |
bool | add (const std::string &_name, ememory::SharedPtr< ejson::internal::Value > _value) |
void | remove (const std::string &_name) |
void | remove (size_t _id) |
bool | cloneIn (ememory::SharedPtr< ejson::internal::Object > &_obj) const |
ememory::SharedPtr< ejson::internal::Object > | cloneObj () const |
bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override |
bool | iGenerate (std::string &_data, size_t _indent) const override |
void | iMachineGenerate (std::string &_data) const override |
void | clear () override |
bool | transfertIn (ememory::SharedPtr< ejson::internal::Value > _obj) override |
ememory::SharedPtr< ejson::internal::Value > | clone () const override |
![]() | |
enum ejson::valueType | getType () const |
virtual | ~Value () |
void | display () const |
![]() | |
+ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () |
+const ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () const |
+ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () |
+const ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () const |
+Static Public Member Functions | |
static ememory::SharedPtr< Document > | create () |
![]() | |
static ememory::SharedPtr< Object > | create () |
static ememory::SharedPtr< Object > | create (const std::string &_data) |
+Additional Inherited Members | |
![]() | |
Object () | |
![]() | |
Value () | |
void | addIndent (std::string &_data, int32_t _indent) const |
void | drawElementParsed (char32_t _val, const ejson::FilePos &_filePos) const |
bool | checkString (char32_t _val) const |
bool | checkNumber (char32_t _val) const |
int32_t | countWhiteChar (const std::string &_data, size_t _pos, ejson::FilePos &_filePos) const |
![]() | |
static bool | isWhiteChar (char32_t _val) |
![]() | |
etk::Hash< ememory::SharedPtr< ejson::internal::Value > > | m_value |
![]() | |
enum ejson::valueType | m_type |
ejson Document internal data implementation.
+ejson::internal::Document::Document | +( | +) | ++ |
Constructor.
+ +
+
|
+ +static | +
Create factory on the ejson::internal::Document.
+void ejson::internal::Document::createError | +( | +const std::string & | +_data, | +
+ | + | size_t | +_pos, | +
+ | + | const ejson::FilePos & | +_filePos, | +
+ | + | const std::string & | +_comment | +
+ | ) | ++ |
When parsing a subParser create an error that might be write later.
+[in] | _data | Wall File or stream |
[in] | _pos | Position in the file (in nb char) |
[in] | _filePos | Position in x/y in the file |
[in] | _comment | Help coment |
void ejson::internal::Document::displayError | +( | +) | ++ |
Display error detected.
+ +bool ejson::internal::Document::generate | +( | +std::string & | +_data | ) | ++ |
generate a string that contain the created XML
+[out] | _data | Data where the xml is stored |
bool ejson::internal::Document::getDisplayError | +( | +) | ++ |
Get the display of the error status.
+
+
|
+ +overridevirtual | +
generate a string with the tree of the json
+[in,out] | _data | string where to add the elements |
[in] | _indent | current indentation of the file |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
parse the Current node [pure VIRUAL]
+[in] | _data | data string to parse. |
[in,out] | _pos | position in the string to start parse, return the position end of parsing. |
[in,out] | _filePos | Position in the file (in X/Y) |
[in,out] | _doc | Reference on the main document |
Implements ejson::internal::Value.
+ +bool ejson::internal::Document::load | +( | +const std::string & | +_file | ) | ++ |
Load the file that might contain the xml.
+[in] | _file | Filename of the xml (compatible with etk FSNode naming) |
bool ejson::internal::Document::parse | +( | +const std::string & | +_data | ) | ++ |
parse a string that contain an XML
+[in] | _data | Data to parse |
void ejson::internal::Document::setDisplayError | +( | +bool | +_value | ) | ++ |
Set the display of the error when detected.
+[in] | _value | true: display error, false not display error (get it at end) |
bool ejson::internal::Document::store | +( | +const std::string & | +_file | ) | ++ |
Store the Xml in the file.
+[in] | _file | Filename of the xml (compatible with etk FSNode naming) |
This is the complete list of members for ejson::internal::Null, including all inherited members.
+#include <Null.hpp>
+Public Member Functions | |
bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override |
bool | iGenerate (std::string &_data, size_t _indent) const override |
void | iMachineGenerate (std::string &_data) const override |
bool | transfertIn (ememory::SharedPtr< ejson::internal::Value > _obj) override |
ememory::SharedPtr< ejson::internal::Value > | clone () const override |
![]() | |
enum ejson::valueType | getType () const |
virtual | ~Value () |
void | display () const |
virtual void | clear () |
![]() | |
+ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () |
+const ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () const |
+ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () |
+const ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () const |
+Static Public Member Functions | |
static ememory::SharedPtr< Null > | create () |
+Protected Member Functions | |
Null () | |
![]() | |
Value () | |
void | addIndent (std::string &_data, int32_t _indent) const |
void | drawElementParsed (char32_t _val, const ejson::FilePos &_filePos) const |
bool | checkString (char32_t _val) const |
bool | checkNumber (char32_t _val) const |
int32_t | countWhiteChar (const std::string &_data, size_t _pos, ejson::FilePos &_filePos) const |
+Additional Inherited Members | |
![]() | |
static bool | isWhiteChar (char32_t _val) |
![]() | |
enum ejson::valueType | m_type |
ejson Null internal data implementation.
+
+
|
+ +protected | +
basic element of a xml structure
+ +
+
|
+ +overridevirtual | +
Copy the curent node and all the child in the curent one.
+Reimplemented from ejson::internal::Value.
+ +
+
|
+ +static | +
Create factory on the ejson::internal::Null.
+
+
|
+ +overridevirtual | +
generate a string with the tree of the json
+[in,out] | _data | string where to add the elements |
[in] | _indent | current indentation of the file |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
generate a string with the tree of the json (not human readable ==> for computer transfer)
+[in,out] | _data | string where to add the elements |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
parse the Current node [pure VIRUAL]
+[in] | _data | data string to parse. |
[in,out] | _pos | position in the string to start parse, return the position end of parsing. |
[in,out] | _filePos | Position in the file (in X/Y) |
[in,out] | _doc | Reference on the main document |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
Tranfert all element in the element set in parameter.
+[in,out] | _obj | move all parameter in the selected element |
Reimplemented from ejson::internal::Value.
+ +This is the complete list of members for ejson::internal::Number, including all inherited members.
+#include <Number.hpp>
+Public Types | |
enum | type { tDouble, +tInt, +tUint + } |
+Public Member Functions | |
+ejson::internal::Number::type | getType () const |
void | set (double _value) |
void | set (int64_t _value) |
void | set (uint64_t _value) |
double | get () const |
uint64_t | getU64 () const |
int64_t | getI64 () const |
bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override |
bool | iGenerate (std::string &_data, size_t _indent) const override |
void | iMachineGenerate (std::string &_data) const override |
bool | transfertIn (ememory::SharedPtr< ejson::internal::Value > _obj) override |
ememory::SharedPtr< ejson::internal::Value > | clone () const override |
![]() | |
enum ejson::valueType | getType () const |
virtual | ~Value () |
void | display () const |
virtual void | clear () |
![]() | |
+ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () |
+const ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () const |
+ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () |
+const ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () const |
+Static Public Member Functions | |
static ememory::SharedPtr< Number > | create (uint64_t _value=0) |
+static ememory::SharedPtr< Number > | create (int64_t _value) |
+static ememory::SharedPtr< Number > | create (double _value) |
+Protected Member Functions | |
Number (uint64_t _value=0) | |
+ | Number (int64_t _value) |
+ | Number (double _value) |
![]() | |
Value () | |
void | addIndent (std::string &_data, int32_t _indent) const |
void | drawElementParsed (char32_t _val, const ejson::FilePos &_filePos) const |
bool | checkString (char32_t _val) const |
bool | checkNumber (char32_t _val) const |
int32_t | countWhiteChar (const std::string &_data, size_t _pos, ejson::FilePos &_filePos) const |
+Protected Attributes | |
+type | m_typeNumber |
+union { | |
double m_value | |
uint64_t m_valueU64 | |
int64_t m_valueI64 | |
}; | |
![]() | |
enum ejson::valueType | m_type |
+Additional Inherited Members | |
![]() | |
static bool | isWhiteChar (char32_t _val) |
ejson Number internal data implementation.
+
+
|
+ +protected | +
basic element of a xml structure
+[in] | _value | Value to set on the ejson::Value |
+
|
+ +overridevirtual | +
Copy the curent node and all the child in the curent one.
+Reimplemented from ejson::internal::Value.
+ +
+
|
+ +static | +
Create factory on the ejson::internal::Number.
+[in] | _value | Value to set on the ejson::Value |
double ejson::internal::Number::get | +( | +) | +const | +
Get the current element Value.
+int64_t ejson::internal::Number::getI64 | +( | +) | +const | +
Get the current element Value.
+uint64_t ejson::internal::Number::getU64 | +( | +) | +const | +
Get the current element Value.
+
+
|
+ +overridevirtual | +
generate a string with the tree of the json
+[in,out] | _data | string where to add the elements |
[in] | _indent | current indentation of the file |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
generate a string with the tree of the json (not human readable ==> for computer transfer)
+[in,out] | _data | string where to add the elements |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
parse the Current node [pure VIRUAL]
+[in] | _data | data string to parse. |
[in,out] | _pos | position in the string to start parse, return the position end of parsing. |
[in,out] | _filePos | Position in the file (in X/Y) |
[in,out] | _doc | Reference on the main document |
Implements ejson::internal::Value.
+ +void ejson::internal::Number::set | +( | +double | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node. |
void ejson::internal::Number::set | +( | +int64_t | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node. |
void ejson::internal::Number::set | +( | +uint64_t | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node. |
+
|
+ +overridevirtual | +
Tranfert all element in the element set in parameter.
+[in,out] | _obj | move all parameter in the selected element |
Reimplemented from ejson::internal::Value.
+ +double ejson::internal::Number::m_value | +
value of the node
+ +int64_t ejson::internal::Number::m_valueI64 | +
value of the node
+ +uint64_t ejson::internal::Number::m_valueU64 | +
value of the node
+ +This is the complete list of members for ejson::internal::Object, including all inherited members.
+#include <Object.hpp>
+Public Member Functions | |
bool | exist (const std::string &_name) const |
ememory::SharedPtr< ejson::internal::Value > | get (const std::string &_name) |
const ememory::SharedPtr< ejson::internal::Value > | get (const std::string &_name) const |
std::vector< std::string > | getKeys () const |
size_t | size () const |
ememory::SharedPtr< ejson::internal::Value > | get (size_t _id) |
const ememory::SharedPtr< ejson::internal::Value > | get (size_t _id) const |
std::string | getKey (size_t _id) const |
bool | add (const std::string &_name, ememory::SharedPtr< ejson::internal::Value > _value) |
void | remove (const std::string &_name) |
void | remove (size_t _id) |
bool | cloneIn (ememory::SharedPtr< ejson::internal::Object > &_obj) const |
ememory::SharedPtr< ejson::internal::Object > | cloneObj () const |
bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override |
bool | iGenerate (std::string &_data, size_t _indent) const override |
void | iMachineGenerate (std::string &_data) const override |
void | clear () override |
bool | transfertIn (ememory::SharedPtr< ejson::internal::Value > _obj) override |
ememory::SharedPtr< ejson::internal::Value > | clone () const override |
![]() | |
enum ejson::valueType | getType () const |
virtual | ~Value () |
void | display () const |
![]() | |
+ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () |
+const ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () const |
+ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () |
+const ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () const |
+Static Public Member Functions | |
static ememory::SharedPtr< Object > | create () |
static ememory::SharedPtr< Object > | create (const std::string &_data) |
+Protected Member Functions | |
Object () | |
![]() | |
Value () | |
void | addIndent (std::string &_data, int32_t _indent) const |
void | drawElementParsed (char32_t _val, const ejson::FilePos &_filePos) const |
bool | checkString (char32_t _val) const |
bool | checkNumber (char32_t _val) const |
int32_t | countWhiteChar (const std::string &_data, size_t _pos, ejson::FilePos &_filePos) const |
+Protected Attributes | |
etk::Hash< ememory::SharedPtr< ejson::internal::Value > > | m_value |
![]() | |
enum ejson::valueType | m_type |
+Additional Inherited Members | |
![]() | |
static bool | isWhiteChar (char32_t _val) |
ejson Object internal data implementation.
+
+
|
+ +inlineprotected | +
basic element of a xml structure
+ +bool ejson::internal::Object::add | +( | +const std::string & | +_name, | +
+ | + | ememory::SharedPtr< ejson::internal::Value > | +_value | +
+ | ) | ++ |
add an element in the Object
+[in] | _name | name of the object |
[in] | _value | Element to add |
+
|
+ +overridevirtual | +
clear the Node
+ +Reimplemented from ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
Copy the curent node and all the child in the curent one.
+Reimplemented from ejson::internal::Value.
+ +bool ejson::internal::Object::cloneIn | +( | +ememory::SharedPtr< ejson::internal::Object > & | +_obj | ) | +const | +
Clone the current object in an other Object.
+[in] | _obj | Other object ot overwride |
ememory::SharedPtr<ejson::internal::Object> ejson::internal::Object::cloneObj | +( | +) | +const | +
Clone the current object.
+
+
|
+ +static | +
Create factory on the ejson::internal::Object.
+
+
|
+ +static | +
Create factory on the ejson::internal::Object.
+[in] | _data | Json stream to parse and interprete |
bool ejson::internal::Object::exist | +( | +const std::string & | +_name | ) | +const | +
check if an element exist.
+[in] | _name | name of the object. |
ememory::SharedPtr<ejson::internal::Value> ejson::internal::Object::get | +( | +const std::string & | +_name | ) | ++ |
get the sub element with his name (no cast check)
+[in] | _name | name of the object |
const ememory::SharedPtr<ejson::internal::Value> ejson::internal::Object::get | +( | +const std::string & | +_name | ) | +const | +
get the sub element with his name (no cast check)
+[in] | _name | name of the object |
ememory::SharedPtr<ejson::internal::Value> ejson::internal::Object::get | +( | +size_t | +_id | ) | ++ |
get the pointer on an element reference with his ID.
+[in] | _id | Id of the element. |
const ememory::SharedPtr<ejson::internal::Value> ejson::internal::Object::get | +( | +size_t | +_id | ) | +const | +
get the pointer on an element reference with his ID.
+[in] | _id | Id of the element. |
std::string ejson::internal::Object::getKey | +( | +size_t | +_id | ) | +const | +
Get the element name (key).
+[in] | _id | Id of the element. |
std::vector<std::string> ejson::internal::Object::getKeys | +( | +) | +const | +
Get all the element name (keys).
+
+
|
+ +overridevirtual | +
generate a string with the tree of the json
+[in,out] | _data | string where to add the elements |
[in] | _indent | current indentation of the file |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
generate a string with the tree of the json (not human readable ==> for computer transfer)
+[in,out] | _data | string where to add the elements |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
parse the Current node [pure VIRUAL]
+[in] | _data | data string to parse. |
[in,out] | _pos | position in the string to start parse, return the position end of parsing. |
[in,out] | _filePos | Position in the file (in X/Y) |
[in,out] | _doc | Reference on the main document |
Implements ejson::internal::Value.
+ +void ejson::internal::Object::remove | +( | +const std::string & | +_name | ) | ++ |
Remove Value with his name.
+[in] | _name | Name of the object |
void ejson::internal::Object::remove | +( | +size_t | +_id | ) | ++ |
Remove Value with his id.
+[in] | _id | Id of the element. |
size_t ejson::internal::Object::size | +( | +) | +const | +
get the number of sub element in the current one
+
+
|
+ +overridevirtual | +
Tranfert all element in the element set in parameter.
+[in,out] | _obj | move all parameter in the selected element |
Reimplemented from ejson::internal::Value.
+ +
+
|
+ +protected | +
value of the node (for element this is the name, for text it is the inside text ...)
+ +This is the complete list of members for ejson::internal::String, including all inherited members.
+#include <String.hpp>
+Public Member Functions | |
void | set (const std::string &_value) |
const std::string & | get () const |
bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc) override |
bool | iGenerate (std::string &_data, size_t _indent) const override |
void | iMachineGenerate (std::string &_data) const override |
bool | transfertIn (ememory::SharedPtr< ejson::internal::Value > _obj) override |
ememory::SharedPtr< ejson::internal::Value > | clone () const override |
![]() | |
enum ejson::valueType | getType () const |
virtual | ~Value () |
void | display () const |
virtual void | clear () |
![]() | |
+ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () |
+const ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () const |
+ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () |
+const ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () const |
+Static Public Member Functions | |
static ememory::SharedPtr< String > | create (const std::string &_value="") |
+Protected Member Functions | |
String (const std::string &_value="") | |
![]() | |
Value () | |
void | addIndent (std::string &_data, int32_t _indent) const |
void | drawElementParsed (char32_t _val, const ejson::FilePos &_filePos) const |
bool | checkString (char32_t _val) const |
bool | checkNumber (char32_t _val) const |
int32_t | countWhiteChar (const std::string &_data, size_t _pos, ejson::FilePos &_filePos) const |
+Protected Attributes | |
std::string | m_value |
![]() | |
enum ejson::valueType | m_type |
+Additional Inherited Members | |
![]() | |
static bool | isWhiteChar (char32_t _val) |
ejson String internal data implementation.
+
+
|
+ +protected | +
basic element of a xml structure
+[in] | _value | Value to set on the ejson::Value |
+
|
+ +overridevirtual | +
Copy the curent node and all the child in the curent one.
+Reimplemented from ejson::internal::Value.
+ +
+
|
+ +static | +
Create factory on the ejson::internal::String.
+[in] | _value | Value to set on the ejson::Value |
const std::string& ejson::internal::String::get | +( | +) | +const | +
get the current element Value.
+
+
|
+ +overridevirtual | +
generate a string with the tree of the json
+[in,out] | _data | string where to add the elements |
[in] | _indent | current indentation of the file |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
generate a string with the tree of the json (not human readable ==> for computer transfer)
+[in,out] | _data | string where to add the elements |
Implements ejson::internal::Value.
+ +
+
|
+ +overridevirtual | +
parse the Current node [pure VIRUAL]
+[in] | _data | data string to parse. |
[in,out] | _pos | position in the string to start parse, return the position end of parsing. |
[in,out] | _filePos | Position in the file (in X/Y) |
[in,out] | _doc | Reference on the main document |
Implements ejson::internal::Value.
+ +void ejson::internal::String::set | +( | +const std::string & | +_value | ) | ++ |
set the value of the node.
+[in] | _value | New value of the node. |
+
|
+ +overridevirtual | +
Tranfert all element in the element set in parameter.
+[in,out] | _obj | move all parameter in the selected element |
Reimplemented from ejson::internal::Value.
+ +
+
|
+ +protected | +
value of the node (for element this is the name, for text it is the inside text ...)
+ +This is the complete list of members for ejson::internal::Value, including all inherited members.
+#include <Value.hpp>
+Public Member Functions | |
enum ejson::valueType | getType () const |
virtual | ~Value () |
virtual bool | iParse (const std::string &_data, size_t &_pos, ejson::FilePos &_filePos, ejson::internal::Document &_doc)=0 |
virtual bool | iGenerate (std::string &_data, size_t _indent) const =0 |
virtual void | iMachineGenerate (std::string &_data) const =0 |
void | display () const |
virtual void | clear () |
virtual bool | transfertIn (ememory::SharedPtr< ejson::internal::Value > _obj) |
virtual ememory::SharedPtr< ejson::internal::Value > | clone () const |
![]() | |
+ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () |
+const ememory::SharedPtr< EMEMORY_TYPE > | sharedFromThis () const |
+ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () |
+const ememory::WeakPtr< EMEMORY_TYPE > | weakFromThis () const |
+Protected Member Functions | |
Value () | |
void | addIndent (std::string &_data, int32_t _indent) const |
void | drawElementParsed (char32_t _val, const ejson::FilePos &_filePos) const |
bool | checkString (char32_t _val) const |
bool | checkNumber (char32_t _val) const |
int32_t | countWhiteChar (const std::string &_data, size_t _pos, ejson::FilePos &_filePos) const |
+Static Protected Member Functions | |
static bool | isWhiteChar (char32_t _val) |
+Protected Attributes | |
enum ejson::valueType | m_type |
Basic main object of all json data.
+
+
|
+ +inlineprotected | +
basic element of a xml structure
+ +
+
|
+ +virtual | +
Virtualize destructor.
+ +
+
|
+ +protected | +
+
|
+ +protected | +
check if an number -+.0123456789e).
+[in] | _val | Value to check the conformity. |
+
|
+ +protected | +
check if an name (for object named) (not : !"#$%&'()*+,/;<=>?@[]^`{|}~ \n\t\r).
+[in] | _val | Value to check the conformity. |
+
|
+ +virtual | +
clear the Node
+ +Reimplemented in ejson::internal::Object, and ejson::internal::Array.
+ +
+
|
+ +virtual | +
Copy the curent node and all the child in the curent one.
+Reimplemented in ejson::internal::Object, ejson::internal::Number, ejson::internal::Array, ejson::internal::Boolean, ejson::internal::String, and ejson::internal::Null.
+ +
+
|
+ +protected | +
count the number of white char in the string from the specify position (stop at the first element that is not a white char)
+[in] | _data | Data to parse. |
[in] | _pos | Start position in the string. |
[out] | _filePos | new poistion of te file to add. |
void ejson::internal::Value::display | +( | +) | +const | +
Display the Document on console.
+ +
+
|
+ +protected | +
Display the cuurent element that is curently parse.
+[in] | _val | Char that is parsed. |
[in] | _filePos | Position of the char in the file. |
enum ejson::valueType ejson::internal::Value::getType | +( | +) | +const | +
Get Value type.
+
+
|
+ +pure virtual | +
generate a string with the tree of the json
+[in,out] | _data | string where to add the elements |
[in] | _indent | current indentation of the file |
Implemented in ejson::internal::Object, ejson::internal::Document, ejson::internal::Number, ejson::internal::Array, ejson::internal::Boolean, ejson::internal::String, and ejson::internal::Null.
+ +
+
|
+ +pure virtual | +
generate a string with the tree of the json (not human readable ==> for computer transfer)
+[in,out] | _data | string where to add the elements |
Implemented in ejson::internal::Object, ejson::internal::Number, ejson::internal::Array, ejson::internal::Boolean, ejson::internal::String, and ejson::internal::Null.
+ +
+
|
+ +pure virtual | +
parse the Current node [pure VIRUAL]
+[in] | _data | data string to parse. |
[in,out] | _pos | position in the string to start parse, return the position end of parsing. |
[in,out] | _filePos | Position in the file (in X/Y) |
[in,out] | _doc | Reference on the main document |
Implemented in ejson::internal::Object, ejson::internal::Document, ejson::internal::Number, ejson::internal::Array, ejson::internal::Boolean, ejson::internal::String, and ejson::internal::Null.
+ +
+
|
+ +staticprotected | +
check if the current element is white or not : '\t' '\n' '\r' ' '
+[in] | _val | Char value to check |
+
|
+ +virtual | +
Tranfert all element in the element set in parameter.
+[in,out] | _obj | move all parameter in the selected element |
Reimplemented in ejson::internal::Object, ejson::internal::Number, ejson::internal::Array, ejson::internal::Boolean, ejson::internal::String, and ejson::internal::Null.
+ +
+
|
+ +protected | +
Type of the element.
+ +This is the complete list of members for ejson::iterator< EJSON_BASE_T >, including all inherited members.
+#include <iterator.hpp>
+Public Member Functions | |
iterator (EJSON_BASE_T &_obj, size_t _pos) | |
iterator (const EJSON_BASE_T &_obj, size_t _pos) | |
iterator (const iterator &_obj) | |
iterator & | operator= (const iterator &_obj) |
iterator & | operator+= (int32_t _val) |
iterator | operator+ (int32_t _val) const |
iterator & | operator-= (int32_t _val) |
iterator | operator- (int32_t _val) const |
iterator & | operator++ () |
iterator | operator++ (int) |
iterator & | operator-- () |
iterator | operator-- (int) |
bool | operator== (const iterator &_obj) const |
bool | operator!= (const iterator &_obj) const |
const ejson::Value | operator* () const noexcept |
ejson::Value | operator* () noexcept |
size_t | getId () const noexcept |
std::string | getKey () const noexcept |
iterator on elements.
+ejson::iterator< EJSON_BASE_T >::iterator | +( | +EJSON_BASE_T & | +_obj, | +
+ | + | size_t | +_pos | +
+ | ) | ++ |
Constructor of the generic object class.
+[in] | _obj | Reference on the object to go threw |
[in] | _pos | Position in the object |
ejson::iterator< EJSON_BASE_T >::iterator | +( | +const EJSON_BASE_T & | +_obj, | +
+ | + | size_t | +_pos | +
+ | ) | ++ |
Const constructor of the generic const object class.
+[in] | _obj | Reference on the object to go threw |
[in] | _pos | Position in the object |
ejson::iterator< EJSON_BASE_T >::iterator | +( | +const iterator< EJSON_BASE_T > & | +_obj | ) | ++ |
Copy iterator.
+[in] | _obj | Iterator to copy |
+
|
+ +noexcept | +
Get ID of an element.
+
+
|
+ +noexcept | +
Get Key of an element.
+bool ejson::iterator< EJSON_BASE_T >::operator!= | +( | +const iterator< EJSON_BASE_T > & | +_obj | ) | +const | +
In-Equality compare operator with an other iterator.
+[in] | _obj | Reference on the comparing iterator |
+
|
+ +noexcept | +
Get the property Value.
+
+
|
+ +noexcept | +
Get the property Value.
+iterator ejson::iterator< EJSON_BASE_T >::operator+ | +( | +int32_t | +_val | ) | +const | +
Operator+ Addition a value.
+[in] | _val | Value to addition |
iterator& ejson::iterator< EJSON_BASE_T >::operator++ | +( | +) | ++ |
Operator++ Pre-incrementation of this iterator.
+iterator ejson::iterator< EJSON_BASE_T >::operator++ | +( | +int | +) | ++ |
Operator++ Post-incrementation of this iterator.
+iterator& ejson::iterator< EJSON_BASE_T >::operator+= | +( | +int32_t | +_val | ) | ++ |
Operator+= Addition value.
+[in] | _val | Value to addition |
iterator ejson::iterator< EJSON_BASE_T >::operator- | +( | +int32_t | +_val | ) | +const | +
Operator- Decrement a value.
+[in] | _val | Value to addition |
iterator& ejson::iterator< EJSON_BASE_T >::operator-- | +( | +) | ++ |
Operator++ Pre-decrementation of this iterator.
+iterator ejson::iterator< EJSON_BASE_T >::operator-- | +( | +int | +) | ++ |
Operator++ Post-decrementation of this iterator.
+iterator& ejson::iterator< EJSON_BASE_T >::operator-= | +( | +int32_t | +_val | ) | ++ |
Operator-= Decrement a value.
+[in] | _val | Value to addition |
iterator& ejson::iterator< EJSON_BASE_T >::operator= | +( | +const iterator< EJSON_BASE_T > & | +_obj | ) | ++ |
Operator+= Addition value.
+[in] | _obj | Value to addition |
bool ejson::iterator< EJSON_BASE_T >::operator== | +( | +const iterator< EJSON_BASE_T > & | +_obj | ) | +const | +
Equality compare operator with an other iterator.
+[in] | _obj | Reference on the comparing iterator |
|
| Null (ejson::internal) | String (ejson::internal) | |||
Number (ejson::internal) |
| |||||
Array (ejson) | Document (ejson) | Number (ejson) | ||||
Array (ejson::internal) | Document (ejson::internal) |
| Value (ejson::internal) | |||
|
| Value (ejson) | ||||
Object (ejson::internal) |
| |||||
Boolean (ejson) | FilePos (ejson) | Object (ejson) | ||||
Boolean (ejson::internal) |
|
| iterator (ejson) | |||
Null (ejson) | String (ejson) | |||||
+Files | |
file | Array.hpp [code] |
file | Boolean.hpp [code] |
file | Document.hpp [code] |
file | Null.hpp [code] |
file | Number.hpp [code] |
file | Object.hpp [code] |
file | String.hpp [code] |
file | Value.hpp [code] |
+Directories |
+Files | |
file | Array.hpp [code] |
file | Boolean.hpp [code] |
file | Document.hpp [code] |
file | ejson.hpp [code] |
file | FilePos.hpp [code] |
file | iterator.hpp [code] |
file | Null.hpp [code] |
file | Number.hpp [code] |
file | Object.hpp [code] |
file | String.hpp [code] |
file | Value.hpp [code] |
file | valueType.hpp [code] |
#include <ejson/Document.hpp>
Go to the source code of this file.
+The first thing to do when reading or writing a JSON file/stream, is to declare the Document interface
+Include ejson
Declare document interface
File to read: "read.json"
Reading a file is done like this:
The file naming is manage by etk::FSNode that provide "DATA:" start string for internal application asset. You can use external path like "./plop/file.json" too.
+Reading a stream is done like this:
In C and C++ it is very hard to read string with the \" then to simplify parsing of json the parser engine support the use of simple **'** interface:
In an ejson::Object (or ejson::Document) the sub-nodes are accessible threw an abstraction class stores in an element name Value
+Get a value with its name:
The generic Way to access to an element is to convert it in the corect type:
Commonly you might use like this:
Get the Array
Move threw all element:
Move threw all element in C mode:
Get the Object
Move threw all element:
Move threw all element in C mode:
ejson manage reference object, then it is possible that 2 part of the software access at the same object/element ...
+You can copy object to separate or duplicate section.
+This is named cloning:
The first thing to do when reading or writing a JSON file/stream, is to declare the Document interface
+Include ejson
Declare document interface
Write an json tree is done like:
Writing a stream is done like this:
Add String:
Add Null:
Add Number:
Add Boolean:
Add Array with values:
Add Object with values:
Remove a Value in an Object:
Remove a Value in an Object:
The ejson concept is to abstract the implementation of the internal system. All the element are mapped on shared memory. Then if you asign an element to an other, it is the same. You need to clone it if you want to have new standalone element.
+▼ framework | |
▼ atria-soft | |
▼ ejson | |
▼ ejson | |
▼ internal | |
Array.hpp | |
Boolean.hpp | |
Document.hpp | |
Null.hpp | |
Number.hpp | |
Object.hpp | |
String.hpp | |
Value.hpp | |
Array.hpp | |
Boolean.hpp | |
Document.hpp | |
ejson.hpp | |
FilePos.hpp | |
iterator.hpp | |
Null.hpp | |
Number.hpp | |
Object.hpp | |
String.hpp | |
Value.hpp | |
valueType.hpp |
▼Cememory::EnableSharedFromThisBase [external] | |
▼Cememory::EnableSharedFromThis< Value > [external] | |
▼Cejson::internal::Value | Basic main object of all json data |
Cejson::internal::Array | Ejson Array internal data implementation |
Cejson::internal::Boolean | Ejson Boolean internal data implementation |
Cejson::internal::Null | Ejson Null internal data implementation |
Cejson::internal::Number | Ejson Number internal data implementation |
▼Cejson::internal::Object | Ejson Object internal data implementation |
Cejson::internal::Document | Ejson Document internal data implementation |
Cejson::internal::String | Ejson String internal data implementation |
Cejson::FilePos | Position in the file of the original data |
Cejson::iterator< EJSON_BASE_T > | |
▼Cejson::Value | Basic main object of all json elements |
Cejson::Array | Ejson Array interface [ ... ] |
Cejson::Boolean | Ejson Boolean interface: true/false |
Cejson::Null | Ejson Null interface: 'null' |
Cejson::Number | Ejson Number interface |
▼Cejson::Object | Ejson Object interface { ... } |
Cejson::Document | Ejson Document interface (acces with the file and stream) |
Cejson::String | Ejson String interface |
EJSON, or Ewol JSON interface is a simple, small, efficient, C++ JSON parser/generator that can be easily integrating into other programs.
+EJSON parses an JSON document, and builds from that a Document Object Model (DOM) that can be read, modified, and saved.
+JSON stands for "JavaScript Object Notation". It is a general purpose human and machine readable machine language to describe arbitrary data (base internal system of the JavaScript object). All those random file formats created to store application data can all be replaced with JSON. One parser for everything.
+http://wikipedia.org/wiki/JSON
+There are different ways to access and interact with JSON data. EJSON uses a Document Object Model (DOM), meaning the JSON data is parsed into a C++ objects that can be browsed and manipulated, and then written to disk. You can also construct an JSON document from scratch with C++ objects and write this to disk.
+EJSON is designed to be easy and fast to learn.
+EJSON is dependent of the STL (compatible with MacOs stl (CXX))
+I do not know...
+I Add some costum feature of JSON:
EJSON is written in C++.
+EJSON is FREE software and all sub-library are FREE and staticly linkable !!!
+Copyright EJSON Edouard DUPIN
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+Go to the source code of this file.
++Classes | |
class | ejson::internal::Array |
+Namespaces | |
ejson | |
ejson::internal | |
Go to the source code of this file.
++Classes | |
class | ejson::internal::Boolean |
+Namespaces | |
ejson | |
ejson::internal | |
#include <ejson/internal/Value.hpp>
#include <vector>
#include <etk/types.hpp>
#include <ejson/internal/String.hpp>
#include <ejson/internal/Array.hpp>
#include <ejson/internal/Object.hpp>
Go to the source code of this file.
++Classes | |
class | ejson::internal::Document |
+Namespaces | |
ejson | |
ejson::internal | |
+Macros | |
#define | EJSON_CREATE_ERROR(doc, data, pos, filePos, comment) |
#define EJSON_CREATE_ERROR | +( | ++ | doc, | +
+ | + | + | data, | +
+ | + | + | pos, | +
+ | + | + | filePos, | +
+ | + | + | comment | +
+ | ) | ++ |
Automatic create error on the basic Document object.
+[in] | doc | Document reference |
[in] | data | main string parsed |
[in] | pos | Position in the file |
[in] | filePos | position in linre row in the file |
[in] | comment | Comment of the error find |
Go to the source code of this file.
++Classes | |
class | ejson::internal::Null |
+Namespaces | |
ejson | |
ejson::internal | |
Go to the source code of this file.
++Classes | |
class | ejson::internal::Number |
+Namespaces | |
ejson | |
ejson::internal | |
#include <etk/types.hpp>
#include <etk/Hash.hpp>
#include <algorithm>
#include <ejson/internal/Value.hpp>
Go to the source code of this file.
++Classes | |
class | ejson::internal::Object |
+Namespaces | |
ejson | |
ejson::internal | |
Go to the source code of this file.
++Classes | |
class | ejson::internal::String |
+Namespaces | |
ejson | |
ejson::internal | |
#include <etk/types.hpp>
#include <ememory/memory.hpp>
#include <ejson/FilePos.hpp>
#include <ejson/valueType.hpp>
#include <ejson/internal/Array.hpp>
#include <ejson/internal/Boolean.hpp>
#include <ejson/internal/Null.hpp>
#include <ejson/internal/Number.hpp>
#include <ejson/internal/Object.hpp>
#include <ejson/internal/String.hpp>
#include <ejson/internal/Document.hpp>
Go to the source code of this file.
++Classes | |
class | ejson::internal::Value |
+Namespaces | |
ejson | |
ejson::internal | |
+Macros | |
+#define | EJSON_PARSE_ELEMENT EJSON_VERBOSE |
+#define | EJSON_PARSE_ATTRIBUTE EJSON_VERBOSE |
Go to the source code of this file.
++Classes | |
class | ejson::iterator< EJSON_BASE_T > |
+Namespaces | |
ejson | |
t |