GlobalObjects
Loading...
Searching...
No Matches
glo::OndemandList Class Reference

Is the base class of Template-Ondemand-List. The objects are managed in a std::list.
Objects can also be inserted multiple times and in any order. More...

#include <GloOndemandList.h>

Inheritance diagram for glo::OndemandList:

Public Member Functions

 OndemandList ()
 
 OndemandList (Base &rBase)
 
virtual ~OndemandList ()
 
virtual int appendOndemand (const Reference &rNewOndemand)
 
virtual void clear ()
 
virtual ReferencegetOndemand (EnSeekMode eMode)
 
virtual int getPersistent (BasePersistent *&prRetVal, const ObjID &rObjID)
 
virtual int insertOndemand (const Reference &rNewOndemand)
 
virtual int removeOndemand (const Reference &rOndemand)
 
virtual int setCurrentObject (const ObjID &rObjID)
 
virtual int setPosition (std::size_t nPosition)
 
virtual std::size_t size () const
 
virtual bool inLot (const ObjID &object) const
 See description in superclass.
 
virtual bool inLot (const BasePersistent &object) const
 See description in superclass.
 
virtual bool inLot (const std::shared_ptr< BasePersistent > object) const
 See description in superclass.
 
virtual bool inLot (const Reference &object) const
 See description in superclass.
 
- Public Member Functions inherited from glo::OndemandLot
 OndemandLot ()
 
 OndemandLot (Base &rBase)
 
virtual ~OndemandLot ()
 
virtual int appendPers (BasePersistent *pNewObj)
 
virtual BasegetBase () const override
 
virtual int getObjID (ObjID &rObjID, EnSeekMode eMode)
 
virtual int getPers (BasePersistent *&prRetVal, EnSeekMode eMode)
 
virtual int getPers (glo::ObjID &rObjID, BasePersistent *&prRetVal, EnSeekMode eMode)
 
virtual int getPers (glo::ObjID &rObjID, std::shared_ptr< BasePersistent > &rRetVal, EnSeekMode eMode)
 
virtual int getPers (std::shared_ptr< BasePersistent > &rRetVal, EnSeekMode eMode)
 
virtual int insertOndemandBefore (const Reference &rNewOndemand, const Reference &rOndemand)
 
virtual int insertPers (BasePersistent *pNewObj)
 
virtual int insertPers (std::shared_ptr< BasePersistent > spNewObj)
 
virtual int insertPersBefore (BasePersistent *pNewObj, const BasePersistent *pObject)
 
std::list< Reference * > & List ()
 
virtual int removePers (BasePersistent *pObject)
 
virtual int setBase (Base *pBase) override
 
- Public Member Functions inherited from glo::BaseLot
 BaseLot ()
 
virtual ~BaseLot ()
 
virtual int appendPers (std::shared_ptr< BasePersistent > spNewObj)
 
virtual int getTypeAsString (std::string &rsTypeName) override
 
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 (std::shared_ptr< BasePersistent > &rRetVal, const ObjID &rObjID)
 
virtual int setCurrentObject (const BasePersistent &rObject)
 
- 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

 OndemandList (const OndemandList &)
 
OndemandListoperator= (const OndemandList &)
 

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::OndemandLot
std::list< Reference * > m_odRefList
 
std::list< Reference * >::iterator m_odRefListIterator
 
unsigned long m_ulDatabaseID
 
- Protected Attributes inherited from glo::BaseLot
unsigned long m_ulClassID
 

Detailed Description

Is the base class of Template-Ondemand-List. The objects are managed in a std::list.
Objects can also be inserted multiple times and in any order.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ OndemandList() [1/3]

glo::OndemandList::OndemandList ( )

Standard constructor.

◆ OndemandList() [2/3]

glo::OndemandList::OndemandList ( Base & rBase)

Constructor with parameter passing.

Parameters
[in]rBaseThe database is passed.

◆ ~OndemandList()

virtual glo::OndemandList::~OndemandList ( )
virtual

Destructor, for all objects in the object list the own lock and watch mode is cancelled and then the object list is emptied.

See also
clear()

◆ OndemandList() [3/3]

glo::OndemandList::OndemandList ( const OndemandList & )
private

The copy constructor is not available.

Member Function Documentation

◆ appendOndemand()

virtual int glo::OndemandList::appendOndemand ( const Reference & rNewOndemand)
virtual

Appends a reference to a persistent object to the end of the list.

If the list is locked, the referenced object of the reference to be inserted is locked with the list lock mode.

If the list is monitored, the referenced object of the reference to be inserted is also monitored with the monitoring mode of the list.

Parameters
[in]rNewOndemandThe reference to a persistent object to be inserted.
Returns
A return value < 0 indicates an error.
Attention
The internal iterator m_odRefListIterator points to the inserted element if the insertion is successful.

Reimplemented from glo::OndemandLot.

◆ clear()

virtual void glo::OndemandList::clear ( )
virtual

All objects are removed from the list. The list-specific lock and watching mode is removed for all objects in the list.

Reimplemented from glo::OndemandLot.

◆ getOndemand()

virtual Reference * glo::OndemandList::getOndemand ( EnSeekMode eMode)
virtual

Returns a Reference from the m_odRefList in relation to eMode.

Parameters
[in]eModeThe seek mode.

Parameter examples:

Returns
If found, the pointer to the found Reference.
Attention
The delivered object remains the responsibility of the delivering OndemandLot; therefore it must not be removed from memory.

Implements glo::OndemandLot.

◆ getPersistent()

virtual int glo::OndemandList::getPersistent ( BasePersistent *& prRetVal,
const ObjID & rObjID )
virtual

Returns an object with passed object ID from the container.

Parameters
[in,out]prRetValIf no error, the fetched object.
[in]rObjIDThe 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().

Reimplemented from glo::OndemandLot.

◆ inLot() [1/4]

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

See description in superclass.

Reimplemented from glo::OndemandLot.

◆ inLot() [2/4]

virtual bool glo::OndemandList::inLot ( const ObjID & object) const
virtual

See description in superclass.

Reimplemented from glo::OndemandLot.

◆ inLot() [3/4]

virtual bool glo::OndemandList::inLot ( const Reference & object) const
virtual

See description in superclass.

Reimplemented from glo::OndemandLot.

◆ inLot() [4/4]

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

See description in superclass.

Reimplemented from glo::OndemandLot.

◆ insertOndemand()

virtual int glo::OndemandList::insertOndemand ( const Reference & rNewOndemand)
virtual

Inserts a reference to a persistent object in the list after the current position.

If the list is locked, the referenced object of the reference to be inserted is locked with the list lock mode.

If the list is monitored, the referenced object of the reference to be inserted is also monitored with the monitoring mode of the list.

Parameters
[in]rNewOndemandThe reference to a persistent object to be inserted.
Returns
A return value < 0 indicates an error.
Attention
The internal iterator m_odRefListIterator points to the inserted element if the insertion is successful.

Reimplemented from glo::OndemandLot.

◆ operator=()

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

The assignment operator is not available.

◆ removeOndemand()

virtual int glo::OndemandList::removeOndemand ( const Reference & rOndemand)
virtual

Removes the passed reference to a persistent object from the list.

If the list is locked, the referenced object of the reference to be removed is released with the list lock mode.

If the list is monitored, the monitoring of the referenced object of the reference to be removed is ended with the monitoring mode of the list.

Parameters
[in]rOndemandThe reference to a persistent object to be removed.
Returns
A return value < 0 indicates an error.
Attention
The internal iterator m_odRefListIterator points to the element following the removed one if the deletion was successful. If there is no subsequent element, the internal iterator m_odRefListIterator points to the container end.

Reimplemented from glo::OndemandLot.

◆ setCurrentObject()

virtual int glo::OndemandList::setCurrentObject ( const ObjID & rObjID)
virtual

Sets the internal iterator to the first position of the reference to a persistent object with passed object ID.

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

Reimplemented from glo::OndemandLot.

◆ setPosition()

virtual int glo::OndemandList::setPosition ( std::size_t nPosition)
virtual

Sets the internal iterator to the passed position.

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

Reimplemented from glo::OndemandLot.

◆ size()

virtual std::size_t glo::OndemandList::size ( ) const
virtual

Returns the number of objects in the list.

Returns
The number of objects in the list. A return value < 0 indicates an error.

Reimplemented from glo::OndemandLot.


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