Contents
|
In file ../../src/Pegasus/Common/String.h:
class PEGASUS_COMMON_LINKAGE CString |
The CString class provides access to an 8-bit String representation
Documentation
The CString class provides access to an 8-bit String representation
Inheritance:
Public Methods
| CString ()
Constructs a CString object with a null string value
|
| CString (const CString& cstr)
Constructs an independent copy of a CString object.
|
| ~CString ()
Destructs a CString object
|
CString& | operator= (const CString& cstr)
Copies the value of another CString object.
|
| operator const char* () const
Gets the CString's data as a C string pointer.
|
- CString()
-
Constructs a CString object with a null string value
- CString(const CString& cstr)
-
Constructs an independent copy of a CString object.
- Parameters:
- cstr - The CString instance to copy.
- ~CString()
-
Destructs a CString object
- CString& operator=(const CString& cstr)
-
Copies the value of another CString object.
- Parameters:
- cstr - The CString object from which to copy the value.
- Returns:
- A reference to the target CString object with its newly
assigned value.
- operator const char*() const
-
Gets the CString's data as a C string pointer. IMPORTANT: The
returned pointer refers to memory owned by the CString object. The
caller must not free this memory. The returned pointer is valid only
until the CString object is destructed or reassigned. Use of this
operator on a temporary CString object may result in a memory error.
For example, this usage is invalid:
const char* cstr = String("Hello").getCString();
printf(cstr);
- Returns:
- Returns a const char pointer to the CString's data.
- This class has no child classes.
- Friends:
- class String
Alphabetic index HTML hierarchy of classes or Java
|