#include <pointer.h>
Inheritance diagram for HBCI::PointerBase:
Public Methods | |
virtual | ~PointerBase () |
void | setDescription (string descr) |
const string & | description () const |
void | setObjectDescription (string descr) |
string | objectDescription () const |
virtual int | refCount () const |
bool | operator== (const PointerBase &p) const |
bool | sharingData (const PointerBase &p) const |
bool | operator!= (const PointerBase &p) const |
virtual void * | voidptr () const |
void | setAutoDelete (bool b) |
bool | isValid () const |
This is the base class to be inherited by a template class. This cannot be used directly.
|
Destructor. If this one gets called, it automagically decrements the usage counter of the object pointed to. If it reaches zero, then no other pointer points to the object and the object faces deletion.
|
|
Get the description of this pointer. Useful for debugging purposes.
|
|
Returns true if this Pointer is valid. This tells you if this pointer is pointing to accessible data.
|
|
Returns the description of the object. Useful for debugging purposes.
|
|
Inequality operator for the object pointed to. This operator checks whether another pointer and this one are not pointing to the same data.
|
|
Equality operator for the object pointed to. This operator checks whether another pointer and this one are pointing to the same data.
|
|
|
Set the auto-deletion behaviour. Set the auto-deletion behaviour of the PointerObject (the wrapper object around the "real" object pointed to) that is pointed to by this Pointer. By default, this is set to setAutoDeletion(true), i.e. the object will automatically be deleted when its last HBCI::Pointer gets deleted. On the other hand, when you call this with b=false, then the object this pointer points to will not be deleted by the last HBCI::Pointer. This might be useful if you are pointing to constant objects, or if you need to continue using this object through raw pointers elsewhere. This flag is a property of the PointerObject, i.e. even for multiple HBCI::Pointer's pointing to the same object there is only *one* autoDelete flag per object. Changes to this flag affect all of the HBCI::Pointer's at the same time. This HBCI::Pointer MUST already point to an object (a NULL pointer is not allowed at this point) since the autodelete flag is a property of the class PointerObject. If called on an invalid HBCI::Pointer, this method will throw an HBCI::Error.
|
|
Set the description of this pointer. Useful for debugging purposes.
|
|
Set the description of the object this pointer points to. Useful for debugging purposes.
|
|
Checks whether both pointers share their data object.
|
|
Returns a raw pointer to the stored data. You should not really use this, but if you do so please NEVER delete the object the pointer points to ! AND you should make sure that as long as you are using the pointer returned there is still a Pointer pointing to it (because if the last Pointer stops pointing to an object that object gets deleted) !!
|