Photon C++ Client API: ANSIString Class Reference

Photon C++ Client API

Photon C++ Client API  4.1.12.2
ANSIString Class Reference
Inheritance diagram for ANSIString:
Collaboration diagram for ANSIString:

Public Member Functions

 ANSIString (void)
 
 ANSIString (const ANSIString &str)
 
 ANSIString (const JString &str)
 
 ANSIString (const char *str)
 
 ANSIString (const EG_CHAR *str)
 
 ~ANSIString (void)
 
ANSIStringoperator= (const ANSIString &Rhs)
 
ANSIStringoperator= (const JString &Rhs)
 
ANSIStringoperator= (const char *Rhs)
 
ANSIStringoperator= (const EG_CHAR *Rhs)
 
 operator const char * (void) const
 
 operator JString (void) const
 
JString JStringRepresentation (void) const
 
unsigned int size (void) const
 
- Public Member Functions inherited from BaseCharString
 BaseCharString ()
 
virtual ~BaseCharString (void)
 
const char * cstr (void) const
 
unsigned int length (void) const
 
JStringtoString (JString &retStr, bool withTypes=false) const
 
- Public Member Functions inherited from Base
virtual ~Base (void)
 
- Public Member Functions inherited from ToString
virtual ~ToString (void)
 
virtual JString typeToString (void) const
 
JString toString (bool withTypes=false) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Base
static void setListener (const BaseListener *baseListener)
 
static int getDebugOutputLevel (void)
 
static bool setDebugOutputLevel (int debugLevel)
 
static const LogFormatOptionsgetLogFormatOptions (void)
 
static void setLogFormatOptions (const LogFormatOptions &options)
 

Detailed Description

The ANSIString class is a container class for char* strings, encoded with the current locale.

This is the current locale implementation of BaseCharString. Please look at the doc of the abstract base class for more information.

Constructor & Destructor Documentation

§ ANSIString() [1/5]

ANSIString ( void  )

Constructor: Creates an empty ANSIString.

§ ANSIString() [2/5]

ANSIString ( const ANSIString str)

Copy-Constructor: Creates a new ANSIString from a deep copy of the argument string.

Parameters
strThe ANSIString string to copy.

§ ANSIString() [3/5]

ANSIString ( const JString wstr)

Copy-Constructor: Creates a new ANSIString from a deep copy of the argument string.

Parameters
wstrThe JString string to copy.

§ ANSIString() [4/5]

ANSIString ( const char *  str)

Copy-Constructor: Creates a new ANSIString from a deep copy of the argument string.

Parameters
strThe ANSI string to copy.

§ ANSIString() [5/5]

ANSIString ( const EG_CHAR *  wstr)

Copy-Constructor: Creates a new ANSIString from a deep copy of the argument string.

Parameters
wstrThe Unicode String string to copy.

§ ~ANSIString()

~ANSIString ( void  )

Destructor.

Member Function Documentation

§ operator=() [1/4]

ANSIString & operator= ( const ANSIString Rhs)

operator=.

Makes a deep copy of its right operand into its left operand.

This overwrites old data in the left operand.

§ operator=() [2/4]

ANSIString & operator= ( const JString Rhs)

operator=.

Makes a deep copy of its right operand into its left operand.

This overwrites old data in the left operand.

§ operator=() [3/4]

ANSIString & operator= ( const char *  Rhs)

operator=.

Makes a deep copy of its right operand into its left operand.

This overwrites old data in the left operand.

§ operator=() [4/4]

ANSIString & operator= ( const EG_CHAR *  Rhs)

operator=.

Makes a deep copy of its right operand into its left operand.

This overwrites old data in the left operand.

§ operator const char *()

operator const char * ( void  ) const
virtual

operator const char*.

Copies a pointer to the content of its right operand into its left operand.

This overwrites old data in the left operand.

Implements BaseCharString.

§ operator JString()

operator JString ( void  ) const
virtual

operator JString.

Copies a JString representation of its right operand into its left operand.

This overwrites old data in the left operand.

Implements BaseCharString.

§ JStringRepresentation()

JString JStringRepresentation ( void  ) const
virtual
Returns
a JString representation of the string.

Implements BaseCharString.

§ size()

unsigned int size ( void  ) const
virtual

The default implementation of this function will just return length(), but for multibyte strings like UTF8String the return values of length() and size() can differ.

Returns
the size of the string in bytes

Implements BaseCharString.