Blockstructured Adaptive Mesh Refinement in object-oriented C++
00001 #ifndef _included_ObjectCounter_h 00002 #define _included_ObjectCounter_h 00003 00023 class ObjectCounter 00024 { 00025 int references; 00026 public: 00027 inline ObjectCounter() : references(1) { } 00028 inline ObjectCounter *alias() { references++; return(this); } 00029 inline void free() { if (--references == 0) delete this; } 00030 // Make sure all the derived classes have their destructors; 00031 inline virtual ~ObjectCounter() { } 00032 }; 00033 00034 #endif
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04