BankAndCustomer
Loading...
Searching...
No Matches
glo::AbstractBaseLot Class Referenceabstract

The base class for container with persistent objects. More...

#include <GloAbstractBaseLot.h>

Inheritance diagram for glo::AbstractBaseLot:
Collaboration diagram for glo::AbstractBaseLot:

Public Member Functions

 AbstractBaseLot ()
 
virtual ~AbstractBaseLot ()
 
virtual std::size_t size () const =0
 
virtual bool inLot (const ObjID &rObjID) const =0
 
virtual int getPersistent (BasePersistent *&prRetVal, const ObjID &prObjID)=0
 
virtual int getPersistent (std::shared_ptr< BasePersistent > &rRetVal, const ObjID &rObjID)
 
virtual int setCurrentObject (const BasePersistent &rObject)
 
virtual int setCurrentObject (const ObjID &rObjID)=0
 
virtual int setPosition (std::size_t nPosition)=0
 
- Public Member Functions inherited from glo::CallBack
 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.
 

Private Member Functions

 AbstractBaseLot (const AbstractBaseLot &)
 
AbstractBaseLotoperator= (const AbstractBaseLot &)
 

Additional Inherited Members

- Public Attributes inherited from glo::CallBack
std::string m_strDebugInfo
 
- Protected Member Functions inherited from glo::CallBack
 CallBack (const CallBack &rT)
 
void init ()
 
void deinit ()
 

Detailed Description

The base class for container with persistent objects.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ AbstractBaseLot() [1/2]

glo::AbstractBaseLot::AbstractBaseLot ( )

Standard constructor.

◆ ~AbstractBaseLot()

virtual glo::AbstractBaseLot::~AbstractBaseLot ( )
virtual

Destructor.

◆ AbstractBaseLot() [2/2]

glo::AbstractBaseLot::AbstractBaseLot ( const AbstractBaseLot & )
private

The copy constructor is not available.

Member Function Documentation

◆ getPersistent() [1/2]

virtual int glo::AbstractBaseLot::getPersistent ( BasePersistent *& prRetVal,
const ObjID & prObjID )
pure virtual

Returns an object with passed object ID from the container.

Parameters
[in,out]prRetValIf no error, the fetched object.
[in]prObjIDThe object ID.
Returns
A return value < 0 indicates an error.
Attention
If prRetVal is valid, this object must be removed from memory by the calling instance using BasePersistent::forget().

Implemented in glo::TAllSet< T >, and glo::TAllSet< BankAccount >.

◆ getPersistent() [2/2]

virtual int glo::AbstractBaseLot::getPersistent ( std::shared_ptr< BasePersistent > & rRetVal,
const ObjID & rObjID )
virtual

Returns an object with passed object ID from the container.

Parameters
[in,out]rRetValIf no error, the fetched object.
[in]rObjIDThe object ID.
Returns
A return value < 0 indicates an error.

Reimplemented in glo::TAllSet< T >, and glo::TAllSet< BankAccount >.

◆ inLot()

virtual bool glo::AbstractBaseLot::inLot ( const ObjID & rObjID) const
pure virtual

Checks in subclasses whether the passed object ID respectively an object with the passed object ID is in the container.

Returns
If true, passed object ID is in the container.

Implemented in glo::BaseAllSet.

◆ operator=()

AbstractBaseLot & glo::AbstractBaseLot::operator= ( const AbstractBaseLot & )
private

The assignment operator is not available.

◆ setCurrentObject() [1/2]

virtual int glo::AbstractBaseLot::setCurrentObject ( const BasePersistent & rObject)
virtual

Sets the internal iterator to the first position of the passed object if in the container.

Parameters
[in]rObjectThe current object to be set.
Returns
A return value < 0 indicates an error.

◆ setCurrentObject() [2/2]

virtual int glo::AbstractBaseLot::setCurrentObject ( const ObjID & rObjID)
pure virtual

Sets the internal iterator to the first position of the object with passed ObjID, if in container.

Parameters
[in]rObjIDThe current object ID to be set.
Returns
A return value < 0 indicates an error.

Implemented in glo::BaseAllSet.

◆ setPosition()

virtual int glo::AbstractBaseLot::setPosition ( std::size_t nPosition)
pure virtual

Sets the internal iterator to the passed position.

Parameters
[in]nPositionThe position to be set.
Returns
A return value < 0 indicates an error.

Implemented in glo::BaseAllSet.

◆ size()

virtual std::size_t glo::AbstractBaseLot::size ( ) const
pure virtual

Returns in subclasses the number of objects in the container.

Returns
The number. A return value < 0 indicates an error.

Implemented in glo::BaseAllSet.


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