# 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::CPtrSet Template Class Reference

This is a Tool class. More...

#include <ptr_set.h>

List of all members.

Public Methods

 CPtrSet ()
 ~CPtrSet ()
T* insert (T *newObject)
 insert a new element to the set. More...

void erase (T *objectToRemove, const char *errorString= "Object do not exist in the set")
 erase an element from the set. More...

void clear ()
 Delete all element from the set, and clear the set. More...


Public Attributes

std::set<T*> Set


Detailed Description

template<class T> template class NL3D::CPtrSet

This is a Tool class.

A ptr set is simply a set of object Pointer, with simple insert/erase/clear. The allocation is made at insertion by client, but deletion is automatically done by erase/clear. You got public acces to the STL set, so be aware of what you do!!

Author(s):
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 46 of file ptr_set.h.


Constructor & Destructor Documentation

template<classT>
NL3D::CPtrSet<T>::CPtrSet<T> ( ) [inline]
 

Definition at line 55 of file ptr_set.h.

template<classT>
NL3D::CPtrSet<T>::~CPtrSet<T> ( ) [inline]
 

Definition at line 56 of file ptr_set.h.


Member Function Documentation

template<classT>
void NL3D::CPtrSet<T>::clear ( ) [inline]
 

Delete all element from the set, and clear the set.

Definition at line 83 of file ptr_set.h.

template<classT>
void NL3D::CPtrSet<T>::erase ( T * objectToRemove,
const char * errorString = "Object do not exist in the set" ) [inline]
 

erase an element from the set.

nlerror(errorString) if not found!! NO OP if NULL. For simplicity, return newObject!!!

Definition at line 72 of file ptr_set.h.

template<classT>
T * NL3D::CPtrSet<T>::insert ( T * newObject ) [inline]
 

insert a new element to the set.

You should pass a conventionnal allocated object. For simplicity, return newObject!!!

Definition at line 64 of file ptr_set.h.


Member Data Documentation

template<classT>
std::set< T *> NL3D::CPtrSet<T>::Set
 

Definition at line 49 of file ptr_set.h.


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