class: exml::Node


Description:



Constructor and Destructor:

+                                  Node              (void );
+ Node (const std::string & _value);
+ virtual ~Node (void );

Synopsis:

+ virtual bool                     iParse            (const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::Document & _doc) = 0;
+ virtual bool iGenerate (std::string & _data,
int32_t _indent) const;
# exml::filePos m_pos;
+ const exml::filePos & getPos (void );
# std::string m_value;
+ virtual void setValue (std::string _value);
+ virtual const std::string & getValue (void ) const;
+ virtual enum nodeType getType (void ) const;
# void addIndent (std::string & _data,
int32_t _indent) const;
# void drawElementParsed (char32_t _val,
const exml::filePos & _filePos) const;
# bool checkAvaillable (char32_t _val,
bool _firstChar) const;
# int32_t countWhiteChar (const std::string & _data,
int32_t _pos,
exml::filePos & _filePos) const;
+ virtual exml::Document* toDocument (void );
+ virtual const exml::Document* toDocument (void ) const;
+ virtual exml::Attribute* toAttribute (void );
+ virtual const exml::Attribute* toAttribute (void ) const;
+ virtual exml::Comment* toComment (void );
+ virtual const exml::Comment* toComment (void ) const;
+ virtual exml::Declaration* toDeclaration (void );
+ virtual const exml::Declaration* toDeclaration (void ) const;
+ virtual exml::Element* toElement (void );
+ virtual const exml::Element* toElement (void ) const;
+ virtual exml::Text* toText (void );
+ virtual const exml::Text* toText (void ) const;
+ bool isDocument (void ) const;
+ bool isAttribute (void ) const;
+ bool isComment (void ) const;
+ bool isDeclaration (void ) const;
+ bool isElement (void ) const;
+ bool isText (void ) const;
+ virtual void clear (void );

Object Hierarchy:

exml::Node
+--> exml::Comment
+--> exml::Attribute
+--> exml::Text
+--> exml::AttributeList

Detail:

Node

+  Node (void );
basic element of a xml structure


Node

+  Node (const std::string & _value);
basic element of a xml structure


~Node

+ virtual  ~Node (void );
destructor


iParse

+ virtual bool iParse (const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::Document & _doc) = 0;
parse the Current node [pure VIRUAL]


iGenerate

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


m_pos

# exml::filePos m_pos;
position in the readed file == > not correct when the file is generated


getPos

+ const exml::filePos & getPos (void );
get the current position where the element is in the file


m_value

# std::string m_value;
value of the node (for element this is the name, for text it is the inside text ...)


setValue

+ virtual void setValue (std::string _value);
set the value of the node.


getValue

+ virtual const std::string & getValue (void ) const;
get the current element Value.


getType

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


addIndent

# void addIndent (std::string & _data,
int32_t _indent) const;
add indentation of the string input.


drawElementParsed

# void drawElementParsed (char32_t _val,
const
exml::filePos & _filePos) const;
Display the cuurent element that is curently parse.


checkAvaillable

# bool checkAvaillable (char32_t _val,
bool _firstChar) const;
check if an element or attribute is availlable (not : !"#$%&'()+,/;<=>?@[\]^`{|}~ \n\t\r and for first char : not -.0123456789).


countWhiteChar

# int32_t countWhiteChar (const std::string & _data,
int32_t _pos,
exml::filePos & _filePos) const;
count the number of white char in the string from the specify position (stop at the first element that is not a white char)


toDocument

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


toDocument

+ virtual const exml::Document* toDocument (void ) const;



toAttribute

+ virtual exml::Attribute* toAttribute (void );
Cast the element in a Attribute if it is possible.


toAttribute

+ virtual const exml::Attribute* toAttribute (void ) const;



toComment

+ virtual exml::Comment* toComment (void );
Cast the element in a Comment if it is possible.


toComment

+ virtual const exml::Comment* toComment (void ) const;



toDeclaration

+ virtual exml::Declaration* toDeclaration (void );
Cast the element in a Declaration if it is possible.


toDeclaration

+ virtual const exml::Declaration* toDeclaration (void ) const;



toElement

+ virtual exml::Element* toElement (void );
Cast the element in a Element if it is possible.


toElement

+ virtual const exml::Element* toElement (void ) const;



toText

+ virtual exml::Text* toText (void );
Cast the element in a Text if it is possible.


toText

+ virtual const exml::Text* toText (void ) const;



isDocument

+ bool isDocument (void ) const;
check if the node is a exml::Document


isAttribute

+ bool isAttribute (void ) const;
check if the node is a exml::Attribute


isComment

+ bool isComment (void ) const;
check if the node is a exml::Comment


isDeclaration

+ bool isDeclaration (void ) const;
check if the node is a exml::Declaration


isElement

+ bool isElement (void ) const;
check if the node is a exml::Element


isText

+ bool isText (void ) const;
check if the node is a exml::Text


clear

+ virtual void clear (void );
clear the Node