GlobalObjects
Loading...
Searching...
No Matches
glo::PointerLot Class Referenceabstract

Is the abstract base class of pointer sets and lists. More...

#include <GloPointerLot.h>

Inheritance diagram for glo::PointerLot:

Public Member Functions

 PointerLot ()
 
 PointerLot (Base &rBase)
 
virtual ~PointerLot ()
 
virtual BasegetBase () const override
 
virtual int getObjID (ObjID &rObjID, EnSeekMode eMode)
 
virtual int getPers (BasePersistent *&prRetVal, EnSeekMode eMode)=0
 
virtual int insertPersBefore (BasePersistent *pNewObj, const BasePersistent *pObject)
 
virtual int removePers (BasePersistent *pObject)=0
 
virtual int setBase (Base *pBase) override
 
virtual bool inLot (const ObjID &object) const =0
 Checks if passed object is referenced in the container.
 
virtual bool inLot (const BasePersistent &object) const
 Checks if passed object is referenced in the container.
 
virtual bool inLot (const std::shared_ptr< BasePersistent > object) const
 Checks if passed object is referenced in the container.
 
- Public Member Functions inherited from glo::BaseLot
 BaseLot ()
 
virtual ~BaseLot ()
 
virtual int appendPers (BasePersistent *pNewObj)
 
virtual int appendPers (std::shared_ptr< BasePersistent > spNewObj)
 
virtual void clear ()=0
 
virtual int getPers (std::shared_ptr< BasePersistent > &rRetVal, EnSeekMode eMode)
 
virtual int getTypeAsString (std::string &rsTypeName) override
 
virtual int insertPers (BasePersistent *pNewObj)
 
virtual int insertPers (std::shared_ptr< BasePersistent > spNewObj)
 
virtual int insertPersBefore (std::shared_ptr< BasePersistent > spNewObj, const std::shared_ptr< BasePersistent > spObject)
 
virtual int lock (const LockSpecification &rLockSpecification)
 
virtual int lock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW)
 
virtual int removePers (std::shared_ptr< BasePersistent > spObject)
 
virtual int setWatch (const WatchSpecification &rWatchSpec)
 
virtual int setWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0)
 
virtual int unlock (const LockSpecification &rLockSpecification)
 
virtual int unlock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW)
 
virtual int unsetWatch (const WatchSpecification &rWatchSpec)
 
virtual int unsetWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0)
 
- Public Member Functions inherited from glo::AbstractBaseLot
 AbstractBaseLot ()
 
virtual ~AbstractBaseLot ()
 
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
 
virtual std::size_t size () const =0
 
- Public Member Functions inherited from glo::CallBack
 CallBack ()
 
virtual ~CallBack ()
 
virtual void notify (NotifyNote &rNote)
 
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

 PointerLot (const PointerLot &)
 
PointerLotoperator= (const PointerLot &)
 

Private Attributes

Basem_pBase
 

Additional Inherited Members

- Public Attributes inherited from glo::CallBack
std::string m_strDebugInfo
 
- Protected Member Functions inherited from glo::BaseLot
int lockObjID (const ObjID &rObjID)
 
int setWatchObjID (const ObjID &rObjID)
 
int takeOverBase (const BasePersistent *pObj)
 
int takeOverBase (const Reference *pRef)
 
int unlockObjID (const ObjID &rObjID)
 
int unsetWatchObjID (const ObjID &rObjID)
 
- Protected Member Functions inherited from glo::CallBack
 CallBack (const CallBack &rT)
 
void deinit ()
 
void init ()
 
- Protected Attributes inherited from glo::BaseLot
unsigned long m_ulClassID
 

Detailed Description

Is the abstract base class of pointer sets and lists.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ PointerLot() [1/3]

glo::PointerLot::PointerLot ( )

Standard constructor.

◆ PointerLot() [2/3]

glo::PointerLot::PointerLot ( Base & rBase)

Constructor with parameter passing.

Parameters
[in]rBaseThe database is passed.

◆ ~PointerLot()

virtual glo::PointerLot::~PointerLot ( )
virtual

Destructor.

◆ PointerLot() [3/3]

glo::PointerLot::PointerLot ( const PointerLot & )
private

The copy constructor is not available.

Member Function Documentation

◆ getBase()

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

Implements glo::BaseLot.

◆ getObjID()

virtual int glo::PointerLot::getObjID ( ObjID & rObjID,
EnSeekMode eMode )
virtual

Returns an object id from the container in relation to eMode.

Parameters
[in,out]rObjIDThe object ID if found.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.

Implements glo::BaseLot.

◆ getPers()

virtual int glo::PointerLot::getPers ( BasePersistent *& prRetVal,
EnSeekMode eMode )
pure virtual

Returns an object from the container in relation to eMode.

Parameters
[in,out]prRetValIf no error, the fetched object.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.
Attention
If prRetVal is valid, this object must be removed from memory by the calling instance.

Implements glo::BaseLot.

Implemented in glo::PointerList, and glo::PointerSet.

◆ inLot() [1/3]

virtual bool glo::PointerLot::inLot ( const BasePersistent & object) const
virtual

Checks if passed object is referenced in the container.

Parameters
[in]objectThe object to check.
Returns
If true, the passed object will be referenced in the container.

Reimplemented from glo::BaseLot.

Reimplemented in glo::PointerList, and glo::PointerSet.

◆ inLot() [2/3]

virtual bool glo::PointerLot::inLot ( const ObjID & object) const
pure virtual

Checks if passed object is referenced in the container.

Parameters
[in]objectThe object to check.
Returns
If true, the passed object will be referenced in the container.

Implements glo::BaseLot.

Implemented in glo::PointerList, and glo::PointerSet.

◆ inLot() [3/3]

virtual bool glo::PointerLot::inLot ( const std::shared_ptr< BasePersistent > object) const
virtual

Checks if passed object is referenced in the container.

Parameters
[in]objectThe object to check.
Returns
If true, the passed object will be referenced in the container.

Reimplemented from glo::BaseLot.

Reimplemented in glo::PointerList, and glo::PointerSet.

◆ insertPersBefore()

virtual int glo::PointerLot::insertPersBefore ( BasePersistent * pNewObj,
const BasePersistent * pObject )
virtual

Inserts a persistent object before another object in the container.

If the container is locked, the object to be inserted is locked with the lock mode of the container.

If the container is monitored, the object to be inserted is also monitored with the monitoring mode of the container.

Parameters
[in]pNewObjThe persistent object to be inserted.
[in]pObjectThe subsequent persistent object.
Returns
A return value < 0 indicates an error.

Reimplemented from glo::BaseLot.

Reimplemented in glo::PointerSet.

◆ operator=()

PointerLot & glo::PointerLot::operator= ( const PointerLot & )
inlineprivate

The assignment operator is not available.

◆ removePers()

virtual int glo::PointerLot::removePers ( BasePersistent * pObject)
pure virtual

Removes persistent object from the container.

If the container is locked, the object to be removed is released with the lock mode of the container.

If the container is monitored, the monitoring of the object to be removed is ended with the monitoring mode of the container.

Parameters
[in]pObjectThe persistent object to be removed.
Returns
A return value < 0 indicates an error.

Implements glo::BaseLot.

Implemented in glo::PointerList, and glo::PointerSet.

◆ setBase()

virtual int glo::PointerLot::setBase ( Base * pBase)
overridevirtual

Sets the database in which the container objects are stored. If a database is already referenced and it does not match the database passed, a eut::ErrorNException is thrown.

Parameters
[in]pBaseThe database.
Returns
If return value < 0, then an error has occurred.
Attention
The database remains the responsibility of the calling entity. For example, if the database is removed from memory before Allset, for whatever reason, this method must first be called with nullptr.

Implements glo::BaseLot.

Member Data Documentation

◆ m_pBase

Base* glo::PointerLot::m_pBase
private

Pointer container belong to a database.


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