class: ejson::Document
Description:
Constructor and Destructor:
+ Document ();
+ virtual ~Document ();
Synopsis:
+ 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;
Object Hierarchy:
+ejson::Value
+--> +ejson::Object
+--> ejson::Document
Detail:
Document
+ Document ();
Constructor
~Document
+ virtual ~Document ();
Destructor
parse
+ 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
generate
+ 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
load
+ 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
store
+ 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
display
+ void display ();
Display the Document on console
displayErrorWhenDetected
+ void displayErrorWhenDetected ();
notDisplayErrorWhenDetected
+ void notDisplayErrorWhenDetected ();
createError
+ void createError (const std::string & _data,
size_t _pos,
const ejson::filePos & _filePos,
const std::string & _comment);
displayError
+ void displayError ();
iParse
+ virtual bool iParse (const std::string & _data,
size_t & _pos,
ejson::filePos & _filePos,
ejson::Document & _doc);
parse the Current node [pure VIRUAL]
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.
iGenerate
+ virtual bool iGenerate (std::string & _data,
size_t _indent) const;
generate a string with the tree of the xml
Parameter [input] [output]: _data string where to add the elements
Parameter [input]: current indentation of the file
Return: false if an error occured.
+ejson::Value
+--> +ejson::Object
+--> ejson::Document
Detail:
Document
+ Document ();Constructor
~Document
+ virtual ~Document ();Destructor
parse
+ 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 |
generate
+ 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 |
load
+ 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 |
store
+ 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 |
display
+ void display ();Display the Document on console
displayErrorWhenDetected
+ void displayErrorWhenDetected ();
notDisplayErrorWhenDetected
+ void notDisplayErrorWhenDetected ();
createError
+ void createError (const std::string & _data,
size_t _pos,
const ejson::filePos & _filePos,
const std::string & _comment);
displayError
+ void displayError ();
iParse
+ 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. |
iGenerate
+ 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. |