rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWCollectableInt Class Reference
[RWCollectable-derived]

Provides a polymorphically persistable RWInteger. More...

#include <rw/collint.h>

Inheritance diagram for RWCollectableInt:
RWCollectable RWInteger

List of all members.

Public Member Functions

virtual RWCollectablenewSpecies () const
virtual RWClassID isA () const
 RWCollectableInt ()
 RWCollectableInt (int j)
virtual ~RWCollectableInt ()
virtual RWspace binaryStoreSize () const
virtual int compareTo (const RWCollectable *c) const
virtual unsigned hash () const
virtual bool isEqual (const RWCollectable *c) const
virtual void restoreGuts (RWvistream &)
virtual void restoreGuts (RWFile &)
virtual void saveGuts (RWvostream &) const
virtual void saveGuts (RWFile &) const

Static Public Member Functions

static RWClassID classIsA ()

Detailed Description

Collectable integers. Inherits from 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 RWCollectable instances.

The virtual functions of the base class RWCollectable have been redefined.

Synopsis

 typedef RWCollectableInt Integer;  // Smalltalk typedef
 #include <rw/collint.h>
 RWCollectableInt  i;

Persistence

Polymorphic


Constructor & Destructor Documentation

RWCollectableInt::RWCollectableInt (  ) 

Calls the appropriate base class constructor. See RWInteger::RWInteger().

RWCollectableInt::RWCollectableInt ( int  j  )  [inline]

Calls the appropriate base class constructor. See RWInteger::RWInteger(int).

virtual RWCollectableInt::~RWCollectableInt (  )  [virtual]

Empty destructor.


Member Function Documentation

virtual RWspace RWCollectableInt::binaryStoreSize (  )  const [inline, virtual]

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.

static RWClassID RWCollectableInt::classIsA (  )  [static]

Returns the RWClassID of this class.

Reimplemented from RWCollectable.

virtual int RWCollectableInt::compareTo ( const RWCollectable c  )  const [virtual]

Returns the difference between self and the RWCollectableInt pointed to by c.

Reimplemented from RWCollectable.

virtual unsigned RWCollectableInt::hash (  )  const [virtual]

Returns the value of RWCollectableInt as an unsigned, to be used as a hash value.

Reimplemented from RWCollectable.

virtual RWClassID RWCollectableInt::isA (  )  const [virtual]

Returns the unique ID for RWCollectableInt.

Reimplemented from RWCollectable.

virtual bool RWCollectableInt::isEqual ( const RWCollectable c  )  const [virtual]

Returns true if self has the same value as the RWCollectableInt at address c.

Reimplemented from RWCollectable.

virtual RWCollectable* RWCollectableInt::newSpecies (  )  const [virtual]

Allocates a new object off the heap of the same type as self and returns a pointer to it. You are responsible for deleting the object when done with it.

Reimplemented from RWCollectable.

virtual void RWCollectableInt::restoreGuts ( RWFile  )  [virtual]

Reads an object's state from a binary file, using class RWFile, replacing the previous state.

Reimplemented from RWCollectable.

virtual void RWCollectableInt::restoreGuts ( RWvistream  )  [virtual]

Reads an object's state from an input stream, replacing the previous state.

Reimplemented from RWCollectable.

virtual void RWCollectableInt::saveGuts ( RWFile  )  const [virtual]

Writes an object's state to a binary file, using class RWFile.

Reimplemented from RWCollectable.

virtual void RWCollectableInt::saveGuts ( RWvostream  )  const [virtual]

Writes an object's state to an output stream.

Reimplemented from RWCollectable.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.