20#pragma warning (disable : 4275)
25#include "smartpointer.h"
38typedef SMARTP<xmlattribute> Sxmlattribute;
39typedef SMARTP<xmlelement> Sxmlelement;
58 void setName (
const std::string& name);
59 void setValue (
const std::string&
value);
60 void setValue (
long value);
61 void setValue (
int value);
62 void setValue (
float value);
64 const std::string& getName ()
const {
return fName; }
66 const std::string&
getValue ()
const {
return fValue; }
68 operator int ()
const;
93 std::vector<Sxmlattribute> fAttributes;
112 int getInputLineNumber () {
return fInputLineNumber; }
114 void setValue (
unsigned long value);
115 void setValue (
long value);
116 void setValue (
int value);
117 void setValue (
float value);
118 void setValue (
const std::string&
value);
119 void setName (
const std::string& name);
121 int getType ()
const {
return fType; }
122 const std::string& getName ()
const {
return fName; }
125 const std::string&
getValue ()
const {
return fValue; }
141 const std::vector<Sxmlattribute>& attributes()
const {
return fAttributes; }
143 const std::string getAttributeValue (
const std::string&
attrname)
const;
163 bool empty ()
const {
return fValue.empty() && elements().empty(); }
the smart pointer implementation
Definition smartpointer.h:58
Definition basevisitor.h:25
a simple tree representation
Definition ctree.h:124
the base class for smart pointers implementation
Definition smartpointer.h:29
base class for visitable objects
Definition visitable.h:25
A generic xml attribute representation.
Definition xml.h:47
const std::string & getValue() const
returns the attribute value as a string
Definition xml.h:66
A generic xml element representation.
Definition xml.h:86
bool hasSubElement(int subElementType, std::string value)
returns true if subelement with given value exists
const std::string & getValue() const
returns the element value as a string
Definition xml.h:125
bool hasSubElement(int subElementType)
returns true if subelement exists
long add(const Sxmlattribute &attr)
adds an attribute to the element