xmldom::DomString Class Reference

#include <DomString.h>

List of all members.


Detailed Description

The DomString represents a unicode string which is used for all DOM operations.

The string supports conversion from Latin1 (ISO-8859-1) 8-bit encoding into unicode and back. But converting unicode into any 8-bit encinding can result in data loss, because characters which can not be converted are dopped.

See also:
More Informations About the DOM 3 standard.


Public Member Functions

 DomString ()
 Create an empty string.
 DomString (const std::string &latin1String)
 Create a string from a std latin1 string.
 DomString (const char *latin1String)
 Create a string from a latin1 string.
 DomString (const std::wstring &wcharString)
 Create a string from a std wide character string.
 DomString (const wchar_t *wcharString)
 Create a string from a wchar_t string.
 DomString (const DomString &copy)
 copy ctor
virtual ~DomString ()
 dtor
const DomStringoperator= (const DomString &assign)
 assignment
unsigned int getLength () const
 Get the length of this string.
std::string toLatin1 () const
 Convert this string into a latin1 string.
std::wstring toWCharString () const
 Convert this string into a wchar_t string.
bool isNull () const
 Check if this is a "null" string.
bool operator== (const DomString &compare) const
 Compare this string with another one.
bool operator!= (const DomString &compare) const
 Compare this string with another one.


Constructor & Destructor Documentation

xmldom::DomString::DomString (  ) 

Create an empty string.

xmldom::DomString::DomString ( const std::string &  latin1String  ) 

Create a string from a std latin1 string.

xmldom::DomString::DomString ( const char *  latin1String  ) 

Create a string from a latin1 string.

This is a helper function which is calling DomString( std::string( latin1String ) ) internally.

xmldom::DomString::DomString ( const std::wstring &  wcharString  ) 

Create a string from a std wide character string.

The format of a wchar_t string is depending on the platform, but the conversion should work as expected.

xmldom::DomString::DomString ( const wchar_t *  wcharString  ) 

Create a string from a wchar_t string.

This helper function simply converts the wchar_t string with DomString( std::wstring( wcharString ) ).

xmldom::DomString::DomString ( const DomString copy  ) 

copy ctor

xmldom::DomString::~DomString (  )  [virtual]

dtor


Member Function Documentation

const DomString & xmldom::DomString::operator= ( const DomString assign  ) 

assignment

unsigned int xmldom::DomString::getLength (  )  const

Get the length of this string.

std::string xmldom::DomString::toLatin1 (  )  const

Convert this string into a latin1 string.

Warning:
This operation is not reversible! Unicode characters can get lost while converting into latin1 and will never come back.

std::wstring xmldom::DomString::toWCharString (  )  const

Convert this string into a wchar_t string.

The format of a wchar_t string is depending on the platform, but the conversion should work as expected.

bool xmldom::DomString::isNull (  )  const

Check if this is a "null" string.

A "null" string has not the same meaning as a empty string. But the behavior is in the most cases the same.

bool xmldom::DomString::operator== ( const DomString compare  )  const

Compare this string with another one.

If one string is a "null" string the result is always false. Only if both strings are "null" strings the result is true.

Returns:
true if both strings are equal.

bool xmldom::DomString::operator!= ( const DomString compare  )  const

Compare this string with another one.

If one string is a "null" string the result is always true. Only if both strings are "null" strings the result is false.

Returns:
true if both strings are not equal.


The documentation for this class was generated from the following files:
Generated on Fri May 30 11:15:13 2008 for XMLDOM by  doxygen 1.5.2