ASN1C C/C++ Common Runtime  ASN1C v7.7.x
Public Member Functions | List of all members
OSRTUTF8String Class Reference

#include <OSRTUTF8String.h>

Inheritance diagram for OSRTUTF8String:
OSRTBaseType

Public Member Functions

 OSRTUTF8String ()
 
 OSRTUTF8String (const char *strval)
 
 OSRTUTF8String (const OSUTF8CHAR *strval)
 
 OSRTUTF8String (const OSRTUTF8String &str)
 
virtual ~OSRTUTF8String ()
 
OSRTBaseTypeclone () const
 
void copyValue (const char *str)
 
const char * c_str () const
 
const char * getValue () const
 
void print (const char *name)
 
void setValue (const char *str)
 
OSRTUTF8Stringoperator= (const OSRTUTF8String &original)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ OSRTUTF8String() [1/4]

OSRTUTF8String::OSRTUTF8String ( )

The default constructor creates an empty string.

◆ OSRTUTF8String() [2/4]

OSRTUTF8String::OSRTUTF8String ( const char *  strval)

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

Parameters
strval- String value

◆ OSRTUTF8String() [3/4]

OSRTUTF8String::OSRTUTF8String ( const OSUTF8CHAR *  strval)

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

Parameters
strval- String value

◆ OSRTUTF8String() [4/4]

OSRTUTF8String::OSRTUTF8String ( const OSRTUTF8String str)

Copy constructor.

Parameters
str- C++ XML string class.

◆ ~OSRTUTF8String()

virtual OSRTUTF8String::~OSRTUTF8String ( )
virtual

The destructor frees string memory if the memory ownership flag is set.

Member Function Documentation

◆ c_str()

const char* OSRTUTF8String::c_str ( ) const
inline

This method returns the pointer to C null terminated string.

◆ clone()

OSRTBaseType* OSRTUTF8String::clone ( ) const
inlinevirtual

Clone method. Creates a copied instance and returns pointer to OSRTBaseType.

Reimplemented from OSRTBaseType.

◆ copyValue()

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.

◆ getValue()

const char* OSRTUTF8String::getValue ( ) const
inline

This method returns the pointer to UTF-8 null terminated string.

◆ operator=()

OSRTUTF8String& OSRTUTF8String::operator= ( const OSRTUTF8String original)

Assignment operator.

◆ print()

void OSRTUTF8String::print ( const char *  name)
inline

This method prints the string value to standard output.

Parameters
name- Name of generated string variable.

References rtxPrintCharStr().

◆ setValue()

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: