OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Reference to reference counted string object TUString Lightweight reference object consisting of a pointer to actual object Facilitates copying and assignment with minimal string reallocations. More...
#include <owl/string.h>
Public Member Functions | |
TString (const char *s=0) | |
Construct a TString from any type of string. | |
TString (const wchar_t *s) | |
Construct a TString from a wide character array. | |
TString (BSTR s, bool loan) | |
Construct a TString from a BSTR (OLE String) | |
TString (TSysStr &s, bool loan) | |
Construct a TString from a System string (BSTR) | |
TString (const tstring &s) | |
Construct a TString from a string. | |
TString (TUString *s) | |
Construct a TString from a TUString. | |
TString (const TString &src) | |
Construct a TString from a TString (Copy Constructor) | |
~TString () | |
int | Length () const |
The length in characters of this string. | |
bool | IsNull () const |
Is the string NULL? | |
bool | IsWide () const |
Are the string contents any kind of wide? | |
TString & | operator= (const TString &s) |
Copy contents of TString s into this string. | |
TString & | operator= (const tstring &s) |
Copy contents of string s into this string. | |
TString & | operator= (const char *s) |
Copy contents of const char* s into this string. | |
TString & | operator= (char *s) |
Copy contents of char* s into this string. | |
TString & | operator= (const wchar_t *s) |
Copy contents of const wchar_t* s into this string. | |
TString & | operator= (wchar_t *s) |
Copy contents of wchar_t* s into this string. | |
operator const char * () const | |
Return string as a const char *. | |
operator char * () | |
Return string as a char*. | |
operator const wchar_t * () const | |
Return string as a const wchar_t*. | |
operator wchar_t * () | |
Return string as a wchar_t*. | |
BSTR | AsBSTR () const |
Return a BSTR object owned by 'this' (not by the caller) | |
BSTR | RelinquishSysStr () const |
Return a pointer (BSTR) to a copy of the string. | |
wchar_t * | RelinquishWide () const |
Return a pointer (wchar_t*) to a copy of the string. | |
char * | RelinquishNarrow () const |
Return a pointer (char*) to a copy of the string. | |
tchar * | Relinquish () const |
Return a pointer (tchar*) to a copy of the string. | |
TLangId | GetLangId () |
Get Language Id of this string. | |
void | SetLangId (TLangId id) |
Set Language Id of this string. | |
Protected Attributes | |
TUString * | S |
Reference to reference counted string object TUString Lightweight reference object consisting of a pointer to actual object Facilitates copying and assignment with minimal string reallocations.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return a BSTR object owned by 'this' (not by the caller)
Definition at line 421 of file string.h.
References owl::TUString::ConvertToBSTR(), and S.
|
inline |
Get Language Id of this string.
Definition at line 465 of file string.h.
References owl::TUString::Lang, and S.
|
inline |
Is the string NULL?
Return true if string is empty.
Definition at line 325 of file string.h.
References owl::TUString::IsNull(), and S.
|
inline |
Are the string contents any kind of wide?
Return true if string uses wide character set.
Definition at line 333 of file string.h.
References owl::TUString::IsWide(), and S.
|
inline |
The length in characters of this string.
Definition at line 317 of file string.h.
References owl::TUString::Length(), and S.
|
inline |
|
inline |
|
inline |
|
inline |
Copy contents of char* s into this string.
Definition at line 365 of file string.h.
References owl::TUString::Assign(), and S.
Copy contents of const char* s into this string.
Definition at line 357 of file string.h.
References owl::TUString::Assign(), and S.
Copy contents of TString s into this string.
Definition at line 341 of file string.h.
References owl::TUString::Assign(), and S.
Copy contents of string s into this string.
Definition at line 349 of file string.h.
References owl::TUString::Assign(), and S.
Copy contents of const wchar_t* s into this string.
Definition at line 373 of file string.h.
References owl::TUString::Assign(), and S.
Copy contents of wchar_t* s into this string.
Definition at line 381 of file string.h.
References owl::TUString::Assign(), and S.
|
inline |
Return a pointer (tchar*) to a copy of the string.
Definition at line 453 of file string.h.
References RelinquishNarrow(), and RelinquishWide().
|
inline |
Return a pointer (char*) to a copy of the string.
Definition at line 445 of file string.h.
References S, and strnewdup().
|
inline |
Return a pointer (BSTR) to a copy of the string.
Definition at line 429 of file string.h.
References S, and owl::TOleAuto::SysAllocString().
|
inline |
Return a pointer (wchar_t*) to a copy of the string.
Definition at line 437 of file string.h.
References S, and strnewdup().
Set Language Id of this string.
Definition at line 474 of file string.h.
References owl::TUString::Lang, and S.