lout::container::untyped::Vector Class Reference

Container, which is implemented by an array, which is dynamically resized. More...

#include <container.hh>

List of all members.

Public Member Functions

 Vector (int initSize, bool ownerOfObjects)
 ~Vector ()
void put (object::Object *newElement, int newPos=-1)
void insert (object::Object *newElement, int pos)
void remove (int pos)
object::Objectget (int pos)
int size ()
void clear ()
void sort ()

Protected Member Functions

AbstractIteratorcreateIterator ()

Private Attributes

object::Object ** array
int numAlloc
int numElements
bool ownerOfObjects


Detailed Description

Container, which is implemented by an array, which is dynamically resized.

Constructor & Destructor Documentation

lout::container::untyped::Vector::Vector ( int  initSize,
bool  ownerOfObjects 
)

References array, numAlloc, and numElements.

lout::container::untyped::Vector::~Vector (  ) 

References array, and clear().


Member Function Documentation

void lout::container::untyped::Vector::clear (  ) 

References array, numElements, and ownerOfObjects.

Referenced by ~Vector().

Collection0::AbstractIterator * lout::container::untyped::Vector::createIterator (  )  [protected, virtual]

Bug:
Not implemented.

Implements lout::container::untyped::Collection0.

object::Object* lout::container::untyped::Vector::get ( int  pos  )  [inline]

References array, and numElements.

void lout::container::untyped::Vector::insert ( object::Object newElement,
int  pos 
)

References array, numAlloc, numElements, and put().

void lout::container::untyped::Vector::put ( object::Object newElement,
int  newPos = -1 
)

References array, numAlloc, numElements, and ownerOfObjects.

Referenced by insert().

void lout::container::untyped::Vector::remove ( int  pos  ) 

References array, numElements, and ownerOfObjects.

int lout::container::untyped::Vector::size (  )  [inline]

References numElements.

void lout::container::untyped::Vector::sort (  ) 

Sort the elements in the vector. Assumes that all elements are Comparable's.

References array, lout::misc::Comparable::compareFun(), and numElements.


Member Data Documentation

Referenced by insert(), put(), and Vector().

Referenced by clear(), put(), and remove().


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

Generated on Wed Sep 7 02:00:38 2011 for Dillo by  doxygen 1.5.9