ASN1C C/C++ Common Runtime  ASN1C v7.5.x
Public Member Functions | Protected Attributes | List of all members
OSRTFastString Class Reference

#include <OSRTFastString.h>

Inheritance diagram for OSRTFastString:

Public Member Functions

 OSRTFastString ()
 
 OSRTFastString (const char *strval)
 
 OSRTFastString (const OSUTF8CHAR *strval)
 
 OSRTFastString (const OSRTFastString &str)
 
virtual ~OSRTFastString ()
 
virtual OSRTStringIF * clone ()
 
virtual const char * getValue () const
 
virtual const OSUTF8CHAR * getUTF8Value () const
 
virtual void print (const char *name)
 
virtual void setValue (const char *str)
 
virtual void setValue (const OSUTF8CHAR *str)
 
OSRTFastStringoperator= (const OSRTFastString &original)
 

Protected Attributes

const OSUTF8CHAR * mValue
 

Detailed Description

C++ fast string class definition. This can be used to hold standard ASCII or UTF-8 strings. This string class implementations directly assigns any assigned pointers to internal member variables. It does no memory management.

Constructor & Destructor Documentation

◆ OSRTFastString() [1/4]

OSRTFastString::OSRTFastString ( )

The default constructor sets the internal string member variable pointer to null.

◆ OSRTFastString() [2/4]

OSRTFastString::OSRTFastString ( const char *  strval)

This constructor initializes the string to contain the given standard ASCII string value.

Parameters
strval- Null-terminated C string value

◆ OSRTFastString() [3/4]

OSRTFastString::OSRTFastString ( const OSUTF8CHAR *  strval)

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

Parameters
strval- Null-terminated C string value

◆ OSRTFastString() [4/4]

OSRTFastString::OSRTFastString ( const OSRTFastString str)

Copy constructor. String data is not copied; the pointer is simply assigned to the target class member variable.

Parameters
str- C++ string object to be copied.

◆ ~OSRTFastString()

virtual OSRTFastString::~OSRTFastString ( )
virtual

The destructor does nothing.

Member Function Documentation

◆ clone()

virtual OSRTStringIF* OSRTFastString::clone ( )
inlinevirtual

This method creates a copy of the given string object.

◆ getUTF8Value()

virtual const OSUTF8CHAR* OSRTFastString::getUTF8Value ( ) const
inlinevirtual

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

◆ getValue()

virtual const char* OSRTFastString::getValue ( ) const
inlinevirtual

This method returns the pointer to UTF-8 null terminated string as a standard ASCII string.

◆ operator=()

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

Assignment operator.

◆ print()

virtual void OSRTFastString::print ( const char *  name)
inlinevirtual

This method prints the string value to standard output.

Parameters
name- Name of generated string variable.

References rtxPrintCharStr().

◆ setValue() [1/2]

virtual void OSRTFastString::setValue ( const char *  str)
virtual

This method sets the string value to the given string.

Parameters
str- C null-terminated string.

◆ setValue() [2/2]

virtual void OSRTFastString::setValue ( const OSUTF8CHAR *  str)
virtual

This method sets the string value to the given UTF-8 string value.

Parameters
str- C null-terminated UTF-8 string.

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