DualString Class Reference
Dual-purpose (and two-faced) string: wraps a string (XMLCh* or char*) and lets you access it in either form.
More...
#include <Helper-classes.hh>
List of all members.
|
Public Member Functions |
|
| DualString (const XMLCh *const original) |
|
| DualString (const XMLCh *const original, int length) |
|
| DualString (const char *const original) |
|
| DualString (const char *const original, int length) |
|
| DualString (const std::string &original) |
|
const char * | asCString () const throw () |
|
const XMLCh * | asXMLString () const throw () |
|
std::ostream & | print (std::ostream &s) const |
Detailed Description
Dual-purpose (and two-faced) string: wraps a string (XMLCh* or char*) and lets you access it in either form.
This is a value-added version of the "StrX" class from Xerces-C examples.
NOTE: the constructor COPIES the string it's given, so beware of using loose strings as ctor parameters. One reason to duplicate it to guarantee the const char* string is allocated from the Xerces memory pool and therefore may be freed using Xerces functions.
As a value-add feature, this class could store a std::string instead of a char* and thus provide accessors to return "const std::string&" as well as "const char*". Perhaps in a future version.
The documentation for this class was generated from the following files:
Generated on Sat Jun 23 16:10:23 2007 for Stechec/TBT by
1.4.7