SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Provides a polymorphically persistable RWWString. More...
#include <rw/collstr.h>
Public Member Functions | |
RWCollectableWString () | |
RWCollectableWString (const RWCollectableWString &str) | |
RWCollectableWString (const RWWString &s) | |
RWCollectableWString (const RWWSubString &s) | |
RWCollectableWString (const wchar_t *a) | |
RWCollectableWString (const wchar_t *a, size_t N) | |
RWCollectableWString (RWCollectableWString &&str) | |
RWCollectableWString (wchar_t c, size_t N) | |
virtual | ~RWCollectableWString () |
virtual RWspace | binaryStoreSize () const |
virtual int | compareTo (const RWCollectable *c) const |
virtual int | compareTo (const RWCollectableWString &c) const |
virtual RWCollectable * | copy () const |
virtual unsigned | hash () const |
virtual RWClassID | isA () const |
virtual bool | isEqual (const RWCollectable *c) const |
virtual RWCollectable * | newSpecies () const |
RWCollectableWString & | operator= (const RWCollectableWString &str) |
RWCollectableWString & | operator= (RWCollectableWString &&str) |
virtual void | restoreGuts (RWFile &) |
virtual void | restoreGuts (RWvistream &) |
virtual void | saveGuts (RWFile &) const |
virtual void | saveGuts (RWvostream &) const |
![]() | |
virtual | ~RWCollectable () |
RWspace | recursiveStoreSize () const |
RWStringID | stringID () const |
![]() | |
RWWString () | |
RWWString (char c) | |
RWWString (char c, size_t count) | |
RWWString (const char *str, ascii_) | |
RWWString (const char *str, multiByte_) | |
RWWString (const char *str, size_t len, ascii_) | |
RWWString (const char *str, size_t len, multiByte_) | |
RWWString (const ConstSubString &str) | |
RWWString (const RWCString &str, ascii_) | |
RWWString (const RWCString &str, multiByte_) | |
RWWString (const RWWString &str) | |
RWWString (const std::wstring &str) | |
RWWString (const SubString &str) | |
RWWString (const wchar_t *str) | |
RWWString (const wchar_t *str, size_t len) | |
RWWString (RWSize_T cap) | |
RWWString (RWWString &&str) | |
RWWString (signed char c) | |
RWWString (unsigned char c) | |
RWWString (wchar_t c) | |
RWWString (wchar_t c, size_t count) | |
RWWString & | append (const RWWString &str) |
RWWString & | append (const RWWString &str, size_t len) |
RWWString & | append (const std::wstring &str) |
RWWString & | append (const std::wstring &str, size_t len) |
RWWString & | append (const wchar_t *str) |
RWWString & | append (const wchar_t *str, size_t len) |
RWWString & | append (wchar_t c, size_t count=1) |
RWWString & | assign (const ConstSubString &str) |
RWWString & | assign (const RWWString &str) |
RWWString & | assign (const std::wstring &str) |
RWWString & | assign (const SubString &str) |
RWWString & | assign (const wchar_t *str) |
RWWString & | assign (const wchar_t *str, size_t len) |
RWWString & | assign (const wchar_t c, size_t count=1) |
RWspace | binaryStoreSize () const |
size_t | capacity () const |
size_t | capacity (size_t cap) |
int | collate (const RWWString &str) const |
int | collate (const std::wstring &str) const |
int | collate (const wchar_t *str) const |
int | compareTo (const RWWString &str, caseCompare cmp=exact) const |
int | compareTo (const RWWString *str, caseCompare cmp=exact) const |
int | compareTo (const std::wstring &str, caseCompare cmp=exact) const |
int | compareTo (const std::wstring *str, caseCompare cmp=exact) const |
int | compareTo (const wchar_t *str, caseCompare cmp=exact) const |
bool | contains (const RWWString &str, caseCompare cmp=exact) const |
bool | contains (const std::wstring &str, caseCompare cmp=exact) const |
bool | contains (const wchar_t *str, caseCompare cmp=exact) const |
const wchar_t * | data () const |
size_t | first (const wchar_t *str) const |
size_t | first (const wchar_t *str, size_t len) const |
size_t | first (wchar_t c) const |
size_t | first (wchar_t c, size_t) const |
unsigned long | hash (caseCompare cmp=exact) const |
size_t | index (const RWWString &pat, size_t patlen, size_t start, caseCompare cmp) const |
size_t | index (const RWWString &pat, size_t start=0, caseCompare cmp=exact) const |
size_t | index (const std::wstring &pat, size_t patlen, size_t start, caseCompare cmp) const |
size_t | index (const std::wstring &pat, size_t start=0, caseCompare cmp=exact) const |
size_t | index (const wchar_t *pat, size_t patlen, size_t start, caseCompare cmp) const |
size_t | index (const wchar_t *pat, size_t start=0, caseCompare cmp=exact) const |
RWWString & | insert (size_t pos, const RWWString &str) |
RWWString & | insert (size_t pos, const RWWString &str, size_t len) |
RWWString & | insert (size_t pos, const std::wstring &str) |
RWWString & | insert (size_t pos, const std::wstring &str, size_t len) |
RWWString & | insert (size_t pos, const wchar_t *str) |
RWWString & | insert (size_t pos, const wchar_t *str, size_t len) |
RWWString & | insert (size_t pos, wchar_t c, size_t count) |
bool | isAscii () const |
bool | isNull () const |
size_t | last (const wchar_t *str) const |
size_t | last (const wchar_t *str, size_t len) const |
size_t | last (wchar_t c) const |
size_t | last (wchar_t c, size_t) const |
size_t | length () const |
operator const wchar_t * () const | |
bool | operator!= (const RWWString &rhs) const |
wchar_t & | operator() (size_t i) |
wchar_t | operator() (size_t i) const |
SubString | operator() (size_t start, size_t len) |
ConstSubString | operator() (size_t start, size_t len) const |
RWWString & | operator+= (const RWWString &str) |
RWWString & | operator+= (const std::wstring &str) |
RWWString & | operator+= (const wchar_t *str) |
RWWString & | operator+= (wchar_t c) |
bool | operator< (const RWWString &rhs) const |
RWWString & | operator= (const ConstSubString &str) |
RWWString & | operator= (const RWWString &str) |
RWWString & | operator= (const std::wstring &str) |
RWWString & | operator= (const SubString &str) |
RWWString & | operator= (const wchar_t *str) |
RWWString & | operator= (RWWString &&str) |
RWWString & | operator= (wchar_t c) |
bool | operator== (const RWWString &rhs) const |
bool | operator> (const RWWString &rhs) const |
wchar_t & | operator[] (int i) |
wchar_t | operator[] (int i) const |
wchar_t & | operator[] (long i) |
wchar_t | operator[] (long i) const |
wchar_t & | operator[] (long long i) |
wchar_t | operator[] (long long i) const |
wchar_t & | operator[] (short i) |
wchar_t | operator[] (short i) const |
wchar_t & | operator[] (unsigned int i) |
wchar_t | operator[] (unsigned int i) const |
wchar_t & | operator[] (unsigned long i) |
wchar_t | operator[] (unsigned long i) const |
wchar_t & | operator[] (unsigned long long i) |
wchar_t | operator[] (unsigned long long i) const |
wchar_t & | operator[] (unsigned short i) |
wchar_t | operator[] (unsigned short i) const |
RWWString & | prepend (const RWWString &str) |
RWWString & | prepend (const RWWString &str, size_t len) |
RWWString & | prepend (const std::wstring &str) |
RWWString & | prepend (const std::wstring &str, size_t len) |
RWWString & | prepend (const wchar_t *str) |
RWWString & | prepend (const wchar_t *str, size_t len) |
RWWString & | prepend (wchar_t c, size_t count=1) |
std::istream & | readFile (std::istream &strm) |
std::istream & | readLine (std::istream &strm, bool skipWhite=true) |
std::istream & | readString (std::istream &strm) |
std::istream & | readToDelim (std::istream &strm) |
std::istream & | readToDelim (std::istream &strm, wchar_t delim) |
std::istream & | readToken (std::istream &strm) |
std::wistream & | readToken (std::wistream &strm) |
RWWString & | remove (size_t pos) |
RWWString & | remove (size_t pos, size_t len) |
RWWString & | replace (size_t pos, size_t len, const RWWString &str) |
RWWString & | replace (size_t pos, size_t len, const RWWString &str, size_t strLen) |
RWWString & | replace (size_t pos, size_t len, const std::wstring &str) |
RWWString & | replace (size_t pos, size_t len, const std::wstring &str, size_t strLen) |
RWWString & | replace (size_t pos, size_t len, const wchar_t *str) |
RWWString & | replace (size_t pos, size_t len, const wchar_t *str, size_t strLen) |
void | resize (size_t len) |
size_t | rindex (const RWWString &pat, size_t end=RW_NPOS, caseCompare cmp=exact) const |
size_t | rindex (const RWWString &pat, size_t patlen, size_t end, caseCompare cmp) const |
size_t | rindex (const std::wstring &pat, size_t end=RW_NPOS, caseCompare cmp=exact) const |
size_t | rindex (const std::wstring &pat, size_t patlen, size_t end, caseCompare cmp) const |
size_t | rindex (const wchar_t *pat, caseCompare cmp) const |
size_t | rindex (const wchar_t *pat, size_t end=RW_NPOS, caseCompare cmp=exact) const |
size_t | rindex (const wchar_t *pat, size_t patlen, size_t end, caseCompare cmp) const |
std::wstring & | std () |
const std::wstring & | std () const |
SubString | strip (stripType st=trailing, wchar_t c=L' ') |
ConstSubString | strip (stripType st=trailing, wchar_t c=L' ') const |
SubString | subString (const wchar_t *pat, size_t start=0, caseCompare cmp=exact) |
ConstSubString | subString (const wchar_t *pat, size_t start=0, caseCompare cmp=exact) const |
void | swap (RWWString &str) |
RWCString | toAscii () const |
void | toLower () |
RWCString | toMultiByte () const |
void | toUpper () |
Static Public Member Functions | |
static RWClassID | classIsA () |
![]() | |
static RWClassID | classID (const RWStringID &name) |
static RWClassID | classIsA () |
static bool | isAtom (RWClassID id) |
static RWspace | nilStoreSize () |
![]() | |
static RWWString | fromAscii (const RWCString &str) |
static RWWString | fromMultiByte (const RWCString &str) |
static unsigned | hash (const RWWString &wstr) |
static size_t | initialCapacity (size_t capacity=15) |
static size_t | maxWaste (size_t maxwaste=16) |
static size_t | resizeIncrement (size_t increment=16) |
Additional Inherited Members | |
![]() | |
enum | ascii_ { ascii } |
enum | caseCompare { exact , ignoreCase , ignoreCaseStrict } |
typedef RWWConstSubString | ConstSubString |
enum | multiByte_ { multiByte } |
enum | stripType { leading , trailing , both } |
typedef RWWSubString | SubString |
![]() | |
bool | operator!= (const RWWConstSubString &lhs, const RWWString &rhs) |
bool | operator!= (const RWWString &lhs, const RWWConstSubString &rhs) |
bool | operator!= (const RWWString &lhs, const RWWSubString &rhs) |
bool | operator!= (const RWWString &lhs, const std::wstring &rhs) |
bool | operator!= (const RWWString &lhs, const wchar_t *rhs) |
bool | operator!= (const RWWSubString &lhs, const RWWString &rhs) |
bool | operator!= (const std::wstring &lhs, const RWWString &rhs) |
bool | operator!= (const wchar_t *lhs, const RWWString &rhs) |
RWWString | operator+ (const RWWConstSubString &lhs, const RWWConstSubString &rhs) |
RWWString | operator+ (const RWWConstSubString &lhs, const RWWString &rhs) |
RWWString | operator+ (const RWWConstSubString &lhs, const RWWSubString &rhs) |
RWWString | operator+ (const RWWConstSubString &lhs, const std::wstring &rhs) |
RWWString | operator+ (const RWWConstSubString &lhs, const wchar_t *rhs) |
RWWString | operator+ (const RWWString &lhs, const RWWConstSubString &rhs) |
RWWString | operator+ (const RWWString &lhs, const RWWString &rhs) |
RWWString | operator+ (const RWWString &lhs, const RWWSubString &rhs) |
RWWString | operator+ (const RWWString &lhs, const std::wstring &rhs) |
RWWString | operator+ (const RWWString &lhs, const wchar_t *rhs) |
RWWString | operator+ (const RWWSubString &lhs, const RWWConstSubString &rhs) |
RWWString | operator+ (const RWWSubString &lhs, const RWWString &rhs) |
RWWString | operator+ (const RWWSubString &lhs, const RWWSubString &rhs) |
RWWString | operator+ (const RWWSubString &lhs, const std::wstring &rhs) |
RWWString | operator+ (const RWWSubString &lhs, const wchar_t *rhs) |
RWWString | operator+ (const std::wstring &lhs, const RWWConstSubString &rhs) |
RWWString | operator+ (const std::wstring &lhs, const RWWString &rhs) |
RWWString | operator+ (const std::wstring &lhs, const RWWSubString &rhs) |
RWWString | operator+ (const wchar_t *lhs, const RWWConstSubString &rhs) |
RWWString | operator+ (const wchar_t *lhs, const RWWString &rhs) |
RWWString | operator+ (const wchar_t *lhs, const RWWSubString &rhs) |
bool | operator< (const RWWString &lhs, const std::wstring &rhs) |
bool | operator< (const RWWString &lhs, const wchar_t *rhs) |
bool | operator< (const std::wstring &lhs, const RWWString &rhs) |
bool | operator< (const wchar_t *lhs, const RWWString &rhs) |
RWFile & | operator<< (RWFile &file, const RWWString &str) |
RWvostream & | operator<< (RWvostream &vos, const RWWString &str) |
std::ostream & | operator<< (std::ostream &os, const RWWString &s) |
std::wostream & | operator<< (std::wostream &os, const RWWString &str) |
bool | operator<= (const RWWString &lhs, const std::wstring &rhs) |
bool | operator<= (const RWWString &lhs, const wchar_t *rhs) |
bool | operator<= (const RWWString &rhs) const |
bool | operator<= (const std::wstring &lhs, const RWWString &rhs) |
bool | operator<= (const wchar_t *lhs, const RWWString &rhs) |
bool | operator== (const RWWConstSubString &lhs, const RWWString &rhs) |
bool | operator== (const RWWString &lhs, const RWWConstSubString &rhs) |
bool | operator== (const RWWString &lhs, const RWWSubString &rhs) |
bool | operator== (const RWWString &lhs, const std::wstring &rhs) |
bool | operator== (const RWWString &lhs, const wchar_t *rhs) |
bool | operator== (const RWWSubString &lhs, const RWWString &rhs) |
bool | operator== (const std::wstring &lhs, const RWWString &rhs) |
bool | operator== (const wchar_t *lhs, const RWWString &rhs) |
bool | operator> (const RWWString &lhs, const std::wstring &rhs) |
bool | operator> (const RWWString &lhs, const wchar_t *rhs) |
bool | operator> (const std::wstring &lhs, const RWWString &rhs) |
bool | operator> (const wchar_t *lhs, const RWWString &rhs) |
bool | operator>= (const RWWString &lhs, const std::wstring &rhs) |
bool | operator>= (const RWWString &lhs, const wchar_t *rhs) |
bool | operator>= (const RWWString &rhs) const |
bool | operator>= (const std::wstring &lhs, const RWWString &rhs) |
bool | operator>= (const wchar_t *lhs, const RWWString &rhs) |
RWFile & | operator>> (RWFile &file, RWWString &cstr) |
RWvistream & | operator>> (RWvistream &str, RWWString &cstr) |
std::istream & | operator>> (std::istream &s, RWWString &str) |
RWWString | strXForm (const RWWString &str) |
RWWString | strXForm (const std::wstring &str) |
RWWString | toLower (const RWWString &str) |
RWWString | toUpper (const RWWString &str) |
Collectable wide strings paralleling RWCollectableString. This class is useful when wide strings are stored and retrieved as RWCollectables, or when they are used as keys in the "dictionary" collection classes. Class RWCollectableWString inherits from both class RWWString and class RWCollectable.
The virtual functions of the base class RWCollectable have been redefined.
wchar_t
strings may vary. If your application is dependent on the presence of encodings across different operating systems, you need to ensure that it supports the desired formats.RWCollectableWString::RWCollectableWString | ( | ) |
Creates a string of length zero (the null string).
|
inline |
Copy constructor. The created string copies the data from str.
|
inline |
Move constructor. The created collectable string takes ownership of the data owned by str.
|
inline |
Creates a string from the wide character string a. The created string copies the data pointed to by a, up to the first terminating null.
|
inline |
Constructs a string from the character string a. The created string copies the data pointed to by a. Exactly N characters are copied, including any embedded nulls. Hence, the buffer pointed to by a must be at least N * sizeof(wchar_t)
bytes or N wide characters long.
|
inline |
Constructs a string containing the character c repeated N times.
|
inline |
Constructs an RWCollectableWString from the RWWString s by copying data from s.
|
inline |
Converts from sub-string. The created string copies the substring represented by s.
|
virtual |
Empty destructor.
|
inlinevirtual |
Returns the number of bytes used by the virtual function saveGuts(RWFile&) to store an object. Typically, this involves adding up the space required to store all primitives, plus the results of calling recursiveStoreSize() for all objects inheriting from RWCollectable. See the Essential Tools Module User's Guide for details.
Reimplemented from RWCollectable.
|
virtual |
If c is an RWCollectableWString, returns the result of calling RWWString::compareTo(), otherwise returns a nonzero value based on the type of c.
Reimplemented from RWCollectable.
|
inlinevirtual |
Returns a result equivalent to calling RWWString::compareTo(const RWWString& c).
|
virtual |
Returns a new, copy-constructed object of the same type as self. The caller is responsible for deleting the object.
Reimplemented from RWCollectable.
|
virtual |
Calls RWWString::hash() and returns the results.
Reimplemented from RWCollectable.
|
virtual |
Returns the unique ID for RWCollectableWString.
Reimplemented from RWCollectable.
|
virtual |
Behaves as if compareTo(t) was invoked, returning true
if the result equals 0, false
otherwise.
Reimplemented from RWCollectable.
|
virtual |
Returns a new, default-constructed object of the same type as self. The caller is responsible for deleting the object.
Reimplemented from RWCollectable.
|
inline |
Assignment operator. The string copies the data from str. Returns a reference to self.
|
inline |
Move assignment. Self takes ownership of the data owned by str.
|
virtual |
Reads an object's state from a binary file, using class RWFile, replacing the previous state.
Reimplemented from RWCollectable.
|
virtual |
Reads an object's state from an input stream, replacing the previous state.
Reimplemented from RWCollectable.
|
virtual |
Writes an object's state to a binary file, using class RWFile.
Reimplemented from RWCollectable.
|
virtual |
Writes an object's state to an output stream.
Reimplemented from RWCollectable.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |