BankAndCustomer
Loading...
Searching...
No Matches
glo::CallBack Class Reference

Superclass for the classes that are 'connected' to a Base. More...

#include <GloCallBack.h>

Inheritance diagram for glo::CallBack:
Collaboration diagram for glo::CallBack:

Public Member Functions

 CallBack ()
 
virtual ~CallBack ()
 
virtual int setBase (Base *pBase)
 
virtual Base * getBase () const
 
virtual void notify (NotifyNote &rNote)
 
virtual int getTypeAsString (std::string &rsTypeName)
 
CallBackoperator= (const CallBack &rT)
 
bool operator== (const CallBack &rT) const
 Comparison operator, all attributes are compared.
 
bool operator!= (const CallBack &rT) const
 Comparison operator, all attributes are compared.
 

Public Attributes

std::string m_strDebugInfo
 

Protected Member Functions

 CallBack (const CallBack &rT)
 
void init ()
 
void deinit ()
 

Private Attributes

CallBackSpy * m_pSpy
 

Detailed Description

Superclass for the classes that are 'connected' to a Base.

All derived classes can be passed to the Base as objects to be notified for monitoring.

See also
notify( NotifyNote & rNote ) and WatchNotifyManager
Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ CallBack() [1/2]

glo::CallBack::CallBack ( )

Standard constructor. The object enters itself into m_pSpy.

◆ ~CallBack()

virtual glo::CallBack::~CallBack ( )
virtual

Destructor, memory being cleared. The object is logged off in m_pSpy.

◆ CallBack() [2/2]

glo::CallBack::CallBack ( const CallBack & rT)
protected

Copy constructor. The object enters itself into m_pSpy.

Parameters
[in]rTThe data is copied from this object.

Member Function Documentation

◆ deinit()

void glo::CallBack::deinit ( )
protected

The object is logged off in m_pSpy.

◆ getBase()

virtual Base * glo::CallBack::getBase ( ) const
virtual
Returns
In subclasses, returns a pointer to the database if one exists.
Attention
The object returned must not be removed from memory by the calling instance.
See also
setBase(Base*)

Reimplemented in glo::BaseAllSet, glo::BasePersistent, and glo::Reference.

◆ getTypeAsString()

virtual int glo::CallBack::getTypeAsString ( std::string & rsTypeName)
virtual

Returns the type as string.

Parameters
[in,out]rsTypeNamethe type.
Returns
A return value < 0 indicates an error.

Reimplemented in glo::BaseAllSet, glo::BasePersistent, glo::Persistent, and glo::Reference.

◆ init()

void glo::CallBack::init ( )
protected

The object enters itself into m_pSpy.

◆ notify()

virtual void glo::CallBack::notify ( NotifyNote & rNote)
virtual

This method is called by the database if this object should be notified.

Parameters
[in]rNoteThe notification information.
Note
Here without function, can be overwritten in subclasses.
Attention
If this method is overridden, it MAY NOT, even indirectl, initiate the storing of an object! No error is delivered, but the notifys are not forwarded anymore.
See also
WatchNotifyManager

◆ operator!=()

bool glo::CallBack::operator!= ( const CallBack & rT) const

Comparison operator, all attributes are compared.

Parameters
[in]rTThe object to be compared with this one.

◆ operator=()

CallBack & glo::CallBack::operator= ( const CallBack & rT)

Assignment operator.

Parameters
[in]rTThe data is transferred from this object.

◆ operator==()

bool glo::CallBack::operator== ( const CallBack & rT) const

Comparison operator, all attributes are compared.

Parameters
[in]rTThe object to be compared with this one.

◆ setBase()

virtual int glo::CallBack::setBase ( Base * pBase)
virtual

Sets a reference to the database in subclasses.

Parameters
[in]pBasePointer to the database.
Returns
A return value < 0 indicates an error.
Attention
The database remains the responsibility of the calling instance. If, for example, the database is removed from memory, setBase(Base*) must first be called with nullptr or removeBase().

Reimplemented in glo::BaseAllSet, glo::BasePersistent, and glo::Reference.

Member Data Documentation

◆ m_pSpy

CallBackSpy* glo::CallBack::m_pSpy
private

Necessary to find CallBack objects in memory. All objects of this class are automatically inserted respectively removed there automatically.

◆ m_strDebugInfo

std::string glo::CallBack::m_strDebugInfo

The documentation for this class was generated from the following file: