Tools.h++ Manual
21-58 104011 Tandem Computers Incorporated
21
RWCollectableInt
RWCollectableInt
||
RWCollectable RWInteger
Synopsis
typedef RWCollectableInt Integer; // Smalltalk typedef
#include <rw/collint.h>
RWCollectableInt i;
Description Collectable integers. Inherits classes
RWInteger
and
RWCollectable
. This
class is useful when integers are used as keys in the "dictionary" collection
classes, or if integers are stored and retrieved as
RWCollectables
. The
virtual functions of the base class
RWCollectable
have been redefined.
Public constructors
RWCollectableInt();
Calls the appropriate base class constructor. See
RWInteger::RWInteger()
.
RWCollectableInt(int i);
Calls the appropriate base class constructor. See
RWInteger::RWInteger(int)
.
Public member functions
virtual RWspace binaryStoreSize() const;
Redefined from class
RWCollectable
.
virtual int compareTo(const RWCollectable*
c) const;
Redefined from class
RWCollectable
. Returns the difference between self
and the
RWCollectableInt
pointed to by
c
.
virtual unsigned hash() const;
Redefined from class
RWCollectable
. Returns the
RWCollectableInt
's
value as an unsigned, to be used as a hash value.
virtual RWClassID isA() const;
Redefined from class
RWCollectable
to return
__RWCOLLECTABLEINT
.