DynRPG v0.32 Unofficial
Plugin SDK
Public Member Functions | Public Attributes | List of all members
RPG::DStringPtr Class Reference

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

#include <DStringPtr.h>

Public Member Functions

 DStringPtr ()
 Constructor (initializes the pointer to zero)
 
 DStringPtr (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 DStringPtroperator= (std::string rhs)
 Assignment operator for std::string (recommended)
 
const DStringPtroperator= (char *rhs)
 Assignment operator for char *
 
const DStringPtroperator= (const char *rhs)
 Assignment operator for const char *
 
const DStringPtroperator= (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== (DStringPtr &rhs)
 Comparison operator for other 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 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

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