SourceForge.net Logo
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PmtDomString Class Reference

#include <PmtDomString.h>

List of all members.

Public Methods

 PmtDomString (DOMString &domString)
 This is a constructor. More...

 PmtDomString (const DOMString &domString)
 This is another constructor. More...

 PmtDomString (const char *utf8Str)
 PmtDomString (const wchar_t *s)
 ~PmtDomString ()
 This is the destructor. More...

SPmtString getString ()
const char * getAsciiString ()
 This method returns an ascii representation of the DOMString. More...

DOMString getDOMString ()


Detailed Description

The PmtDomString class is the interface between the Xerces' DOMString class and PMT. It provides Unicode translation services.

For example, if you need to store a DOMString into a std::string, use PmtDomString as an intermediate step:

      DOMString ds = L"String with unicode text";
      PmtDomString pds(ds);
      std::string s = pds.getString();

Using PmtDomString ensures that `s' contains UTF-8 encoded unicode text. This allows us to use Unicode strings throughout PMT, allowing us to ignore code-pages and other internationalization issues.

PmtDomString must also be used to go from ASCII/UTF-8 text to DOMStrings:

      std::string s = "UTF-8 encoded text...";
      PmtDomString pds(s);
      DOMString ds = pds.getDOMString();

This ensures that UTF-8 encoded text is properly translated into Unicode UTF-16 when creating the DOMString.


Constructor & Destructor Documentation

PmtDomString::PmtDomString DOMString &    domString [inline]
 

This is a constructor.

PmtDomString::PmtDomString const DOMString &    domString [inline]
 

This is another constructor.

PmtDomString::PmtDomString const char *    utf8Str
 

Convert the UTF-8 encoded SPmtString into a DOMString

Parameters:
utf8Str  The UTF-8 encoded SPmtString to translate.

PmtDomString::PmtDomString const wchar_t *    s [inline]
 

Initialize the the DOMString with Unicode text.

Parameters:
s  The Unicode SPmtString to wrap.

PmtDomString::~PmtDomString  
 

This is the destructor.


Member Function Documentation

const char * PmtDomString::getAsciiString  
 

This method returns an ascii representation of the DOMString.

DOMString PmtDomString::getDOMString  
 

Get the wrapped DOMString object.

SPmtString PmtDomString::getString  
 


The documentation for this class was generated from the following files:
Last Updated: March 12, 2003 (rlr)
Copyright © 2003 Eastman Kodak Company All Rights Reserved.