# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::COrderingTable Class Template Reference

#include <ordering_table.h>

List of all members.

Public Methods

 COrderingTable ()
 ~COrderingTable ()
void init (uint32 nNbEntries)
 Initialization. More...

uint32 getSize ()
 Just return the number of entries in the ordering table. More...

void reset (uint maxElementToInsert)
 Put the ordering table to empty. More...

void insert (uint32 nEntryPos, T *pValue)
 Insert an element in the ordering table NB: element is inserted in front of the list at nEntryPos (for optim consideration) NB: nlassert in debug if num of insert() calls exceed value passed in reset() NB: nlassert in debug if nEntryPos is => getSize(). More...

void begin ()
 Traversing operations. More...

T * get ()
 Get the currently selected element. More...

void next ()
 Move selection pointer to the next element. More...


Private Attributes

std::vector< CNode_Allocator
CNode_CurAllocatedNode
uint32 _nNbElt
CNode_Array
CNode_SelNode


Detailed Description

template<class T>
class NL3D::COrderingTable< T >

Author:
Matthieu Besson , Nevrax France
Date:
2000

Definition at line 43 of file ordering_table.h.


Constructor & Destructor Documentation

template<class T>
NL3D::COrderingTable< T >::COrderingTable  
 

Definition at line 130 of file ordering_table.h.

References _Array, _CurAllocatedNode, _nNbElt, and _SelNode.

template<class T>
NL3D::COrderingTable< T >::~COrderingTable  
 

Definition at line 139 of file ordering_table.h.

References _Array.


Member Function Documentation

template<class T>
void NL3D::COrderingTable< T >::begin  
 

Traversing operations.

OrderingTable<Face> ot; ot.begin(); while( ot.get() != NULL ) { Face *pF = ot.get(); // Do the treatment you want here ot.next(); }

Definition at line 205 of file ordering_table.h.

References _Array, _SelNode, next, and NL3D::COrderingTable::CNode::val.

template<class T>
T * NL3D::COrderingTable< T >::get  
 

Get the currently selected element.

Definition at line 213 of file ordering_table.h.

References _SelNode, and NL3D::COrderingTable::CNode::val.

template<class T>
uint32 NL3D::COrderingTable< T >::getSize  
 

Just return the number of entries in the ordering table.

Definition at line 159 of file ordering_table.h.

References _nNbElt.

template<class T>
void NL3D::COrderingTable< T >::init uint32    nNbEntries
 

Initialization.

The ordering table has a range from 0 to nNbEntries-1

Definition at line 146 of file ordering_table.h.

References _Array, _nNbElt, and reset.

template<class T>
void NL3D::COrderingTable< T >::insert uint32    nEntryPos,
T *    pValue
 

Insert an element in the ordering table NB: element is inserted in front of the list at nEntryPos (for optim consideration) NB: nlassert in debug if num of insert() calls exceed value passed in reset() NB: nlassert in debug if nEntryPos is => getSize().

Definition at line 183 of file ordering_table.h.

References _Allocator, _Array, _CurAllocatedNode, _nNbElt, and nlassert.

template<class T>
void NL3D::COrderingTable< T >::next  
 

Move selection pointer to the next element.

Definition at line 222 of file ordering_table.h.

References _SelNode, NL3D::COrderingTable::CNode::next, and NL3D::COrderingTable::CNode::val.

Referenced by begin.

template<class T>
void NL3D::COrderingTable< T >::reset uint    maxElementToInsert
 

Put the ordering table to empty.

Parameters:
maxElementToInsert  prepare allocator for insert by setting maximum insert() that will arise.

Definition at line 165 of file ordering_table.h.

References _Allocator, _Array, _CurAllocatedNode, _nNbElt, NL3D::COrderingTable::CNode::next, and NL3D::COrderingTable::CNode::val.

Referenced by init.


Member Data Documentation

template<class T>
std::vector<CNode> NL3D::COrderingTable::_Allocator [private]
 

Definition at line 120 of file ordering_table.h.

Referenced by insert, and reset.

template<class T>
CNode* NL3D::COrderingTable::_Array [private]
 

Definition at line 124 of file ordering_table.h.

Referenced by begin, COrderingTable, init, insert, reset, and ~COrderingTable.

template<class T>
CNode* NL3D::COrderingTable::_CurAllocatedNode [private]
 

Definition at line 121 of file ordering_table.h.

Referenced by COrderingTable, insert, and reset.

template<class T>
uint32 NL3D::COrderingTable::_nNbElt [private]
 

Definition at line 123 of file ordering_table.h.

Referenced by COrderingTable, getSize, init, insert, and reset.

template<class T>
CNode* NL3D::COrderingTable::_SelNode [private]
 

Definition at line 125 of file ordering_table.h.

Referenced by begin, COrderingTable, get, and next.


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