List Class Template Reference

#include <List.h>

List of all members.

Public Member Functions

 List ()
 ~List ()
void append (Type *i)
void append (List< Type > &src)
Type * remove (Type *i)
unsigned length () const
bool empty () const
Type * firstItem ()
Type * nextItem ()
Type * actualItem ()
Type * iThItem (unsigned i, bool setAct)
void dropAll (void)
void deleteAll (void)
void __debug ()

Protected Attributes

Node_phandler
Node_pact
unsigned _length

Classes

struct  Node


Detailed Description

template<class Type>
class esg::List< Type >

List is container of objects. Should br replaced by STL container in near future.

Definition at line 16 of file List.h.


Constructor & Destructor Documentation

List  )  [inline]
 

Contructor

~List  )  [inline]
 

Destructor


Member Function Documentation

void __debug void   )  [inline]
 

For debugging purposes only

Definition at line 180 of file List.h.

Type* actualItem  )  [inline]
 

Returns object at actual position in list.

Returns:
actual object or NULL

Definition at line 144 of file List.h.

void append List< Type > &  src  )  [inline]
 

Merges two lists. New list is is appened to the end of this list. New list is cleared out.

Parameters:
src merged list

Definition at line 60 of file List.h.

void append Type *  i  )  [inline]
 

Appends object to the beginning of the list

Parameters:
i new object in list

Definition at line 46 of file List.h.

Referenced by BVH::_collision(), BVH::_create_bv(), NodesByNameExpl::_explore(), BVExplorer::_iterate(), ObjsInAreaExplorer::_process_leaf(), BVList::_split_by_variation(), OctTree::append(), Heap::append(), BVList::append(), BVH::append(), SceneGraphObject::appendPrivateAttribute(), SceneGraphObject::appendPrivateMaterial(), SceneGraphObject::appendSharedAttribute(), SceneGraphObject::appendSharedMaterial(), and OSGAdapter::getVertices().

void deleteAll void   )  [inline]
 

Clears the list. Stored objects are destroied (removed from memory)

Definition at line 172 of file List.h.

void dropAll void   )  [inline]
 

Clears the list. Stored objects are just forgotten

Definition at line 165 of file List.h.

Referenced by OctTree::_destroy_tree(), and OctTree::Node::~Node().

bool empty  )  const [inline]
 

Returns:
true if list is empty, false otherwise

Definition at line 113 of file List.h.

Referenced by OctTree::Node::isEmpty().

Type* firstItem  )  [inline]
 

Start of the list inspection. Sets the actual position in list to the first item and returns it.

Returns:
reference to the first stored object or NULL

Definition at line 121 of file List.h.

Referenced by BVList::_index_with_max_extent(), BVList::_index_with_max_variation(), BVList::_split_by_extent(), BVList::_split_by_handles(), BVH::collision(), Heap::detach(), Heap::dump(), FDH::FDH(), IteratorSDS::firstChild(), Parser::getLight(), OSGAdapter::getVertices(), SceneGraphObject::inspectAttributes(), SceneGraphObject::inspectMaterials(), BVList::remove(), ObjsInAreaExplorer::result(), NodesByNameExpl::result(), Sphere::Sphere(), BVList::~BVList(), ObjsInAreaExplorer::~ObjsInAreaExplorer(), Parser::~Parser(), and SceneGraphObject::~SceneGraphObject().

Type* iThItem unsigned  i,
bool  setAct
[inline]
 

Returns object at the i-th position in list. Actual position in list can be either set to the new one or kept untached.

Parameters:
i required position
setAct determines whether to change actual position in list
Returns:
object at i-th position or NULL

Definition at line 154 of file List.h.

Referenced by BVList::_split_by_handles().

unsigned length  )  const [inline]
 

Returns:
number of stored objects (leght of the list)

Definition at line 108 of file List.h.

Referenced by BVList::_split_by_handles(), BVList::_split_by_variation(), BVH::collision(), Heap::dump(), and OSGAdapter::getVertices().

Type* nextItem  )  [inline]
 

Moves the actual position in list to the next item and returns it.

Returns:
reference to the next object in list or NULL

Definition at line 131 of file List.h.

Referenced by BVList::_index_with_max_extent(), BVList::_index_with_max_variation(), BVList::_split_by_extent(), BVList::_split_by_handles(), BVH::collision(), Heap::detach(), Heap::dump(), FDH::FDH(), OSGAdapter::getVertices(), SceneGraphObject::inspectAttributes(), SceneGraphObject::inspectMaterials(), IteratorSDS::nextChild(), BVList::remove(), Sphere::Sphere(), and SceneGraphObject::~SceneGraphObject().

Type* remove Type *  i  )  [inline]
 

Removes object from the list, sets pointer to its predecesor. Objects are compared by their address in memory. Only the first matching object from the list is removed.

Parameters:
i object for removal
Returns:
removed object or NULL

Definition at line 80 of file List.h.

Referenced by BVList::_split_by_handles(), Parser::getLight(), BVList::remove(), ObjsInAreaExplorer::result(), NodesByNameExpl::result(), BVList::~BVList(), and Parser::~Parser().


Member Data Documentation

unsigned _length [protected]
 

Definition at line 25 of file List.h.

Referenced by List< AutoPtr< SGAttribute > >::append().

Node* _pact [protected]
 

Definition at line 24 of file List.h.

Referenced by List< AutoPtr< SGAttribute > >::append().

Node* _phandler [protected]
 

Definition at line 23 of file List.h.

Referenced by List< AutoPtr< SGAttribute > >::append().


The documentation for this class was generated from the following file:
Generated on Wed Jun 28 12:24:34 2006 for esg by  doxygen 1.4.6