Xerces-C++ 3.2.4
TranscodeFromStr Class Reference

#include <xercesc/util/TransService.hpp>

Public Member Functions

 TranscodeFromStr (const XMLByte *data, XMLSize_t length, const char *encoding, MemoryManager *manager=XMLPlatformUtils::fgMemoryManager)
 Converts from the specified encoding to the internal XMLCh* encoding.
 TranscodeFromStr (const XMLByte *data, XMLSize_t length, XMLTranscoder *trans, MemoryManager *manager=XMLPlatformUtils::fgMemoryManager)
 Converts from the specified encoding to the internal XMLCh* encoding.
 ~TranscodeFromStr ()

Getter methods

const XMLChstr () const
 Returns the transcoded, null terminated string.
XMLChadopt ()
 Returns the transcoded, null terminated string - adopting the memory allocated to it from the TranscodeFromStr object.
XMLSize_t length () const
 Returns the length of the transcoded string in characters.

Constructor & Destructor Documentation

◆ TranscodeFromStr() [1/2]

TranscodeFromStr::TranscodeFromStr ( const XMLByte * data,
XMLSize_t length,
const char * encoding,
MemoryManager * manager = XMLPlatformUtils::fgMemoryManager )

Converts from the specified encoding to the internal XMLCh* encoding.

Parameters
datathe source buffer to be transcoded
lengththe length of the source buffer
encodingthe name of the encoding to transcode to
managerthe memory manager to use

References XMLPlatformUtils::fgMemoryManager, and length().

Referenced by ~TranscodeFromStr().

◆ TranscodeFromStr() [2/2]

TranscodeFromStr::TranscodeFromStr ( const XMLByte * data,
XMLSize_t length,
XMLTranscoder * trans,
MemoryManager * manager = XMLPlatformUtils::fgMemoryManager )

Converts from the specified encoding to the internal XMLCh* encoding.

Parameters
datathe source buffer to be transcoded
lengththe length of the source buffer
transthe transcoder to use
managerthe memory manager to use

References XMLPlatformUtils::fgMemoryManager, and length().

◆ ~TranscodeFromStr()

TranscodeFromStr::~TranscodeFromStr ( )

Member Function Documentation

◆ adopt()

XMLCh * TranscodeFromStr::adopt ( )

Returns the transcoded, null terminated string - adopting the memory allocated to it from the TranscodeFromStr object.

Returns
the transcoded string

Referenced by ~TranscodeFromStr().

◆ length()

XMLSize_t TranscodeFromStr::length ( ) const

Returns the length of the transcoded string in characters.

The length does not include the null terminator.

Returns
the length of the transcoded string in characters

Referenced by TranscodeFromStr(), TranscodeFromStr(), and ~TranscodeFromStr().

◆ str()

const XMLCh * TranscodeFromStr::str ( ) const

Returns the transcoded, null terminated string.

Returns
the transcoded string

Referenced by ~TranscodeFromStr().


The documentation for this class was generated from the following file: