BankAndCustomer
All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
glo::TOndemand< T > Class Template Reference

#include <GloTOndemand.h>

Inheritance diagram for glo::TOndemand< T >:
Collaboration diagram for glo::TOndemand< T >:

Public Member Functions

 TOndemand ()
 
virtual ~TOndemand ()
 
int get (T *&prObj)
 
int get (std::shared_ptr< T > &rRetVal)
 
 TOndemand (const TOndemand &rT)
 Copy constructor.
 
template<class T2>
 TOndemand (const TOndemand< T2 > &rT)
 Copy constructor.
 
int set (const T *rObj)
 Adopts the object ID of the passed object as reference.
 
int set (const T &rObj)
 Adopts the object ID of the passed object as reference.
 
int set (const std::shared_ptr< T > &rObj)
 Adopts the object ID of the passed object as reference.
 
virtual int set (const ObjID &rObj) override
 Adopts the object ID of the passed object as reference.
 
virtual int set (const BasePersistent *rObj) override
 Adopts the object ID of the passed object as reference.
 
virtual int set (const BasePersistent &rObj) override
 Adopts the object ID of the passed object as reference.
 
TOndemand< T > & operator= (const TOndemand &rT)
 Assignment operator.
 
template<class T2>
TOndemand< T > & operator= (const TOndemand< T2 > &rT)
 Assignment operator.
 
bool operator== (const TOndemand &rT) const
 Comparison operator.
 
bool operator!= (const TOndemand &rT) const
 Comparison operator.
 
template<class T2>
bool operator== (const TOndemand< T2 > &rT) const
 Comparison operator.
 
template<class T2>
bool operator!= (const TOndemand< T2 > &rT) const
 Comparison operator.
 
- Public Member Functions inherited from glo::Reference
 Reference ()
 
 Reference (const ObjID &rObjID)
 
 Reference (const Reference &rT)
 
virtual ~Reference ()
 
virtual BasegetBase () const override
 
virtual int getTypeAsString (std::string &rsTypeName) override
 
bool isNULL () const
 
void setNULL ()
 
ObjID getObjID () const
 
const ObjIDgetObjIDAsPointer () const
 
int getBasePersistent (BasePersistent *&prRetVal)
 
int getBasePersistent (std::shared_ptr< BasePersistent > &rspRetVal)
 
virtual int deleteInBase (EnDeepMode eDeepMode=DM_SHALLOW)
 
virtual int lock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
 
virtual int lock (const LockSpecification &rLockSpecification) const
 
virtual int unlock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
 
virtual int unlock (const LockSpecification &rLockSpecification) const
 
virtual int isLocked (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
 
virtual int isLocked (const LockSpecification &rLockSpecification) const
 
virtual int isPossible (bool bRead, bool bWrite, bool bDelete, EnDeepMode eDeepMode=DM_SHALLOW) const
 
virtual int isPossible (const LockPossibleSpecification &rLockPossibleSpec, EnDeepMode eDeepMode=DM_SHALLOW) const
 
virtual int setWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) const
 
virtual int setWatch (const WatchSpecification &rWatchSpec) const
 
virtual int unsetWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
 
virtual int unsetWatch (const WatchSpecification &rWatchSpec) const
 
Referenceoperator= (const Reference &rT)
 
bool operator== (const Reference &rT) const
 Comparison operator.
 
bool operator!= (const Reference &rT) const
 Comparison operator.
 
- Public Member Functions inherited from glo::CallBack
 CallBack ()
 
virtual ~CallBack ()
 
virtual int setBase (Base *pBase)
 
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.
 

Static Public Member Functions

static unsigned long getStaticGloClassID ()
 

Private Member Functions

 TOndemand (const ObjID &rObjID)
 

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 ()
 

Constructor & Destructor Documentation

◆ TOndemand() [1/4]

template<class T>
glo::TOndemand< T >::TOndemand ( )

Standard constructor.

◆ TOndemand() [2/4]

template<class T>
glo::TOndemand< T >::TOndemand ( const ObjID & rObjID)
private

Constructor with parameter passing.

Parameters
[in]rObjIDThe object ID of the object to be referenced can be specified during creation.

◆ TOndemand() [3/4]

template<class T>
glo::TOndemand< T >::TOndemand ( const TOndemand< T > & rT)

Copy constructor.

Parameters
[in]rTThe data is copied from this object.

◆ TOndemand() [4/4]

template<class T>
template<class T2>
glo::TOndemand< T >::TOndemand ( const TOndemand< T2 > & rT)

Copy constructor.

Parameters
[in]rTThe data is copied from this object.

◆ ~TOndemand()

template<class T>
glo::TOndemand< T >::~TOndemand ( )
virtual

Destructor

Member Function Documentation

◆ get() [1/2]

template<class T>
int glo::TOndemand< T >::get ( std::shared_ptr< T > & rRetVal)

Returns the referenced object from the database (or from memory if already loaded) in a std::shared_ptr.

Parameters
[in,out]rRetValThe referenced object in a std::shared_ptr.
Returns
A return < 0 indicates an error.
If a referenced object does not exist in the database, the error glo::ERR_NO_INDEX is returned.

◆ get() [2/2]

template<class T>
int glo::TOndemand< T >::get ( T *& prObj)

Returns the referenced object from the database (or from memory if already loaded).

Parameters
[in,out]prObjThe pointer reference to the referenced object.
Returns
A return < 0 indicates an error.
If a referenced object does not exist in the database, the error glo::ERR_NO_INDEX is returned.
Attention
The returned object must be removed from memory by the calling instance using BasePersistent::forget().
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method get(std::shared_ptr<T>&).
Es wird empfohlen, wenn möglich, die Verwendung von std::shared_ptr in Betracht zu ziehen und die Methode get(std::shared_ptr<T>&) zu nutzen.

◆ getStaticGloClassID()

template<class T>
static unsigned long glo::TOndemand< T >::getStaticGloClassID ( )
inlinestatic

Returns the template class ID.

Returns
The class ID

◆ operator!=() [1/2]

template<class T>
bool glo::TOndemand< T >::operator!= ( const TOndemand< T > & rT) const

Comparison operator.

Parameters
[in]rTThe object to be compared with this one.

◆ operator!=() [2/2]

template<class T>
template<class T2>
bool glo::TOndemand< T >::operator!= ( const TOndemand< T2 > & rT) const

Comparison operator.

Parameters
[in]rTThe object to be compared with this one.

◆ operator=() [1/2]

template<class T>
TOndemand< T > & glo::TOndemand< T >::operator= ( const TOndemand< T > & rT)

Assignment operator.

Parameters
[in]rTThe data is transferred from this object.

◆ operator=() [2/2]

template<class T>
template<class T2>
TOndemand< T > & glo::TOndemand< T >::operator= ( const TOndemand< T2 > & rT)

Assignment operator.

Parameters
[in]rTThe data is transferred from this object.

◆ operator==() [1/2]

template<class T>
bool glo::TOndemand< T >::operator== ( const TOndemand< T > & rT) const

Comparison operator.

Parameters
[in]rTThe object to be compared with this one.

◆ operator==() [2/2]

template<class T>
template<class T2>
bool glo::TOndemand< T >::operator== ( const TOndemand< T2 > & rT) const

Comparison operator.

Parameters
[in]rTThe object to be compared with this one.

◆ set() [1/6]

template<class T>
int glo::TOndemand< T >::set ( const BasePersistent & rObj)
overridevirtual

Adopts the object ID of the passed object as reference.

Parameters
[in]rObjSee above.
Returns
A return value < 0 indicates an error.

Reimplemented from glo::Reference.

◆ set() [2/6]

template<class T>
int glo::TOndemand< T >::set ( const BasePersistent * rObj)
overridevirtual

Adopts the object ID of the passed object as reference.

Parameters
[in]rObjSee above.
Returns
A return value < 0 indicates an error.

Reimplemented from glo::Reference.

◆ set() [3/6]

template<class T>
int glo::TOndemand< T >::set ( const ObjID & rObj)
overridevirtual

Adopts the object ID of the passed object as reference.

Parameters
[in]rObjSee above.
Returns
A return value < 0 indicates an error.

Reimplemented from glo::Reference.

◆ set() [4/6]

template<class T>
int glo::TOndemand< T >::set ( const std::shared_ptr< T > & rObj)

Adopts the object ID of the passed object as reference.

Parameters
[in]rObjSee above.
Returns
A return value < 0 indicates an error.

◆ set() [5/6]

template<class T>
int glo::TOndemand< T >::set ( const T & rObj)

Adopts the object ID of the passed object as reference.

Parameters
[in]rObjSee above.
Returns
A return value < 0 indicates an error.

◆ set() [6/6]

template<class T>
int glo::TOndemand< T >::set ( const T * rObj)

Adopts the object ID of the passed object as reference.

Parameters
[in]rObjSee above.
Returns
A return value < 0 indicates an error.

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