class: ejson::Document


Description:



Constructor and Destructor:

+                                Document                    (void );
+ virtual ~Document (void );

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 );
+ void displayErrorWhenDetected (void );
+ void notDisplayErrorWhenDetected (void );
+ void createError (const std::string & _data,
size_t _pos,
const ejson::filePos & _filePos,
const std::string & _comment);
+ void displayError (void );
+ virtual enum nodeType getType (void ) 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 ejson::Document* toDocument (void );
+ virtual const ejson::Document* toDocument (void ) const;

Object Hierarchy:

+ejson::Value
+--> +ejson::Object
+--> ejson::Document

Detail:

Document

+  Document (void );
Constructor


~Document

+ virtual  ~Document (void );
Destructor


parse

+ bool parse (const std::string & _data);
parse a string that contain an XML


generate

+ bool generate (std::string & _data);
generate a string that contain the created XML


load

+ bool load (const std::string & _file);
Load the file that might contain the xml


store

+ bool store (const std::string & _file);
Store the Xml in the file


display

+ void display (void );
Display the Document on console


displayErrorWhenDetected

+ void displayErrorWhenDetected (void );



notDisplayErrorWhenDetected

+ void notDisplayErrorWhenDetected (void );



createError

+ void createError (const std::string & _data,
size_t _pos,
const ejson::filePos & _filePos,
const std::string & _comment);



displayError

+ void displayError (void );



getType

+ virtual enum nodeType getType (void ) const;
get the node type.


iParse

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


iGenerate

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


toDocument

+ virtual ejson::Document* toDocument (void );
Cast the element in a Document if it is possible.


toDocument

+ virtual const ejson::Document* toDocument (void ) const;
Cast the element in a Document if it is possible.