27 #ifndef GXMLELEMENT_HPP
28 #define GXMLELEMENT_HPP
67 virtual void clear(
void);
69 virtual std::string
classname(
void)
const;
70 const std::string&
name(
void)
const;
72 std::string
value(
void)
const;
73 std::string
string(
void)
const;
74 double real(
void)
const;
80 const std::string&
value);
83 virtual void write(
GUrl& url,
const int& indent = 0)
const;
86 const int& indent = 0)
const;
111 return (
"GXmlElement");
196 return (
int)(
m_attr.size());
Abstract XML node base class.
virtual std::string print(const GChatter &chatter=NORMAL, const int &indent=0) const
Print XML element.
std::string string(void) const
Return string value.
std::string value(void) const
Return string value.
std::vector< GXmlAttribute * > m_attr
Attributes.
int integer(void) const
Return integer value.
const std::string & name(void) const
Return XML element name.
virtual void clear(void)
Clear XML element.
virtual ~GXmlElement(void)
Destructor.
void parse_attribute(size_t *pos, const std::string &segment)
Parse element attribute.
const GXmlAttribute * attribute(const int &index) const
Return attribute.
void remove_attribute(const std::string &name)
Remove attribute from element.
bool has_attribute(const std::string &name) const
Check if element has a given attribute.
void init_members(void)
Initialise class members.
double real(void) const
Return floating point value.
void copy_members(const GXmlElement &node)
Copy class members.
GXmlElement(void)
Void constructor.
virtual NodeType type(void) const
Return XML node type.
void free_members(void)
Delete class members.
GXmlElement & operator=(const GXmlElement &node)
Assignment operator.
std::string m_name
Element name.
virtual void write(GUrl &url, const int &indent=0) const
Write element into URL.
void parse_start(const std::string &segment)
Parse element start segment string.
int toint(const std::string &arg)
Convert string into integer value.
virtual std::string classname(void) const
Return class name.
void parse_stop(const std::string &segment)
Parse element stop segment string.
Abstract XML node base class interface definition.
int attributes(void) const
Return number of attributes.
virtual GXmlElement * clone(void) const
Clone XML element.
XML attribute class interface definition.
double todouble(const std::string &arg)
Convert string into double precision value.