GlobalObjects
|
Is the abstract base class of on-demand sets and lists. More...
#include <GloOndemandLot.h>
Public Member Functions | |
OndemandLot () | |
OndemandLot (Base &rBase) | |
virtual | ~OndemandLot () |
virtual int | appendOndemand (const Reference &rNewOndemand) |
virtual int | appendPers (BasePersistent *pNewObj) |
virtual void | clear () |
virtual Base * | getBase () const override |
virtual int | getObjID (ObjID &rObjID, EnSeekMode eMode) |
virtual Reference * | getOndemand (EnSeekMode eMode)=0 |
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 | getPersistent (BasePersistent *&prRetVal, const ObjID &rObjID) |
virtual int | insertOndemand (const Reference &rNewOndemand) |
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 | removeOndemand (const Reference &rOndemand) |
virtual int | removePers (BasePersistent *pObject) |
virtual int | setBase (Base *pBase) override |
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 |
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. | |
virtual bool | inLot (const Reference &object) const |
Checks if passed object is referenced in the container. | |
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) |
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 Attributes | |
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 |
Private Member Functions | |
OndemandLot (const OndemandLot &) | |
OndemandLot & | operator= (const OndemandLot &) |
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 () |
Is the abstract base class of on-demand sets and lists.
glo::OndemandLot::OndemandLot | ( | ) |
Standard constructor.
glo::OndemandLot::OndemandLot | ( | Base & | rBase | ) |
Constructor with parameter passing.
[in] | rBase | The database is passed. |
|
virtual |
Destructor.
|
private |
The copy constructor is not available.
|
virtual |
Appends a reference to a persistent object to the end of the container.
If the container is locked, the referenced object of the reference to be inserted is locked with the container lock mode.
If the container is monitored, the referenced object of the reference to be inserted is also monitored with the monitoring mode of the container.
[in] | rNewOndemand | The reference to a persistent object to be inserted. |
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Appends a persistent object to the end of 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.
[in] | pNewObj | The persistent object to be inserted. |
Reimplemented from glo::BaseLot.
Reimplemented in glo::OndemandSet.
|
virtual |
All objects are removed from the list. The list-specific lock and watching mode is removed for all objects in the list.
Implements glo::BaseLot.
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
overridevirtual |
Implements glo::BaseLot.
|
virtual |
Returns an object id from the container in relation to eMode.
[in,out] | rObjID | The object ID if found. |
[in] | eMode | The seek mode. |
Parameter examples:
Implements glo::BaseLot.
|
pure virtual |
Returns a Reference with respect to eMode.
[in] | eMode | The seek mode. |
Parameter examples:
Implemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Returns an object from the container in relation to eMode.
[in,out] | prRetVal | If no error, the fetched object. |
[in] | eMode | The seek mode. |
Parameter examples:
Implements glo::BaseLot.
|
virtual |
Returns an object ID and if possible a object from the container of the database in relation to eMode. This also makes it possible to iterate over objects that cannot be read (only the object ID is then returned).
[in,out] | rObjID | The object ID. |
[in,out] | prRetVal | If no error, the fetched object. |
[in] | eMode | The seek mode. |
Parameter examples:
|
virtual |
Returns an object ID and if possible a object from the container of the database in relation to eMode. This also makes it possible to iterate over objects that cannot be read (only the object ID is then returned).
[in,out] | rObjID | The object ID. |
[in,out] | rRetVal | If no error, the fetched object. |
[in] | eMode | The seek mode. |
Parameter examples:
|
virtual |
Returns an object from the container in relation to eMode.
[in,out] | rRetVal | If no error, the fetched object. |
[in] | eMode | The seek mode. |
Parameter examples:
Reimplemented from glo::BaseLot.
|
virtual |
Returns an object with passed object ID from the container.
[in,out] | prRetVal | If no error, the fetched object. |
[in] | rObjID | The object ID. |
Implements glo::AbstractBaseLot.
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Checks if passed object is referenced in the container.
[in] | object | The object to check. |
Reimplemented from glo::BaseLot.
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Checks if passed object is referenced in the container.
[in] | object | The object to check. |
Implements glo::BaseLot.
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Checks if passed object is referenced in the container.
[in] | object | The object to check. |
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Checks if passed object is referenced in the container.
[in] | object | The object to check. |
Reimplemented from glo::BaseLot.
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Inserts a reference to a persistent object in the container after the current position.
If the container is locked, the referenced object of the reference to be inserted is locked with the container lock mode.
If the container is monitored, the referenced object of the reference to be inserted is also monitored with the monitoring mode of the container.
[in] | rNewOndemand | The reference to a persistent object to be inserted. |
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Inserts a reference to a persistent object before another one in the container.
If the container is locked, the referenced object of the reference to be inserted is locked with the container lock mode.
If the container is monitored, the referenced object of the reference to be inserted is also monitored with the monitoring mode of the container.
[in] | rNewOndemand | The reference to a persistent object to be inserted. |
[in] | rOndemand | The subsequent reference to a persistent object. |
Reimplemented in glo::OndemandSet.
|
virtual |
Inserts a persistent object into the container behind the current position.
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.
[in] | pNewObj | The persistent object to be inserted. |
Reimplemented from glo::BaseLot.
Reimplemented in glo::OndemandSet.
|
virtual |
Inserts a persistent object into the container behind the current position.
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.
[in] | spNewObj | The persistent object in a std::shared_ptr to be inserted. |
Reimplemented from glo::BaseLot.
Reimplemented in glo::OndemandSet.
|
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.
[in] | pNewObj | The persistent object to be inserted. |
[in] | pObject | The subsequent persistent object. |
Reimplemented from glo::BaseLot.
Reimplemented in glo::OndemandSet.
std::list< Reference * > & glo::OndemandLot::List | ( | ) |
Returns reference to the internal object list.
|
inlineprivate |
The assignment operator is not available.
|
virtual |
Removes the passed reference to a persistent object from the container.
If the container is locked, the referenced object of the reference to be removed is released with the container lock mode.
If the container is monitored, the monitoring of the referenced object of the reference to be removed is ended with the monitoring mode of the container.
[in] | rOndemand | The reference to a persistent object to be removed. |
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Removes the passed 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.
[in] | pObject | The persistent object to be removed. |
Implements glo::BaseLot.
|
overridevirtual |
Sets the pointer to the database.
[in] | pBase | Pointer to the database. |
Implements glo::BaseLot.
|
virtual |
Sets the internal iterator to the first position of the reference to a persistent object with passed object ID.
[in] | rObjID | The object ID. |
Implements glo::AbstractBaseLot.
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Sets the internal iterator to the passed position.
[in] | nPosition | The position to be set. |
Implements glo::AbstractBaseLot.
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
virtual |
Returns the number of objects in the list.
Implements glo::AbstractBaseLot.
Reimplemented in glo::OndemandList, and glo::OndemandSet.
|
protected |
The list of ondemand references of type Reference.
|
protected |
An internal iterator to the list of on-demand references.
|
protected |
The reference to a database via the database ID.