#include <tools.h>
Collaboration diagram for Pointer< Type >:
Public Member Functions | |
Pointer () | |
Constructor for NULL-Pointer. | |
Pointer (Type *obj_, bool del_=true) | |
Constructor for an Type*. | |
Pointer (const Pointer< Type > &p) | |
Copy-Constructor for a Pointer<Type>. | |
~Pointer () | |
Destructor. | |
Pointer< Type > & | operator= (const Pointer< Type > &p) |
Assign-Operator for another Pointer. | |
Pointer< Type > & | operator= (Type *obj_) |
Assign-Operator for a normal pointer. | |
operator Type * () const | |
Cast-operator to give the pointer to the object, this Pointer points to. | |
Type & | operator * () const |
Dereference-operator *. | |
Type * | operator-> () const |
Dereference-operator ->. | |
bool | operator!= (const Type *obj_) const |
Compare operator. | |
int | count () const |
Gives the number of Pointers, pointing to *obj. | |
Static Public Member Functions | |
static int | count (const Type *obj_) |
Gives the number of Pointer's to an object. | |
Private Member Functions | |
void | inc_count () |
Increase the counter for this object of adds it to the map. | |
int | dec_count () |
Decrease the counter for obj. | |
Private Attributes | |
Type * | obj |
The object, this pointer points to. | |
bool | delete_obj |
Indicates, whether the object should be deleted, when the last Pointer to it will be deleted. |
When the last Pointer to an object is killed, the object itselfe will be killed.
Definition at line 59 of file tools.h.
static int Pointer< Type >::count | ( | const Type * | obj_ | ) | [inline, static] |
void Pointer< Type >::inc_count | ( | ) | [inline, private] |
Increase the counter for this object of adds it to the map.
If obj doesn't exist in the map, it will be added. Else the counter for obj will be increased.
Definition at line 81 of file tools.h.
Referenced by Pointer< LevelCutHandler >::operator=(), and Pointer< LevelCutHandler >::Pointer().
int Pointer< Type >::dec_count | ( | ) | [inline, private] |
Decrease the counter for obj.
Definition at line 89 of file tools.h.
Referenced by Pointer< LevelCutHandler >::operator=(), and Pointer< LevelCutHandler >::~Pointer().
Pointer< Type >::operator Type * | ( | ) | const [inline] |
Type& Pointer< Type >::operator * | ( | ) | const [inline] |
Type* Pointer< Type >::operator-> | ( | ) | const [inline] |
bool Pointer< Type >::operator!= | ( | const Type * | obj_ | ) | const [inline] |
int Pointer< Type >::count | ( | ) | const [inline] |
Gives the number of Pointers, pointing to *obj.
Definition at line 213 of file tools.h.
Referenced by Pointer< LevelCutHandler >::count().
The object, this pointer points to.
Definition at line 75 of file tools.h.
Referenced by Pointer< LevelCutHandler >::count(), Pointer< LevelCutHandler >::dec_count(), Pointer< LevelCutHandler >::inc_count(), Pointer< LevelCutHandler >::operator *(), Pointer< vector< vector< DenseVector< double > > > >::operator vector< vector< DenseVector< double > > > *(), Pointer< LevelCutHandler >::operator!=(), Pointer< LevelCutHandler >::operator->(), Pointer< LevelCutHandler >::operator=(), Pointer< LevelCutHandler >::Pointer(), and Pointer< LevelCutHandler >::~Pointer().
bool Pointer< Type >::delete_obj [private] |
Indicates, whether the object should be deleted, when the last Pointer to it will be deleted.
The default value is true.
Definition at line 102 of file tools.h.
Referenced by Pointer< LevelCutHandler >::operator=(), Pointer< LevelCutHandler >::Pointer(), and Pointer< LevelCutHandler >::~Pointer().