class collection

A collection of objects.

Inheritance:


Public Methods

[more] collection()
[more] collection(unsigned capacity, unsigned grow = DEFAULT_CONTAINER_GROWTH)
[more] collection(const collection &src)
[more]virtual void swap(unsigned i, unsigned j)
[more]virtual void empty()
[more]virtual void add(object* obj)
[more]virtual object* remove(unsigned index)
[more]virtual void removeAll()
[more]unsigned instanceCount(const object &obj) const
Returns the number of occurances of the object in the collection
[more]unsigned indexOf(const object &obj) const
Returns the index of the object
[more]virtual ~collection()


Inherited from indexed:

Public Methods

oinline unsigned int getSize() const
oinline unsigned int getCapacity() const
ovoid trim()
ovoid enlarge(unsigned adjustment)
oinline object* operator[](unsigned index) const
oinline object* getObj(unsigned index) const
ovirtual void append(const indexed& src)


Inherited from object:

Public Methods

ovirtual bool operator==(const object &obj) const
ovirtual bool operator!=(const object &obj) const
ovirtual unsigned int hashcode() const
ovirtual object* clone() const


Documentation

A collection of objects. The class provides facilities for rapid membership testing, member->index mapping, and instance counts. Instances of objects in the collection must exist, or method calls are likely to fail.
o collection()

o collection(unsigned capacity, unsigned grow = DEFAULT_CONTAINER_GROWTH)

o collection(const collection &src)

ovirtual void swap(unsigned i, unsigned j)

ovirtual void empty()

ovirtual void add(object* obj)

ovirtual object* remove(unsigned index)

ovirtual void removeAll()

ounsigned instanceCount(const object &obj) const
Returns the number of occurances of the object in the collection

ounsigned indexOf(const object &obj) const
Returns the index of the object

ovirtual ~collection()


Direct child classes:
set

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.