GlobalObjects
|
Is the base class of pointer and on-demand sets or pointer and on-demand lists. More...
#include <GloBaseLot.h>
Public Member Functions | |
BaseLot () | |
virtual | ~BaseLot () |
virtual int | appendPers (BasePersistent *pNewObj) |
virtual int | appendPers (std::shared_ptr< BasePersistent > spNewObj) |
virtual void | clear ()=0 |
virtual Base * | getBase () const override=0 |
virtual int | getObjID (ObjID &rObjID, EnSeekMode eMode)=0 |
virtual int | getPers (BasePersistent *&prRetVal, EnSeekMode eMode)=0 |
virtual int | getPers (std::shared_ptr< BasePersistent > &rRetVal, EnSeekMode eMode) |
virtual int | getTypeAsString (std::string &rsTypeName) override |
virtual bool | inLot (const BasePersistent &rObject) const |
virtual bool | inLot (const ObjID &rObjID) const override=0 |
virtual bool | inLot (const std::shared_ptr< BasePersistent > spObject) const |
virtual int | insertPers (BasePersistent *pNewObj) |
virtual int | insertPers (std::shared_ptr< BasePersistent > spNewObj) |
virtual int | insertPersBefore (BasePersistent *pNewObj, const BasePersistent *pObject) |
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 (BasePersistent *pObject)=0 |
virtual int | removePers (std::shared_ptr< BasePersistent > spObject) |
virtual int | setBase (Base *pBase) override=0 |
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) |
CallBack & | operator= (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. | |
Protected Member Functions | |
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 | |
unsigned long | m_ulClassID |
Private Member Functions | |
BaseLot (const BaseLot &) | |
BaseLot & | operator= (const BaseLot &) |
Private Attributes | |
std::shared_ptr< LockSpecification > | m_spLockSpecification |
std::shared_ptr< WatchSpecification > | m_spWatchSpecification |
Additional Inherited Members | |
Public Attributes inherited from glo::CallBack | |
std::string | m_strDebugInfo |
Is the base class of pointer and on-demand sets or pointer and on-demand lists.
glo::BaseLot::BaseLot | ( | ) |
Standard constructor.
|
virtual |
Destructor.
|
private |
The copy constructor is not available.
|
virtual |
Inserts in subclasses a persistent object at the end of the container. Here only the database is set or, if already set, checked.
[in] | pNewObj | The persistent object to be inserted. |
Reimplemented in glo::OndemandLot, glo::OndemandSet, glo::PointerList, and glo::PointerSet.
|
virtual |
Inserts in subclasses a persistent object at the end of the container. Here only the database is set or, if already set, checked.
[in] | spNewObj | The persistent object to be inserted in a std::shared_ptr. |
Reimplemented in glo::OndemandSet, and glo::PointerSet.
|
pure virtual |
All objects are removed from the container. The separate lock and watching mode is removed for all objects in the container.
Implemented in glo::OndemandList, glo::OndemandLot, glo::OndemandSet, glo::PointerList, and glo::PointerSet.
|
overridepure virtual |
Reimplemented from glo::CallBack.
Implemented in glo::OndemandLot, and glo::PointerLot.
|
pure virtual |
Returns in subclasses an object ID in rObjID from the container in relation to eMode.
[in,out] | rObjID | The object ID if found. |
[in] | eMode | The seek mode. |
Parameter examples:
Implemented in glo::OndemandLot, and glo::PointerLot.
|
pure virtual |
Returns an object from the container in relation to eMode.
[in,out] | prRetVal | The object if found. |
[in] | eMode | The seek mode. |
Parameter examples:
Implemented in glo::OndemandLot, glo::PointerList, glo::PointerLot, and glo::PointerSet.
|
virtual |
Returns an object in a std::shared_ptr from the container in relation to eMode.
[in,out] | rRetVal | The object in a std::shared_ptr if found. |
[in] | eMode | The seek mode. |
Parameter examples:
Reimplemented in glo::OndemandLot.
|
overridevirtual |
Returns the class name when connected to the database.
[in,out] | rsTypeName | The type name. |
Reimplemented from glo::CallBack.
Reimplemented in glo::TOndemandList< T >, glo::TOndemandSet< T >, glo::TPointerList< T >, and glo::TPointerSet< T >.
|
virtual |
Checks in subclasses whether passed object is in the container.
[in] | rObject | The searched object. |
Reimplemented in glo::OndemandList, glo::OndemandLot, glo::OndemandSet, glo::PointerList, glo::PointerLot, and glo::PointerSet.
|
overridepure virtual |
See description in superclass.
Implements glo::AbstractBaseLot.
Implemented in glo::OndemandList, glo::OndemandLot, glo::OndemandSet, glo::PointerList, glo::PointerLot, and glo::PointerSet.
|
virtual |
Checks whether passed object is in the container.
[in] | spObject | The searched object in a std::shared_ptr. |
Reimplemented in glo::OndemandList, glo::OndemandLot, glo::OndemandSet, glo::PointerList, glo::PointerLot, and glo::PointerSet.
|
virtual |
Inserts in the subclasses a persistent object in the container behind the current position. Here only the database is set or, if already set, checked.
[in] | pNewObj | The persistent object to be inserted. |
Reimplemented in glo::OndemandLot, glo::OndemandSet, glo::PointerList, and glo::PointerSet.
|
virtual |
Inserts in the subclasses a persistent object in the container behind the current position. Here only the database is set or, if already set, checked.
[in] | spNewObj | The persistent object in a std::shared_ptr to be inserted. |
Reimplemented in glo::OndemandLot, and glo::OndemandSet.
|
virtual |
Inserts in container a persistent object in the subclasses before another object. Here only the database is set or, if already set, checked.
[in] | pNewObj | The persistent object to be inserted. |
[in] | pObject | The subsequent persistent object. |
Reimplemented in glo::OndemandLot, glo::OndemandSet, glo::PointerLot, and glo::PointerSet.
|
virtual |
Inserts in subclasses a persistent object before another object in the container. Here only the database is set or, if already set, checked.
[in] | spNewObj | The persistent object to be inserted in a std::shared_ptr. |
[in] | spObject | The following persistent object in a std::shared_ptr. |
Reimplemented in glo::OndemandSet, and glo::PointerSet.
|
virtual |
Objects in the container will be locked in the database for other clients (all or none).
[in] | rLockSpecification | The lock- and lock depth mode. |
|
virtual |
Objects in the container will be locked in the database for other clients (all or none).
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
|
protected |
Locks the object with transferred object ID in the database with the lock mode of the set
[in] | rObjID | The object ID of the object to be locked. |
The assignment operator is not available.
|
pure virtual |
Removes in subclasses persistent objects passed from the container.
[in] | pObject | The persistent object to be removed. |
Implemented in glo::OndemandLot, glo::PointerList, glo::PointerLot, and glo::PointerSet.
|
virtual |
Removes in subclasses persistent objects passed in subclasses from the container.
[in] | spObject | The persistent object to be removed in a std::shared_ptr. |
|
overridepure virtual |
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.
[in] | pBase | The database. |
Reimplemented from glo::CallBack.
Implemented in glo::OndemandLot, and glo::PointerLot.
|
virtual |
The objects in the container are monitored in the database.
[in] | rWatchSpec | The monitoring specification. |
|
virtual |
The objects in the container are monitored in the database.
[in] | ulWatchMode | The watch mode. Allowed watch modes:
|
[in] | eDeepMode | The lock depth mode. |
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). If no CallBack is passed, notify(NotifyNote&) is taken from this; in this case the method notify(NotifyNote&) should be overwritten in the respective derived class. |
|
protected |
Initiates a monitoring of the object with passed object ID in the database with the monitoring mode of the set.
[in] | rObjID | The object ID of the object to be monitored. |
|
protected |
Takes over the database from the transferred persistent object.
[in] | pObj | The object whose database is transferred. |
|
protected |
Adopts the database from a reference to a persistent object.
[in] | pRef | The reference whose database is taken over. |
|
virtual |
Objects in the container are released in the database. A lock release must be called with the same parameters as the previous lock call.
[in] | rLockSpecification | The original lock and lock depth mode. |
|
virtual |
Objects in the container are released in the database. A lock release must be called with the same parameters as the previous lock call.
[in] | eLockMode | The original lock mode. |
[in] | eDeepMode | The original lock depth mode. |
|
protected |
Unlocks the object with transferred object ID in the database with the lock mode of the set
[in] | rObjID | The object ID of the object to be unlocked. |
|
virtual |
The monitoring of the objects in the container is terminated in the database. A monitoring termination must be called with the same parameters as the previous monitoring.
[in] | rWatchSpec | The original monitoring specification. |
|
virtual |
The monitoring of the objects in the container is terminated in the database. A monitoring termination must be called with the same parameters as the previous monitoring.
[in] | ulWatchMode | The original watch mode. Allowed watch modes:
|
[in] | eDeepMode | The original lock depth mode. |
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). If no CallBack is passed, notify(NotifyNote&) is taken from this; in this case the method notify(NotifyNote&) should be overwritten in the respective derived class. |
|
protected |
The monitoring of the object with passed object ID is terminated in the database.
[in] | rObjID | The object ID of the object whose monitoring is terminated. |
|
private |
There can only be one lock for a container of persistent objects.
Used to lock or release newly inserted objects with this lock.
|
private |
There can only be one monitoring for a container of persistent objects.
Is used to monitor newly inserted objects with this monitoring mode or to cancel monitoring of these objects.
|
protected |
A container of persistent objects is only valid for one class and, if applicable, for its subclasses. This is the class ID.