Tools.h++ Manual

104011 Tandem Computers Incorporated 21-131
21
RWInteger
Synopsis
#include <rw/rwint.h>
RWInteger i;
Description Integer class. This class is useful as a base class for classes that use integers as
keys in dictionaries, etc.
Public constructors
RWInteger();
Construct a
RWInteger
with value zero (0).
RWInteger(int i);
Construct a
RWInteger
with value
i
. Serves as a type conversion from int.
Type conversion
operator int();
Type conversion to int.
Public member functions
RWspace binaryStoreSize() const;
Returns the number of bytes necessary to store the object using the global
function
RWFiles& operator<<(RWFile&, const RWInteger&)
int value() const;
Returns the value of the
RWInteger
.
int value(int newval);
Changes the value of the
RWInteger
to
newval
and returns the old value.
Related Global Operators
ostream& operator<<(ostream& o, const
RWInteger& x);
Output
x
to ostream
o
.
istream& operator>>(istream& i,
RWInteger& x);
Input
x
from istream
i
.