9#ifndef INC_SELFWATCHINGCLASSOBJCREATOR_H
10#define INC_SELFWATCHINGCLASSOBJCREATOR_H
12#include <EuException.h>
33 inline virtual bool isKnownClassID(
unsigned long ulClassID )
const;
35 inline virtual int getPersObject( std::shared_ptr< glo::Persistent > & rNewObject,
unsigned long ulClassID )
const;
40#define SUPER ObjCreator
53 return "SelfWatchingClass";
88 t_iErr = glo::ERR_UNKNOWN_CLASSID;
94 prNewObject->
setGloAttribute(
"glo::Persistent.m_ObjID", & t_NewObjID );
104 int t_iErr = this->
getPersObject( t_pPersistent, ulClassID );
108 rNewObject = std::shared_ptr< glo::Persistent >( t_pPersistent, glo::Forgeter< glo::Persistent >() );
115 unsigned long t_ulRetVal = 0;
124 throw eut::ErrorNException(
"SelfWatchingClassObjCreator::getClassID( BaseAllSet * pAllSet ) const", glo::ERR_UNKNOWN_OBJECT_TYPE, __FILE__, __LINE__ );
#define NULL_PTR
Definition EuDef_NULL_PTR.h:74
Header and source for TAllSet
Header for SelfWatchingClass
#define SUPER
Definition SelfWatchingClassObjCreator.h:40
Example of a self-observing class that reloads its persistent attributes from the database by calling...
Definition SelfWatchingClass.h:93
Definition SelfWatchingClassObjCreator.h:23
static const unsigned long ClassID_AllClasses
Definition SelfWatchingClassObjCreator.h:25
virtual ~SelfWatchingClassObjCreator()
Definition SelfWatchingClassObjCreator.h:47
virtual int getPersObject(glo::Persistent *&prNewObject, unsigned long ulClassID) const
Definition SelfWatchingClassObjCreator.h:69
static const unsigned long ClassID_glo_Persistent
Definition SelfWatchingClassObjCreator.h:26
virtual std::string getBaseName() const
Definition SelfWatchingClassObjCreator.h:51
virtual bool isKnownClassID(unsigned long ulClassID) const
Definition SelfWatchingClassObjCreator.h:56
virtual ObjCreator * getCopy() const
Definition SelfWatchingClassObjCreator.h:129
virtual unsigned long getClassID(glo::BaseAllSet *pAllSet) const
Definition SelfWatchingClassObjCreator.h:113
SelfWatchingClassObjCreator()
Definition SelfWatchingClassObjCreator.h:42
static const unsigned long ClassID_SelfWatchingClass
Definition SelfWatchingClassObjCreator.h:27
Is the base class of template AllSets and the generic AllSet.
Definition GloBaseAllSet.h:80
Abstract superclass for instantiation functions of persistent classes. From this class a subclass is ...
Definition GloObjCreator.h:71
ObjCreator()
Definition GloObjCreator.h:84
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:77
The base class of the persistent classes. All persistent classes must be derived from this class to b...
Definition GloPersistent.h:235
virtual int setGloAttribute(const AttributeID &rAttributeID, void *pPara)
AllSet, which returns objects from the database.
Definition GloTAllSet.h:185