container::OrderedArrayList Class Reference

An array list implementation of OrderedList. More...

#include <orderedarraylist.h>

Inheritance diagram for container::OrderedArrayList:

Inheritance graph
[legend]
Collaboration diagram for container::OrderedArrayList:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 OrderedArrayList ()
 OrderedArrayList (int initialCapacity, int additionalCapacity)
 OrderedArrayList (const OrderedArrayList &orig)
 OrderedArrayList (const OrderedArrayList &orig, bool deepCopy)
virtual ~OrderedArrayList ()
virtual ostream & renderState (ostream &os) const
 Write the state of an Object for debugging and demonstration.
virtual const InfotypeInfo () const
 Return the instance of Object::Info that describes the class of this object.
virtual Objectclone (bool deepCopy=false) const
 A polymorphic copy constructor.

Static Public Attributes

static const Info *const TYPE_INFO

Protected Member Functions

virtual void append_impl (Entity *entity)
 Called by a template method.
virtual void insertBefore_impl (Entity *entity)
 Called by a template method.
virtual bool add_impl (Entity *entity)
 Called by a template method.


Detailed Description

An array list implementation of OrderedList.

Constructor & Destructor Documentation

container::OrderedArrayList::OrderedArrayList (  ) 

00048 { }

Here is the caller graph for this function:

container::OrderedArrayList::OrderedArrayList ( int  initialCapacity,
int  additionalCapacity = DEFAULT_ADDITIONAL_CAPACITY 
)

00051                                                                                  :
00052 ArrayList(initCapacity, addCapacity) { }

container::OrderedArrayList::OrderedArrayList ( const OrderedArrayList orig  ) 

00054 : ArrayList(orig) { }

container::OrderedArrayList::OrderedArrayList ( const OrderedArrayList orig,
bool  deepCopy 
)

00056                                                                              :
00057 ArrayList(orig, deepCopy) { }

container::OrderedArrayList::~OrderedArrayList (  )  [virtual]

00065 { }


Member Function Documentation

bool container::OrderedArrayList::add_impl ( Entity entity  )  [protected, virtual]

Called by a template method.

See also:
Details documented in List::add

Implements container::List.

00083                                               {
00084    append_impl(entity);
00085    return true;
00086 }

Here is the call graph for this function:

void container::OrderedArrayList::append_impl ( Entity entity  )  [protected, virtual]

Called by a template method.

See also:
Details documented in OrderedList::append

Implements container::OrderedList.

00069                                                  {
00070    const int targetIndex = getCount();
00071    openGap(targetIndex);
00072    array[targetIndex] = entity;
00073 }

Here is the call graph for this function:

Here is the caller graph for this function:

Object * container::OrderedArrayList::clone ( bool  deepCopy = false  )  const [virtual]

A polymorphic copy constructor.

Implements container::ArrayList.

00098                                                    {
00099    return new OrderedArrayList(*this, deepCopy);
00100 }

Here is the call graph for this function:

void container::OrderedArrayList::insertBefore_impl ( Entity entity  )  [protected, virtual]

Called by a template method.

See also:
Details documented in OrderedList::insertBefore

Implements container::OrderedList.

00075                                                        {
00076    const int targetIndex = current;
00077    openGap(targetIndex);
00078    array[targetIndex] = entity;
00079 }

Here is the call graph for this function:

ostream & container::OrderedArrayList::renderState ( ostream &  os  )  const [virtual]

Write the state of an Object for debugging and demonstration.

This method must not change the state of an Object; adding or removing debug statements should not change the behavior of a class. The implementation must be robust, e.g., NULL safe, etc. and work without an unrecoverable error for any state, excluding an Object's time of construction and destruction. It is not required for the implementation to be thread safe.

Precondition:
The Object has been fully constructed and is not in the process of destruction
Postcondition:
The state of the Object is unchanged

Reimplemented from container::ArrayList.

00090                                                          {
00091    return this->ArrayList::renderState(os);
00092 }

const Object::Info * container::OrderedArrayList::typeInfo (  )  const [virtual]

Return the instance of Object::Info that describes the class of this object.

Instantiation of Object::Info is controlled by the protected method Object::typeInfoFactory(const string&). Each sub-class of Object should create one and only one instance of Object::Info.

Reimplemented from container::ArrayList.

00094                                                    {
00095    return TYPE_INFO;
00096 }


Member Data Documentation

Initial value:

      Object::typeInfoFactory("OrderedArrayList")

Reimplemented from container::ArrayList.


The documentation for this class was generated from the following files:

Generated on Tue Jun 16 23:13:00 2009 by  doxygen 1.5.9