class: exml::Attribute
Description:
Constructor and Destructor:
+ Attribute (void );
+ Attribute (const std::string & _name,
const std::string & _value);
+ virtual ~Attribute (void );
Synopsis:
# std::string m_name;
+ virtual void setName (const std::string & _name);
+ virtual const std::string & getName (void ) const;
+ virtual enum nodeType getType (void ) const;
+ virtual bool iParse (const std::string & _data,
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::Document & _doc);
+ virtual bool iGenerate (std::string & _data,
int32_t _indent) const;
+ virtual exml::Attribute* toAttribute (void );
+ virtual const exml::Attribute* toAttribute (void ) const;
+ virtual void clear (void );
Object Hierarchy:
+exml::Node
+--> exml::Attribute
Detail:
Attribute
+ Attribute (void );
Constructor
Attribute
+ Attribute (const std::string & _name,
const std::string & _value);
Constructor
Parameter [input]: _name Name of the attribute.
Parameter [input]: _value Value of the attribute.
~Attribute
+ virtual ~Attribute (void );
Destructor
m_name
# std::string m_name;
setName
+ virtual void setName (const std::string & _name);
set the name of the attribute
Parameter [input]: _name New name of the attribute
getName
+ virtual const std::string & getName (void ) const;
get the current name of the Attribute
Return: String of the attribute
getType
+ virtual enum nodeType getType (void ) const;
get the node type.
Return: the type of the Node.
iParse
+ virtual 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
+ virtual 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.
toAttribute
+ virtual exml::Attribute* toAttribute (void );
Cast the element in a Attribute if it is possible.
Return: pointer on the class or NULL.
toAttribute
+ virtual const exml::Attribute* toAttribute (void ) const;
Cast the element in a Attribute if it is possible.
Return: pointer on the class or NULL.
clear
+ virtual void clear (void );
clear the Node
+exml::Node
+--> exml::Attribute
Detail:
Attribute
+ Attribute (void );Constructor
Attribute
+ Attribute (const std::string & _name,Constructor
const std::string & _value);
Parameter [input]: | _name | Name of the attribute. | Parameter [input]: | _value | Value of the attribute. |
~Attribute
+ virtual ~Attribute (void );Destructor
m_name
# std::string m_name;
setName
+ virtual void setName (const std::string & _name);set the name of the attribute
Parameter [input]: | _name | New name of the attribute |
getName
+ virtual const std::string & getName (void ) const;get the current name of the Attribute
Return: | String of the attribute |
getType
+ virtual enum nodeType getType (void ) const;get the node type.
Return: | the type of the Node. |
iParse
+ virtual bool iParse (const std::string & _data,parse the Current node [pure VIRUAL]
int32_t & _pos,
bool _caseSensitive,
exml::filePos & _filePos,
exml::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
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. |
toAttribute
+ virtual exml::Attribute* toAttribute (void );Cast the element in a Attribute if it is possible.
Return: | pointer on the class or NULL. |
toAttribute
+ virtual const exml::Attribute* toAttribute (void ) const;Cast the element in a Attribute if it is possible.
Return: | pointer on the class or NULL. |
clear
+ virtual void clear (void );clear the Node