RobWorkProject
24.12.4-
|
Utility class to help convert between Xerces unicode XMLCh* and ordinary C/C++ strings. More...
#include <XercesUtils.hpp>
Public Member Functions | |
XMLStr (const char *const str) | |
Constructs from char array. | |
XMLStr (const std::string &str) | |
Constructs from std::string. | |
XMLStr (double value) | |
Constructs from double. More... | |
XMLStr (int value) | |
Constructs from int. More... | |
XMLStr (bool value) | |
Constructs from bool. More... | |
XMLStr (const XMLCh *ch) | |
Constructs from unicode string. | |
~XMLStr () | |
Destructor. | |
const XMLCh * | uni () const |
Returns the unicode value. More... | |
std::string | str () const |
Returns std::string from unicode. More... | |
XMLStr (const XMLStr &xmlstr) | |
Utility class to help convert between Xerces unicode XMLCh* and ordinary C/C++ strings.
The class makes sure to clean up pointers
|
inline |
Constructs from double.
The methods uses an ordinary sprintf to convert into ch*, which are then converted to unicode.
|
inline |
Constructs from int.
The methods uses an ordinary sprintf to convert into ch*, which are then converted to unicode.
|
inline |
Constructs from bool.
The methods convert true into the text "true" and false into "false"
|
inline |
Returns std::string from unicode.
Only defined when the object is constructed using XMLStr(const XMLCh* ch).
|
inline |
Returns the unicode value.
If constructed with XMLStr(const XMLCh* ch) no conversion has appeared and the method returns NULL