#include <cppdom.h>
Public Methods | |
| XMLAttribute () | |
| XMLAttribute (const XMLAttribute &attr) | |
| XMLAttribute (const std::string &val) | |
| template<class T> | XMLAttribute (const T &val) |
| const std::string & | getString () const |
| template<class T> void | setValue (const T &val) |
| Set mData to the string value of val. More... | |
| template<class T> T | getValue () const |
| operator std::string () const | |
| Autoconversion to string (so old code should work). More... | |
Protected Attributes | |
| std::string | mData |
Just wraps a string (this is really just and attribute VALUE)
Definition at line 246 of file cppdom.h.
|
|
Definition at line 231 of file cppdom.cpp.
00232 : mData("") 00233 {} |
|
|
Definition at line 235 of file cppdom.cpp.
00236 : mData(attr.mData) 00237 {} |
|
|
Definition at line 239 of file cppdom.cpp.
00240 : mData(val) 00241 {} |
|
||||||||||
|
Definition at line 255 of file cppdom.h.
00256 {
00257 setValue<T>(val);
00258 }
|
|
|
Definition at line 243 of file cppdom.cpp. References mData. Referenced by operator std::string(), and cppdom::XMLNode::setAttribute().
00244 {
00245 return mData;
00246 }
|
|
|
Definition at line 277 of file cppdom.h.
00278 {
00279 T t;
00280 std::istringstream iss(mData);
00281 iss >> t;
00282 return t;
00283 }
|
|
|
Autoconversion to string (so old code should work).
Definition at line 248 of file cppdom.cpp. References getString().
00249 {
00250 return getString();
00251 }
|
|
||||||||||
|
Set mData to the string value of val.
Definition at line 269 of file cppdom.h.
00270 {
00271 std::ostringstream oss;
00272 oss << val;
00273 mData = oss.str();
00274 }
|
|
|
Definition at line 306 of file cppdom.h. Referenced by getString(). |
1.2.15