#include <DynObj.h>
Virtuals | |
Interface members | |
virtual DynObjType *docall | doGetType (const DynI **pself=0) const |
virtual void docall | doDestroy () |
virtual void docall | doDtor () |
Public Member Functions | |
Others | |
Other functions | |
DynObj () | |
~DynObj () |
DynObj::DynObj | ( | ) |
The ctor and dtor does object tracking if enabled.
virtual DynObjType* docall DynObj::doGetType | ( | const DynI ** | pself = 0 |
) | const [virtual] |
Returns type of this object. Each type that wants to make itself known should override this method. DynI knows its own type so we get the type without any lookup. It is faster and works without registration.
pself | allows fetching the actual 'this' used inside doGetType (from a side base, this will be different to the 'this' of the caller). |
Reimplemented from DynI.
Reimplemented in DynSharedI, and DynStr.
virtual void docall DynObj::doDestroy | ( | ) | [inline, virtual] |
doDestroy is invoked by the owner to delete it. An implementation should both call its own most derived C++ destructor and the object memory. A typical implementation would be: MyClass::doDestroy(){ delete this; }
virtual void docall DynObj::doDtor | ( | ) | [inline, protected, virtual] |
doDtor provides access to the object object destructor. Currently not used. The intention with this member is to provide a way to invoke an object destructor without freeing its memory. It would allow for creating objects as sub-objects of other main objects. The way to implement it would be: MyClass::doDtor(){ this->~MyClass(); }