Tools.h++ Class Reference

Table Of Contents
Public Constructors
RWCollectableString();
Construct an RWCollectableString with zero characters.
RWCollectableString(const RWCString& s);
Construct an RWCollectableString from the RWCString s.
RWCollectableString(const char* c);
Conversion from character string.
RWCollectableString(const RWCSubString&);
Conversion from sub-string.
RWCollectableString(char c, size_t N);
Construct an RWCollectableString with N characters (default blanks).
Public Member Functions
virtual RWspace
binaryStoreSize() const;
Redefined from class RWCollectable.
virtual int
compareTo(const RWCollectable* c) const;
Redefined from class RWCollectable. returns the result of
RWCString::compareTo(*(const String*)c, RWCString::exact). This compares strings
lexicographically, with case considered. It would be possible to define , for instance,
CaseFoldedString which did comparisons ignoring case. We have deliberately left this as
an exercise for two reasons: Because it is both easy to do and not universally needed; and
because the presence of both RWCollectableStrings and such a CaseFoldedString in any
kind of sorted collection has the potential for very confusing behavior, since the result of
a comparison would depend on the order in which the comparison was done.
virtual unsigned
hash() const;
Redefined from class RWCollectable. Calls RWCString::hash() and returns the results.
virtual RWClassID
isA() const;
Redefined from class RWCollectable to return __RWCOLLECTABLESTRING.
virtual RWBoolean
isEqual(const RWCollectable* c) const;