OSRTUTF8String Class Reference

UTF-8 string. More...

#include <OSRTUTF8String.h>

Inheritance diagram for OSRTUTF8String:
OSRTBaseType

List of all members.

Public Member Functions

 OSRTUTF8String ()
 The default constructor creates an empty string.
 OSRTUTF8String (const char *strval)
 This constructor initializes the string to contain the given character string value.
 OSRTUTF8String (const OSUTF8CHAR *strval)
 This constructor initializes the string to contain the given UTF-8 character string value.
 OSRTUTF8String (const OSRTUTF8String &str)
 Copy constructor.
virtual ~OSRTUTF8String ()
 The destructor frees string memory if the memory ownership flag is set.
OSRTBaseTypeclone () const
 Clone method.
void copyValue (const char *str)
 This method copies the given string value to the internal string storage variable.
const char * c_str () const
 This method returns the pointer to C null terminated string.
const char * getValue () const
 This method returns the pointer to UTF-8 null terminated string.
void print (const char *name)
 This method prints the string value to standard output.
void setValue (const char *str)
 This method sets the string value to the given string.
OSRTUTF8Stringoperator= (const OSRTUTF8String &original)
 Assignment operator.

Detailed Description

UTF-8 string.

This is the base class for generated C++ data type classes for XSD string types (string, token, NMTOKEN, etc.).

Definition at line 39 of file OSRTUTF8String.h.


Constructor & Destructor Documentation

OSRTUTF8String::OSRTUTF8String ( const char *  strval  ) 

This constructor initializes the string to contain the given character string value.

Parameters:
strval - String value
OSRTUTF8String::OSRTUTF8String ( const OSUTF8CHAR *  strval  ) 

This constructor initializes the string to contain the given UTF-8 character string value.

Parameters:
strval - String value
OSRTUTF8String::OSRTUTF8String ( const OSRTUTF8String str  ) 

Copy constructor.

Parameters:
str - C++ XML string class.

Member Function Documentation

OSRTBaseType* OSRTUTF8String::clone (  )  const [inline, virtual]

Clone method.

Creates a copied instance and returns pointer to OSRTBaseType.

Reimplemented from OSRTBaseType.

Definition at line 81 of file OSRTUTF8String.h.

void OSRTUTF8String::copyValue ( const char *  str  ) 

This method copies the given string value to the internal string storage variable.

A deep-copy of the given value is done; the class will delete this memory when the object is deleted.

Parameters:
str - C null-terminated string.
void OSRTUTF8String::print ( const char *  name  )  [inline]

This method prints the string value to standard output.

Parameters:
name - Name of generated string variable.

Definition at line 111 of file OSRTUTF8String.h.

void OSRTUTF8String::setValue ( const char *  str  ) 

This method sets the string value to the given string.

A deep-copy of the given value is not done; the pointer is stored directly in the class member variable.

Parameters:
str - C null-terminated string.

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