Class: exml::Node
Synopsis:
+ Node (void);
+ Node (const std::string & _value);
+ Node (const std::u32string & _value);
+ ~Node (void);
+ bool iParse (const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::Document & _doc);
+ bool iGenerate (std::string & _data,
int32_t _indent);
+ const exml::filePos & getPos (void);
+ void setValue (std::string _value);
+ void setValue (std::u32string _value);
+ const std::string & getValue (void);
+ std::u32string getUValue (void);
+ enum nodeType getType (void);
+ exml::Document * toDocument (void);
+ const exml::Document * toDocument (void);
+ exml::Attribute * toAttribute (void);
+ const exml::Attribute * toAttribute (void);
+ exml::Comment * toComment (void);
+ const exml::Comment * toComment (void);
+ exml::Declaration * toDeclaration (void);
+ const exml::Declaration * toDeclaration (void);
+ exml::Element * toElement (void);
+ const exml::Element * toElement (void);
+ exml::Text * toText (void);
+ const exml::Text * toText (void);
+ bool isDocument (void);
+ bool isAttribute (void);
+ bool isComment (void);
+ bool isDeclaration (void);
+ bool isElement (void);
+ bool isText (void);
+ void clear (void);
# void addIndent (std::string & _data,
int32_t _indent);
# void drawElementParsed (char32_t _val,
const exml::filePos & _filePos);
# bool checkAvaillable (char32_t _val,
bool _firstChar);
# int32_t countWhiteChar (const std::string & _data,
int32_t _pos,
exml::filePos & _filePos);
Detail:
exml::Node ()
Node(void);
basic element of a xml structure
exml::Node ()
Node(const std::string & _value);
basic element of a xml structure
Parameter [input]: value of the node
exml::Node ()
Node(const std::u32string & _value);
exml::~Node ()
~Node(void);
destructor
iParse ()
bool iParse(const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::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 ()
bool iGenerate(std::string & _data,
int32_t _indent);
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.
getPos ()
const exml::filePos & getPos(void);
get the current position where the element is in the file
setValue ()
void setValue(std::string _value);
set the value of the node.
Parameter [input]: _value New value of the node.
setValue ()
void setValue(std::u32string _value);
getValue ()
const std::string & getValue(void);
get the current element Value.
Return: the reference of the string value.
getUValue ()
std::u32string getUValue(void);
getType ()
enum nodeType getType(void);
get the node type.
Return: the type of the Node.
toDocument ()
exml::Document * toDocument(void);
Cast the element in a Document if it is possible.
Return: pointer on the class or NULL.
toDocument ()
const exml::Document * toDocument(void);
toAttribute ()
exml::Attribute * toAttribute(void);
Cast the element in a Attribute if it is possible.
Return: pointer on the class or NULL.
toAttribute ()
const exml::Attribute * toAttribute(void);
toComment ()
exml::Comment * toComment(void);
Cast the element in a Comment if it is possible.
Return: pointer on the class or NULL.
toComment ()
const exml::Comment * toComment(void);
toDeclaration ()
exml::Declaration * toDeclaration(void);
Cast the element in a Declaration if it is possible.
Return: pointer on the class or NULL.
toDeclaration ()
const exml::Declaration * toDeclaration(void);
toElement ()
exml::Element * toElement(void);
Cast the element in a Element if it is possible.
Return: pointer on the class or NULL.
toElement ()
const exml::Element * toElement(void);
toText ()
exml::Text * toText(void);
Cast the element in a Text if it is possible.
Return: pointer on the class or NULL.
toText ()
const exml::Text * toText(void);
isDocument ()
bool isDocument(void);
check if the node is a exml::Document
Return: true if the node is a exml::Document
isAttribute ()
bool isAttribute(void);
check if the node is a exml::Attribute
Return: true if the node is a exml::Attribute
isComment ()
bool isComment(void);
check if the node is a exml::Comment
Return: true if the node is a exml::Comment
isDeclaration ()
bool isDeclaration(void);
check if the node is a exml::Declaration
Return: true if the node is a exml::Declaration
isElement ()
bool isElement(void);
check if the node is a exml::Element
Return: true if the node is a exml::Element
isText ()
bool isText(void);
check if the node is a exml::Text
Return: true if the node is a exml::Text
clear ()
void clear(void);
clear the Node
addIndent ()
void addIndent(std::string & _data,
int32_t _indent);
add indentation of the string input.
Parameter [input] [output]: _data String where the indentation is done.
Parameter [input]: _indent Number of tab to add at the string.
drawElementParsed ()
void drawElementParsed(char32_t _val,
const exml::filePos & _filePos);
Display the cuurent element that is curently parse.
Parameter [input]: _val Char that is parsed.
Parameter [input]: _filePos Position of the char in the file.
checkAvaillable ()
bool checkAvaillable(char32_t _val,
bool _firstChar);
check if an element or attribute is availlable (not : !"#$%&'()*+,/;<=>?
Parameter [input]: _val Value to check the conformity.
Parameter [input]: _firstChar True if the element check is the first char.
countWhiteChar ()
int32_t countWhiteChar(const std::string & _data,
int32_t _pos,
exml::filePos & _filePos);
count the number of white char in the string from the specify position (stop at the first element that is not a white char)
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.
exml::Node ()
Node(void);
basic element of a xml structure
exml::Node ()
Node(const std::string & _value);
basic element of a xml structure
-
Parameter [input]: value of the node
exml::Node ()
Node(const std::u32string & _value);
exml::~Node ()
~Node(void);
destructor
iParse ()
bool iParse(const std::string & _data, int32_t & _pos, bool _caseSensitive, exml::filePos & _filePos, exml::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 ()
bool iGenerate(std::string & _data, int32_t _indent);
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.
getPos ()
const exml::filePos & getPos(void);
get the current position where the element is in the file
setValue ()
void setValue(std::string _value);
set the value of the node.
-
Parameter [input]: _value New value of the node.
setValue ()
void setValue(std::u32string _value);
getValue ()
const std::string & getValue(void);
get the current element Value.
-
Return: the reference of the string value.
getUValue ()
std::u32string getUValue(void);
getType ()
enum nodeType getType(void);
get the node type.
-
Return: the type of the Node.
toDocument ()
exml::Document * toDocument(void);
Cast the element in a Document if it is possible.
-
Return: pointer on the class or NULL.
toDocument ()
const exml::Document * toDocument(void);
toAttribute ()
exml::Attribute * toAttribute(void);
Cast the element in a Attribute if it is possible.
-
Return: pointer on the class or NULL.
toAttribute ()
const exml::Attribute * toAttribute(void);
toComment ()
exml::Comment * toComment(void);
Cast the element in a Comment if it is possible.
-
Return: pointer on the class or NULL.
toComment ()
const exml::Comment * toComment(void);
toDeclaration ()
exml::Declaration * toDeclaration(void);
Cast the element in a Declaration if it is possible.
-
Return: pointer on the class or NULL.
toDeclaration ()
const exml::Declaration * toDeclaration(void);
toElement ()
exml::Element * toElement(void);
Cast the element in a Element if it is possible.
-
Return: pointer on the class or NULL.
toElement ()
const exml::Element * toElement(void);
toText ()
exml::Text * toText(void);
Cast the element in a Text if it is possible.
-
Return: pointer on the class or NULL.
toText ()
const exml::Text * toText(void);
isDocument ()
bool isDocument(void);
check if the node is a exml::Document
-
Return: true if the node is a exml::Document
isAttribute ()
bool isAttribute(void);
check if the node is a exml::Attribute
-
Return: true if the node is a exml::Attribute
isComment ()
bool isComment(void);
check if the node is a exml::Comment
-
Return: true if the node is a exml::Comment
isDeclaration ()
bool isDeclaration(void);
check if the node is a exml::Declaration
-
Return: true if the node is a exml::Declaration
isElement ()
bool isElement(void);
check if the node is a exml::Element
-
Return: true if the node is a exml::Element
isText ()
bool isText(void);
check if the node is a exml::Text
-
Return: true if the node is a exml::Text
clear ()
void clear(void);
clear the Node
addIndent ()
void addIndent(std::string & _data, int32_t _indent);
add indentation of the string input.
-
Parameter [input] [output]: _data String where the indentation is done.
Parameter [input]: _indent Number of tab to add at the string.
drawElementParsed ()
void drawElementParsed(char32_t _val, const exml::filePos & _filePos);
Display the cuurent element that is curently parse.
-
Parameter [input]: _val Char that is parsed.
Parameter [input]: _filePos Position of the char in the file.
checkAvaillable ()
bool checkAvaillable(char32_t _val, bool _firstChar);
check if an element or attribute is availlable (not : !"#$%&'()*+,/;<=>?
-
Parameter [input]: _val Value to check the conformity.
Parameter [input]: _firstChar True if the element check is the first char.
countWhiteChar ()
int32_t countWhiteChar(const std::string & _data, int32_t _pos, exml::filePos & _filePos);
count the number of white char in the string from the specify position (stop at the first element that is not a white char)
-
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.