DynRPG
v0.20
RM2k3 Plugin SDK
|
Mighty wrapper class for RPG::DString pointers, the string class for RPG Maker strings. More...
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::DStringPtr & | operator= (std::string rhs) |
Assignment operator for std::string (recommended) | |
const RPG::DStringPtr & | operator= (char *rhs) |
Assignment operator for char * | |
const RPG::DStringPtr & | operator= (const char *rhs) |
Assignment operator for const char * | |
const RPG::DStringPtr & | operator= (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 | |
DString * | str |
Pointer to the actual string data. |
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.
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)
void RPG::DStringPtr::assign | ( | char * | s, |
int | len | ||
) |
Assigns the string from a char *
which may contain null bytes.
void RPG::DStringPtr::clear | ( | ) |
Clears the string.
int RPG::DStringPtr::length | ( | ) |
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)
Pointer to the actual string data.