Abstract superclass for instantiation functions of persistent classes. From this class a subclass is derived for each database from a schema, which can instantiate persistent objects from the class IDs.
More...
#include <GloObjCreator.h>
Abstract superclass for instantiation functions of persistent classes. From this class a subclass is derived for each database from a schema, which can instantiate persistent objects from the class IDs.
The derived object creator is usually created by the GloDeveloper and must be included in the source files in which the Base is used.
- Copyright
- © 2010 Helmut Jakoby
- Author
- Helmut Jakoby
◆ ObjCreator() [1/2]
glo::ObjCreator::ObjCreator |
( |
| ) |
|
|
inline |
◆ ~ObjCreator()
virtual glo::ObjCreator::~ObjCreator |
( |
| ) |
|
|
inlinevirtual |
◆ ObjCreator() [2/2]
glo::ObjCreator::ObjCreator |
( |
const ObjCreator & | | ) |
|
|
private |
The copy constructor is not available.
- See also
- getCopy()
◆ getBaseName()
virtual std::string glo::ObjCreator::getBaseName |
( |
| ) |
const |
|
pure virtual |
◆ getClassID()
virtual unsigned long glo::ObjCreator::getClassID |
( |
BaseAllSet * | pAllSet | ) |
const |
|
pure virtual |
Returns the class ID of the passed AllSet in the subclass.
- Parameters
-
[in] | pAllSet | The AllSet to be checked. |
- Returns
- If the AllSet is known, the corresponding class ID.
- Exceptions
-
eut::ErrorNException | If the type of the AllSet is not known, an exception is thrown with the error ::ERR_UNKNOWN_OBJECT_TYPE. |
Implemented in BankAndCustomerObjCreator.
◆ getCopy()
virtual ObjCreator * glo::ObjCreator::getCopy |
( |
| ) |
const |
|
pure virtual |
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.
Implemented in BankAndCustomerObjCreator.
◆ getPersObject() [1/2]
virtual int glo::ObjCreator::getPersObject |
( |
Persistent *& | prNewObject, |
|
|
unsigned long | ulClassID ) const |
|
pure virtual |
Returns a persistent object (instantiation with the default constructor) in the subclass of the passed class ID.
- Parameters
-
[in,out] | prNewObject | The instantiated persistent object. |
[in] | ulClassID | The 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
Implemented in BankAndCustomerObjCreator.
◆ getPersObject() [2/2]
virtual int glo::ObjCreator::getPersObject |
( |
std::shared_ptr< Persistent > & | rNewObject, |
|
|
unsigned long | ulClassID ) const |
|
pure virtual |
Returns a persistent object (instantiation with the default constructor) in the subclass of the passed class ID.
- Parameters
-
[in,out] | rNewObject | The instantiated persistent object. |
[in] | ulClassID | The class ID of the object to be instantiated. |
- Returns
- A return value < 0 indicates an error.
Implemented in BankAndCustomerObjCreator.
◆ isKnownClassID()
virtual bool glo::ObjCreator::isKnownClassID |
( |
unsigned long | ulClassID | ) |
const |
|
pure virtual |
Checks in the subclass whether a class ID is known.
- Parameters
-
[in] | ulClassID | The class ID to be checked. |
- Returns
- If true, passed class ID is known.
Implemented in BankAndCustomerObjCreator.
◆ operator=()
The assignment operator is not available.
The documentation for this class was generated from the following file: