SourcePro® C++ 13.1 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
Finds items that have the same address as the key. More...
#include <rw/idenset.h>
Public Member Functions | |
RWIdentitySet (size_t N=RWCollection::DEFAULT_CAPACITY) | |
RWIdentitySet (const RWIdentitySet &s) | |
RWIdentitySet (RWIdentitySet &&s) | |
virtual RWCollectable * | find (const RWCollectable *) const |
virtual RWCollectable * | insert (RWCollectable *) |
virtual RWClassID | isA () const |
virtual bool | isEqual (const RWCollectable *) const |
virtual RWCollectable * | newSpecies () const |
RWIdentitySet & | operator= (const RWIdentitySet &s) |
RWIdentitySet & | operator= (RWIdentitySet &&s) |
virtual RWCollectable * | remove (const RWCollectable *) |
Public Member Functions inherited from RWSet | |
RWSet (size_t n=RWCollection::DEFAULT_CAPACITY) | |
RWSet (const RWSet &h) | |
RWSet (RWSet &&h) | |
virtual | ~RWSet () |
virtual void | clearAndDestroy () |
void | intersectWith (const RWSet &h, RWSet &ret) const |
virtual RWConstIterator * | newConstIterator () const |
virtual RWIterator * | newIterator () |
virtual size_t | occurrencesOf (const RWCollectable *target) const |
RWSet & | operator*= (const RWSet &h) |
bool | operator< (const RWSet &h) const |
bool | operator<= (const RWSet &h) const |
RWSet & | operator= (const RWSet &h) |
RWSet & | operator= (RWSet &&h) |
Public Member Functions inherited from RWHashTable | |
RWHashTable (size_t N=RWCollection::DEFAULT_CAPACITY) | |
RWHashTable (const RWHashTable &t) | |
RWHashTable (RWHashTable &&t) | |
virtual void | apply (RWapplyCollectable ap, void *) |
virtual void | clear () |
virtual size_t | entries () const |
virtual bool | isEmpty () const |
bool | operator!= (const RWHashTable &) const |
bool | operator<= (const RWHashTable &t) const |
RWHashTable & | operator= (const RWHashTable &t) |
RWHashTable & | operator= (RWHashTable &&t) |
bool | operator== (const RWHashTable &t) const |
virtual void | resize (size_t n=0) |
void | swap (RWHashTable &t) |
Public Member Functions inherited from RWCollection | |
virtual | ~RWCollection () |
RWBag | asBag () const |
RWBinaryTree | asBinaryTree () const |
More... | |
RWOrdered | asOrderedCollection () const |
RWSet | asSet () const |
RWBinaryTree | asSortedCollection () const |
virtual RWspace | binaryStoreSize () const |
virtual bool | contains (const RWCollectable *target) const |
void | operator+= (const RWCollection &c) |
void | operator-= (const RWCollection &c) |
virtual void | removeAndDestroy (const RWCollectable *target) |
virtual void | restoreGuts (RWvistream &) |
virtual void | restoreGuts (RWFile &) |
virtual void | saveGuts (RWvostream &) const |
virtual void | saveGuts (RWFile &) const |
RWCollection * | select (RWtestCollectable tst, void *vp) const |
Public Member Functions inherited from RWCollectable | |
virtual | ~RWCollectable () |
virtual int | compareTo (const RWCollectable *) const |
virtual unsigned | hash () const |
RWspace | recursiveStoreSize () const |
RWStringID | stringID () const |
Static Public Member Functions | |
static RWClassID | classIsA () |
Additional Inherited Members | |
Static Public Attributes inherited from RWCollection | |
static size_t | DEFAULT_CAPACITY |
Related Functions inherited from RWCollection | |
typedef void(* | RWapplyCollectable )(RWCollectable *, void *) |
typedef bool(* | RWtestCollectable )(const RWCollectable *, const void *) |
typedef bool(* | RWtestCollectablePair )(const RWCollectable *, const RWCollectable *, const void *) |
The class RWIdentitySet is similar to class RWSet except that items are found by requiring that they be identical (i.e., have the same address) as the key, rather than being equal (i.e., test true
for isEqual()).
The iterator for this class is RWSetIterator.
Polymorphic
RWIdentitySet::RWIdentitySet | ( | size_t | N = RWCollection::DEFAULT_CAPACITY | ) |
Constructs an empty identity set with N hashing buckets.
|
inline |
Copy constructor. Makes a shallow copy of the collection s.
|
inline |
Move constructor. The constructed RWIdentitySet takes ownership of the data owned by s.
|
virtual |
Returns a pointer to the first item in the collection which "matches" the object pointed to by target or rwnil if no item was found. For most collections, an item "matches" the target if either isEqual() or compareTo() find equivalence, whichever is appropriate for the actual collection type. However, the "identity collections" (i.e., RWIdentitySet and RWIdentityDictionary) look for an item with the same address (i.e., "is identical to").
Reimplemented from RWHashTable.
|
virtual |
|
virtual |
Returns the unique ID for RWIdentitySet.
Reimplemented from RWSet.
|
virtual |
Returns true
if the collectable object "matches" the object at address t. The default definition is:
i.e., both objects have the same address (a test for identity). The definition may be redefined in any consistent way.
Reimplemented from RWSet.
|
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 RWSet.
|
inline |
Assignment operator. Makes a shallow copy of the collection s.
|
inline |
Move assignment. Self takes ownership of the data owned by s.
|
virtual |
Removes and returns a pointer to the first item in the collection which "matches" the object pointed to by target. Returns nil
if no object was found. Does not delete the object. See function find() for a definition of matches.
Reimplemented from RWHashTable.
Copyright © 2015 Rogue Wave Software, Inc. All Rights Reserved. |