Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWOrdered

Module:  Essential Tools Module   Group:  RWCollectable Classes


RWOrderedRWSequenceableRWCollectionRWCollectable

Local Index

Members

Synopsis

#include <rw/ordcltn.h>
RWOrdered a;

Description

Class RWOrdered represents a group of ordered items, accessible by an index number, but not accessible by an external key. Duplicates are allowed. The ordering of elements is determined externally, generally by the order of insertion and removal. An object stored by RWOrdered must inherit from the abstract base class RWCollectable.

Class RWOrdered is implemented as a vector of pointers, allowing for more efficient traversing of the collection than the linked list classes. RWSlistCollectables and RWDlistCollectables, but slower insertion in the center of the collection.

Persistence

Polymorphic

Public Constructors

RWOrdered(size_t size = RW_DEFAULT_CAPACITY);

Public Member Operators

bool
operator==(const RWOrdered& od) const;
RWCollectable*&
operator[](size_t i);
RWCollectable*&
operator()(size_t i);

Public Member Functions

virtual RWCollectable*
append(RWCollectable*);
virtual void
apply(RWapplyCollectable ap, void* x);
virtual RWCollectable*&
at(size_t i);
virtual const RWCollectable*
at(size_t i) const;
virtual RWspace
binaryStoreSize() const;
virtual void
clear();
virtual void
clearAndDestroy();
virtual int
compareTo(const RWCollectable* a) const;
virtual bool
contains(const RWCollectable* target) const;
virtual size_t
entries() const;
virtual RWCollectable*
find(const RWCollectable* target) const;
virtual RWCollectable*
first() const;
virtual unsigned
hash() const;
virtual size_t
index(const RWCollectable*) const;
virtual RWCollectable*
insert(RWCollectable* c);
void
insertAt(size_t indx, RWCollectable* e);
virtual RWClassID
isA() const;
virtual bool
isEmpty() const;
virtual bool
isEqual(const RWCollectable* a) const;
virtual RWCollectable*
last() const;
virtual size_t
newCapacity (size_t oldCapacity)
virtual RWConstIterator*
newConstIterator();
virtual RWIterator*
newIterator();
virtual size_t
occurrencesOf(const RWCollectable* target) const;
RWCollectable*
prepend(RWCollectable*);
void
push(RWCollectable* c);
RWCollectable*
pop();
virtual RWCollectable*
remove(const RWCollectable* target);
RWCollectable*
removeAt(size_t index);
virtual void
removeAndDestroy(const RWCollectable* target);
RWCollectable*
top() const;


Previous fileTop of DocumentContentsIndex pageNext file

© 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.