DynRPG  v0.14a
RM2k3 Plugin SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Public Attributes
RPG::DStringPtr Class Reference

Mighty wrapper class for RPG::DString pointers, the string class for RPG Maker strings. More...

List of all members.

Public Member Functions

 DStringPtr ()
 Constructor (intializes the pointer to zero)
 DStringPtr (RPG::DStringPtr &s)
 Copy constructor.
 DStringPtr (std::string s)
 Constructor (uses a std::string as template)
 ~DStringPtr ()
 Destructor (deallocates the string when the class is destroyed)
 operator std::string ()
 Cast operator for std::string (recommended)
 operator char * ()
 Cast operator for char *
const RPG::DStringPtroperator= (std::string rhs)
 Assignment operator for std::string (recommended)
const RPG::DStringPtroperator= (char *rhs)
 Assignment operator for char *
const RPG::DStringPtroperator= (const char *rhs)
 Assignment operator for const char *
const RPG::DStringPtroperator= (RPG::DString *rhs)
 Can be used to copy a string by writing newString = oldString.str;
bool operator== (std::string rhs)
 Comparison operator for std::string.
bool operator== (const char *rhs)
 Comparison operator for char *.
bool operator== (RPG::DStringPtr &rhs)
 Comparison oeprator for other RPG::DStringPtr classes.
void clear ()
 Clears the string.
void assign (char *s, int len)
 Assigns the string from a char * which may contain null bytes.
std::string s_str ()
 Explicit conversion function to std::string (recommended)
int length ()
 Returns the length of the string.

Public Attributes

DStringstr
 Pointer to the actual string data.

Detailed Description

Mighty wrapper class for RPG::DString pointers, the string class for RPG Maker strings.

This class can also be used to assign a Delphi string. The string will then automatically be reallocated if necessary.

Warning:
Please mind the Rules about strings!
See also:
DString

Constructor & Destructor Documentation

Constructor (intializes the pointer to zero)

Copy constructor.

RPG::DStringPtr::DStringPtr ( std::string  s)

Constructor (uses a std::string as template)

Destructor (deallocates the string when the class is destroyed)


Member Function Documentation

void RPG::DStringPtr::assign ( char *  s,
int  len 
)

Assigns the string from a char * which may contain null bytes.

Clears the string.

Returns the length of the string.

RPG::DStringPtr::operator char * ( )

Cast operator for char *

RPG::DStringPtr::operator std::string ( )

Cast operator for std::string (recommended)

const RPG::DStringPtr& RPG::DStringPtr::operator= ( std::string  rhs)

Assignment operator for std::string (recommended)

const RPG::DStringPtr& RPG::DStringPtr::operator= ( char *  rhs)

Assignment operator for char *

const RPG::DStringPtr& RPG::DStringPtr::operator= ( const char *  rhs)

Assignment operator for const char *

const RPG::DStringPtr& RPG::DStringPtr::operator= ( RPG::DString rhs)

Can be used to copy a string by writing newString = oldString.str;

bool RPG::DStringPtr::operator== ( std::string  rhs)

Comparison operator for std::string.

bool RPG::DStringPtr::operator== ( const char *  rhs)

Comparison operator for char *.

bool RPG::DStringPtr::operator== ( RPG::DStringPtr rhs)

Comparison oeprator for other RPG::DStringPtr classes.

std::string RPG::DStringPtr::s_str ( )

Explicit conversion function to std::string (recommended)


Member Data Documentation

Pointer to the actual string data.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator