Definition at line 59 of file callback.h.
typedef std::auto_ptr<CallBack> OSB_LIB::CallBack::AutoPtr |
Short-hand for an auto pointer.
For details see quality manual, implementation patterns: Virtual copy construction.
Definition at line 67 of file callback.h.
OSB_LIB::CallBack::CallBack | ( | ) | [inline] |
OSB_LIB::CallBack::~CallBack | ( | ) | [inline, virtual] |
OSB_LIB::CallBack::CallBack | ( | const CallBack & | rhs | ) | [inline, protected] |
CallBack::AutoPtr OSB_LIB::CallBack::clone | ( | ) | const [inline] |
Virtual copy construction.
For details see quality manual, implementation patterns.
Definition at line 144 of file callback.h.
References cloneP().
virtual CallBack* OSB_LIB::CallBack::cloneP | ( | ) | const [private, pure virtual] |
Virtual copy construction.
For details see quality manual, implementation patterns.
Referenced by clone().
const T * OSB_LIB::CallBack::isa | ( | const T *& | ptr | ) | const |
T * OSB_LIB::CallBack::isa | ( | T *& | ptr | ) |
Downcast to a derived class.
The function uses dynamic_cast<P*> to downcast to an object of a derived class.
ptr = dynamic_cast<P*>(this); return ptr;
The typical use is:
void foo(const CallBack& cb) { ... MyCallBack* pCb = 0; if (0 != cb.isa(pCb)) { // work with pCb } }
ptr | Pointer to cast, gets the result of the downcast. |
Definition at line 159 of file callback.h.
virtual void OSB_LIB::CallBack::operator() | ( | ) | const [pure virtual] |
Execute the call back.