Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

HandleId Class Reference

data used by Handle to track pointers to an object. More...

#include <HandleId.h>

Inheritance diagram for HandleId::

AlgebraicContribs BoundaryMesh BtGuiBase BtGuiLabelInfo BtGuiTkInterpreter ConvMonitor ConvMonitor_prm ConvMonitorList ConvMonitorList_prm CorrelModel CorrelModel_prm CurvePlotFile DegFreeFD DegFreeFE DistrProcManager DynElement DynNode EigenEstimator EigenEstimator_prm ElmDef ElmDef_prm ElmItgRules ElmMatVec ElmMatVecCalc FactStrategy Field Field_prm FieldCollector FieldFEGlobalView Fields Fields_prm FieldsBob FieldsFEatItgPt FieldsFEGlobalView FieldSummary FiniteElement Geometry GlobalPolynSpace Grid Grid_prm GridCollector GridFilter GridFilter_prm GridFilterCore GridMapUDC GridPart GridPart_prm GridRefAdm IndexSet IndexSet_prm IndexSetCollection Indicators IntegrandCalc Is_base LinEqAdm LinEqCommBlk LinEqCommBlk_prm LinEqMatrix LinEqMatrix_prm LinEqSolver LinEqSolver_prm LinEqSystem LinEqVector LinEqVector_prm LinEqVecVec ManipGridDynFE MassMatrix Matrix_prm_Type Matrix_Type MatSchurUDC_Type MatSimpleH_Type MatSimplestH_Type MemoryPool MenuDisableInfo MenuItemBase MenuLists MenuSystem MLSolver MLSolver_prm MLSolverUDC MovingLS MultipleReporter MxElmMatVec MxFiniteElement MxMapping NonLinEqSolver NonLinEqSolver_prm NonLinEqSolvers NonLinEqSolvers_prm Os_base Partition PrecAction PrecBasis Precond Precond_prm PrecondStatistics Prepro Prepro_prm ProbDistr ProbDistr_prm Proj Proj_prm PromptBase RandFieldDescr RandFieldEstimate RandFieldGen RandFieldGen_prm RandFieldGenPiWisConst RandGen RefinementInd RefinementInd_prm RenumUnknowns RenumUnknowns_prm Reporter Reporter_prm SaveSimRes ScalarScale SetDistinct_Type SetOfNo_Type SetSimplest_Type SimCase SpaceTimeScale SparseDS SplineSpace Stencil Stencil_prm StencilCollection StencilWeight StochasticPDEvar SubdCommAdm SubGridFE SystemCollector TimePrm TopologyMPI UnifRandGen VecSimpleH_Type VecSimplestH_Type Vector_prm_Type Vector_Type List of all members.

Public Methods

 HandleId ()
virtual ~HandleId ()
bool isReferenced () const
int getNoRefs () const
bool dynamicObj () const
void increment ()
void decrement ()
void traceMe (const char *name_of_variable)
void* operator new (size_t t)
void operator delete (void *v)

Static Public Methods

int howManyHandles ()

Protected Attributes

int refcount
char dynamic_object

Static Protected Attributes

int name_counter

Detailed Description

data used by Handle to track pointers to an object.

NAME: HandleId - data used by Handle to track pointers to an object

DESCRIPTION:

The class provides the data structure for reference counting (and debugging of reference counting) when using handles. The class to be handled must be derived from "HandleId" (using "public" "virtual" declaration).


Constructor & Destructor Documentation

HandleId::HandleId ( )
 

There is a constructor without arguments. No initialization beyond that is necessary.

NOTE: The size of class "HandleId" objects depend on preprocessor ("cpp") variables! Check the class definition carefully. When using BasicTools/Diffpack makefiles, no inconsistencies should occur unless one defines "SAFETY_CHECKS" for an application while compiling in optimized mode (this will lead to an error since the application sees a larger "HandleId" object than what is used in the optimized libraries, recall that "SAFETY_CHECKS" is undefined in optimized libraries).

HandleId::~HandleId ( ) [virtual]
 


Member Function Documentation

void HandleId::decrement ( ) [inline]
 

decreases the reference counter by one reference.

bool HandleId::dynamicObj ( ) const [inline]
 

returns true if the object was created by a call to "new" rather than being declared as an instance (e.g., "X x;"). This function is important: Handles should only delete objects that were created by an explicit call to "new". C++ will automatically delete objects that go out of scope the normal way.

int HandleId::getNoRefs ( ) const [inline]
 

returns the number of references.

static int HandleId::howManyHandles ( ) [inline, static]
 

returns the total number of handles created so far in an execution.

void HandleId::increment ( ) [inline]
 

increases the reference counter by one reference.

bool HandleId::isReferenced ( ) const [inline]
 

returns true if there are pointers pointing to the present object. Here present object means the object of the subclass derived from "HandleId", that is, the object to be handled by a handle.

void HandleId::operator delete ( void * v )
 

void * HandleId::operator new ( size_t t )
 

void HandleId::traceMe ( const char * name_of_variable )
 


Member Data Documentation

char HandleId::dynamic_object [protected]
 

int HandleId::name_counter [static, protected]
 

int HandleId::refcount [protected]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.