|
Robotics Library
0.7.0
|
Go to the documentation of this file.
27 #ifndef RL_XML_ATTRIBUTE_H
28 #define RL_XML_ATTRIBUTE_H
31 #include <boost/shared_array.hpp>
32 #include <libxml/parser.h>
48 Attribute(::xmlNodePtr node, const ::std::string& name, const ::std::string& value) :
52 reinterpret_cast<const ::xmlChar*>(name.c_str()),
53 reinterpret_cast<const ::xmlChar*>(value.c_str())
59 Attribute(::xmlNodePtr node,
const Namespace& nameSpace, const ::std::string& name, const ::std::string& value) :
64 reinterpret_cast<const ::xmlChar*>(name.c_str()),
65 reinterpret_cast<const ::xmlChar*>(value.c_str())
73 if (
nullptr != this->
attr &&
nullptr == this->
attr->doc)
75 ::xmlFreeProp(this->
attr);
79 ::xmlAttrPtr
get()
const
86 return nullptr != this->
attr->name ?
reinterpret_cast<const char*
>(this->
attr->name) : ::std::string();
101 if (
nullptr != this->
attr->ns)
103 ::boost::shared_array< ::xmlChar> value(
112 return nullptr != value.get() ?
reinterpret_cast<char*
>(value.get()) : ::std::string();
116 ::boost::shared_array< ::xmlChar> value(
124 return nullptr != value.get() ?
reinterpret_cast<char*
>(value.get()) : ::std::string();
135 xmlRemoveProp(this->
attr);
140 if (
nullptr != this->
attr->ns)
146 reinterpret_cast<const ::xmlChar*
>(value.c_str())
154 reinterpret_cast<const ::xmlChar*
>(value.c_str())
167 #endif // RL_XML_ATTRIBUTE_H
Attribute getPrevious() const
Definition: Attribute.h:94
::std::string getValue() const
Definition: Attribute.h:99
~Attribute()
Definition: Attribute.h:71
Definition: Attribute.h:41
::xmlAttrPtr get() const
Definition: Attribute.h:79
void setValue(const ::std::string &value)
Definition: Attribute.h:138
void remove()
Definition: Attribute.h:133
::std::string getName() const
Definition: Attribute.h:84
Attribute(::xmlNodePtr node, const ::std::string &name, const ::std::string &value)
Definition: Attribute.h:48
Attribute(::xmlNodePtr node, const Namespace &nameSpace, const ::std::string &name, const ::std::string &value)
Definition: Attribute.h:59
::xmlAttr & operator*() const
Definition: Attribute.h:128
Attribute getNext() const
Definition: Attribute.h:89
Definition: Namespace.h:39
Attribute(::xmlAttrPtr attr)
Definition: Attribute.h:43
::xmlAttrPtr attr
Definition: Attribute.h:162
Robotics Library.
Definition: AnalogInput.cpp:30