GlobalObjects
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:

Public Member Functions

 CallBack ()
 
 CallBack (Base &rBase)
 
virtual ~CallBack ()
 
BasegetBase () const
 
virtual int getTypeAsString (std::string &rsTypeName)
 
virtual void notify (NotifyNote &rNote)
 
CallBackoperator= (const CallBack &rT)
 
virtual void setBase (Base *pBase)
 
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)
 

Private Attributes

Basem_pBase
 
CallBackSpym_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/3]

glo::CallBack::CallBack ( )

Standard constructor. The object enters itself into m_pSpy.

◆ CallBack() [2/3]

glo::CallBack::CallBack ( Base & rBase)

Constructor with parameter. The object enters itself into m_pSpy.

Parameters
[in]rBaseThe database to which the object of this type belongs.
Attention
The database remains the responsibility of the calling instance. If, for example, the database is removed from memory, CallBack::setBase(Base*) must first be called with NULL_PTR.

◆ ~CallBack()

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

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

◆ CallBack() [3/3]

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

◆ getBase()

Base * glo::CallBack::getBase ( ) const
Returns
Returns pointers to the database.
Attention
The object returned must not be removed from memory by the calling instance.
See also
setBase(Base*)

◆ 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::BaseLot, glo::BasePersistent, glo::GenericPersistent, glo::Persistent, glo::Reference, glo::TOndemandList< T >, glo::TOndemandSet< T >, glo::TPointerList< T >, and glo::TPointerSet< T >.

◆ 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 void glo::CallBack::setBase ( Base * pBase)
virtual

Sets the pointer to the database.

Parameters
[in]pBasePointer to the database.
Attention
The database remains the responsibility of the calling instance. If, for example, the database is removed from memory, CallBack::setBase(Base*) must first be called with NULL_PTR.

Reimplemented in glo::BaseAllSet.

Member Data Documentation

◆ m_pBase

Base* glo::CallBack::m_pBase
private

CallBack objects belong to a database.

◆ 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: