phdmesh::CSet Class Reference

#include <CSet.hpp>

List of all members.


Detailed Description

Set of entities of arbitrary types.

Definition at line 40 of file CSet.hpp.

Public Member Functions

template<class T>
const T * get () const
 Get member conforming to the given type T . Return NULL if there is no member of that type.
template<class T>
const T * insert_with_delete (const T *)
 Insert a member of a given type T and invoke the delete operator on destruction.
template<class T>
const T * insert_no_delete (const T *)
 Insert a member of a given type T but never invoke the delete operator.
template<class T>
bool remove (const T *)
 Remove a member of the given type without deleting it. The caller assumes responsibility for the removed member. Return if the remove operation was successful.


Member Function Documentation

template<class T>
const T* phdmesh::CSet::insert_with_delete ( const T *   ) 

Insert a member of a given type T and invoke the delete operator on destruction.

If a member of the given type already exists then the insertion operation fails and the existing member is returned. If the insertion succeeds then the inserted member is returned. For example:

    CSet & container = ... ;
    const A * const a = new A();
    if ( a == container.insert_with_delete( a ) ) { ... };
  

template<class T>
const T* phdmesh::CSet::insert_no_delete ( const T *   ) 

Insert a member of a given type T but never invoke the delete operator.

If a member of the given type already exists then the insertion operation fails and the existing member is returned. If the insertion succeeds then the inserted member is returned. For example:

    CSet & container = ... ;
    const A * const a = new A();
    if ( a == container.insert_with_delete( a ) ) { ... };
  


The documentation for this class was generated from the following file:
Generated on Tue Jul 13 09:22:43 2010 for phdMesh by  doxygen 1.4.7