class: exml::Document
Description:
Constructor and Destructor:
+ Document (void );
+ virtual ~Document (void );
Synopsis:
+ virtual void setCaseSensitive (bool _val);
+ virtual bool getCaseSensitive (void ) const;
+ 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 );
+ void displayErrorWhenDetected (void );
+ void notDisplayErrorWhenDetected (void );
+ void createError (const std::string & _data,
int32_t _pos,
const exml::filePos & _filePos,
const std::string & _comment);
+ void displayError (void );
+ virtual enum nodeType getType (void ) const;
+ bool iGenerate (std::string & _data,
int32_t _indent) const;
+ virtual exml::Document* toDocument (void );
+ virtual const exml::Document* toDocument (void ) const;
Object Hierarchy:
+exml::Node
+--> +exml::AttributeList
+--> +exml::Element
+--> exml::Document
Detail:
Document
+ Document (void );
Constructor
~Document
+ virtual ~Document (void );
Destructor
setCaseSensitive
+ virtual void setCaseSensitive (bool _val);
Enable or diasable the case sensitive (must be done before the call of parsing)
Parameter [input]: _val true if enable; false else.
getCaseSensitive
+ virtual bool getCaseSensitive (void ) const;
get the status of case sensitive mode.
Return: true if case sensitive is active
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 (void );
Display the Document on console
displayErrorWhenDetected
+ void displayErrorWhenDetected (void );
notDisplayErrorWhenDetected
+ void notDisplayErrorWhenDetected (void );
createError
+ void createError (const std::string & _data,
int32_t _pos,
const exml::filePos & _filePos,
const std::string & _comment);
displayError
+ void displayError (void );
getType
+ virtual enum nodeType getType (void ) const;
get the node type.
Return: the type of the Node.
iGenerate
+ bool iGenerate (std::string & _data,
int32_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.
toDocument
+ virtual exml::Document* toDocument (void );
Cast the element in a Document if it is possible.
Return: pointer on the class or NULL.
toDocument
+ virtual const exml::Document* toDocument (void ) const;
Cast the element in a Document if it is possible.
Return: pointer on the class or NULL.
+exml::Node
+--> +exml::AttributeList
+--> +exml::Element
+--> exml::Document
Detail:
Document
+ Document (void );Constructor
~Document
+ virtual ~Document (void );Destructor
setCaseSensitive
+ virtual void setCaseSensitive (bool _val);Enable or diasable the case sensitive (must be done before the call of parsing)
Parameter [input]: | _val | true if enable; false else. |
getCaseSensitive
+ virtual bool getCaseSensitive (void ) const;get the status of case sensitive mode.
Return: | true if case sensitive is active |
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 (void );Display the Document on console
displayErrorWhenDetected
+ void displayErrorWhenDetected (void );
notDisplayErrorWhenDetected
+ void notDisplayErrorWhenDetected (void );
createError
+ void createError (const std::string & _data,
int32_t _pos,
const exml::filePos & _filePos,
const std::string & _comment);
displayError
+ void displayError (void );
getType
+ virtual enum nodeType getType (void ) const;get the node type.
Return: | the type of the Node. |
iGenerate
+ bool iGenerate (std::string & _data,generate a string with the tree of the xml
int32_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. |
toDocument
+ virtual exml::Document* toDocument (void );Cast the element in a Document if it is possible.
Return: | pointer on the class or NULL. |
toDocument
+ virtual const exml::Document* toDocument (void ) const;Cast the element in a Document if it is possible.
Return: | pointer on the class or NULL. |