BankAndCustomer
Loading...
Searching...
No Matches
SelfWatchingClassObjCreator Class Reference

#include <SelfWatchingClassObjCreator.h>

Inheritance diagram for SelfWatchingClassObjCreator:
Collaboration diagram for SelfWatchingClassObjCreator:

Public Member Functions

 SelfWatchingClassObjCreator ()
 
virtual ~SelfWatchingClassObjCreator ()
 
virtual std::string getBaseName () const
 
virtual bool isKnownClassID (unsigned long ulClassID) const
 
virtual int getPersObject (glo::Persistent *&prNewObject, unsigned long ulClassID) const
 
virtual int getPersObject (std::shared_ptr< glo::Persistent > &rNewObject, unsigned long ulClassID) const
 
virtual unsigned long getClassID (glo::BaseAllSet *pAllSet) const
 
virtual ObjCreatorgetCopy () const
 
- Public Member Functions inherited from glo::ObjCreator
 ObjCreator ()
 
virtual ~ObjCreator ()
 

Static Public Attributes

static const unsigned long ClassID_AllClasses = 0
 
static const unsigned long ClassID_glo_Persistent = 1
 
static const unsigned long ClassID_SelfWatchingClass = 2
 

Constructor & Destructor Documentation

◆ SelfWatchingClassObjCreator()

SelfWatchingClassObjCreator::SelfWatchingClassObjCreator ( )
inline

◆ ~SelfWatchingClassObjCreator()

SelfWatchingClassObjCreator::~SelfWatchingClassObjCreator ( )
inlinevirtual

Member Function Documentation

◆ getBaseName()

std::string SelfWatchingClassObjCreator::getBaseName ( ) const
inlinevirtual

Returns the database name in the subclass.

Returns
see above.

Implements glo::ObjCreator.

◆ getClassID()

unsigned long SelfWatchingClassObjCreator::getClassID ( glo::BaseAllSet * pAllSet) const
inlinevirtual

Returns the class ID of the passed AllSet in the subclass.

Parameters
[in]pAllSetThe AllSet to be checked.
Returns
If the AllSet is known, the corresponding class ID.
Exceptions
eut::ErrorNExceptionIf the type of the AllSet is not known, an exception is thrown with the error ::ERR_UNKNOWN_OBJECT_TYPE.

Implements glo::ObjCreator.

◆ getCopy()

glo::ObjCreator * SelfWatchingClassObjCreator::getCopy ( ) const
inlinevirtual

Returns a copy of itself in the subclass.

Returns
The copy of this object.
Attention
The copy must be removed from memory by the calling instance.

Implements glo::ObjCreator.

◆ getPersObject() [1/2]

int SelfWatchingClassObjCreator::getPersObject ( glo::Persistent *& prNewObject,
unsigned long ulClassID ) const
inlinevirtual

Returns a persistent object (instantiation with the default constructor) in the subclass of the passed class ID.

Parameters
[in,out]prNewObjectThe instantiated persistent object.
[in]ulClassIDThe class ID of the object to be instantiated.
Returns
A return value < 0 indicates an error.
Attention
If prNewObject is valid, this 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 getPersObject(std::shared_ptr<Persistent>&, unsigned long)const

Implements glo::ObjCreator.

◆ getPersObject() [2/2]

int SelfWatchingClassObjCreator::getPersObject ( std::shared_ptr< glo::Persistent > & rNewObject,
unsigned long ulClassID ) const
inlinevirtual

Returns a persistent object (instantiation with the default constructor) in the subclass of the passed class ID.

Parameters
[in,out]rNewObjectThe instantiated persistent object.
[in]ulClassIDThe class ID of the object to be instantiated.
Returns
A return value < 0 indicates an error.

Implements glo::ObjCreator.

◆ isKnownClassID()

bool SelfWatchingClassObjCreator::isKnownClassID ( unsigned long ulClassID) const
inlinevirtual

Checks in the subclass whether a class ID is known.

Parameters
[in]ulClassIDThe class ID to be checked.
Returns
If true, passed class ID is known.

Implements glo::ObjCreator.

Member Data Documentation

◆ ClassID_AllClasses

const unsigned long SelfWatchingClassObjCreator::ClassID_AllClasses = 0
static

◆ ClassID_glo_Persistent

const unsigned long SelfWatchingClassObjCreator::ClassID_glo_Persistent = 1
static

◆ ClassID_SelfWatchingClass

const unsigned long SelfWatchingClassObjCreator::ClassID_SelfWatchingClass = 2
static

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