1#ifndef INC_GLOTONDEMANDSET_H
2#define INC_GLOTONDEMANDSET_H
204 virtual int insert( T * NewObj );
205 virtual int insert( std::shared_ptr<T> NewObj );
242 virtual int remove( T * Object );
243 virtual int remove( std::shared_ptr<T> Object );
301 virtual int get( std::shared_ptr<T> & rRetVal,
EnSeekMode eMode );
400 virtual int get( T *& prRetVal,
const ObjID & rObjID );
426 virtual int get( std::shared_ptr<T> & rRetVal,
const ObjID & rObjID );
445 #define SUPER OndemandSet
473 std::size_t t_nCount( 0 );
475 rsTypeName =
typeid(T).name();
476 rsTypeName.replace( t_nCount, 6,
"");
483 return SUPER::insertPers( pNewObj );
489 return SUPER::insertPers( spNewObj.operator->() );
495 return SUPER::removePers( pObject );
501 return SUPER::removePers( spObject.operator->() );
514 T * t_pPersObject = 0;
515 int t_iErr = this->get( t_pPersObject, eMode );
528 T * t_pPersObject = 0;
529 int t_iErr = this->get( t_pPersObject, eMode );
533 rRetVal.
set( t_pPersObject );
541 return SUPER::getPers( rObjID, (
BasePersistent*&) prRetVal, eMode );
546 std::shared_ptr<T> & rRetVal,
549 T * t_pPersObject =
nullptr;
550 int t_iErr = this->get( rObjID, t_pPersObject, eMode );
564 T * t_pPersObject =
nullptr;
565 int t_iErr = this->get( rObjID, t_pPersObject, eMode );
569 rRetVal.
set( t_pPersObject );
577 return SUPER::getPersistent( (
BasePersistent*&) prRetVal, rObjID );
582 const ObjID & rObjID )
584 T * t_pPersObject = 0;
585 int t_iErr = this->get( t_pPersObject, rObjID );
Header for BasePersistent
#define SUPER
Definition GloTAllSet.h:1204
For each library, here 'GlobalObjects' there is a type file.
Abstract base class for Persistent and the generic GenericPersistent.
Definition GloBasePersistent.h:124
std::string m_strDebugInfo
Definition GloCallBack.h:111
Especially for GenericPersistent or derived classes of Persistent the Forget method for std::shared_p...
Definition GloTypes.h:1234
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:84
Is the base class of Template-Ondemand-Set. Objects can be inserted only once.
Definition GloOndemandSet.h:71
A reference (as attribute) of a persistent object to another persistent object in the database.
Definition GloTOndemand.h:102
int set(const T *pObj)
Definition GloTOndemand.h:460
A type-safe set of references to persistent objects in the database (intended as an attribute for per...
Definition GloTOndemandSet.h:94
virtual ~TOndemandSet()
Definition GloTOndemandSet.h:466
virtual int getTypeAsString(std::string &rsTypeName) override
Definition GloTOndemandSet.h:471
virtual int remove(T *Object)
Removes the passed persistent object from the set.
Definition GloTOndemandSet.h:493
virtual int insert(T *NewObj)
Inserts the passed persistent object into the set behind the current position.
Definition GloTOndemandSet.h:481
TOndemandSet< T > & operator=(const TOndemandSet &)
TOndemandSet(const TOndemandSet &)
TOndemandSet()
Definition GloTOndemandSet.h:448
virtual int get(T *&prRetVal, EnSeekMode eMode)
Definition GloTOndemandSet.h:505
Definition GloAbstractBaseLot.h:49
EnSeekMode
Definition GloTypes.h:173