#include <cObjectFactory.h>
Service Locater / Creator pattern for CObject based objects https://en.wikipedia.org/wiki/Service_locator_pattern like MFC CRuntimeClass. used to create CObject based objects by string name. Allow runtime binding. Create a new object by name. It may be overridden. Typically one would ask for an Interface and a concrete object would be created. similar to Object Injection. ALA Ninject. Used to allow creation of overloaded singletons. TODO Allocation of the object is unknown! Is it static? must delete ? cRefPtr? ???
◆ cObjectFactory()
Gray::cObjectFactory::cObjectFactory |
( |
const char * |
pszName, |
|
|
const TYPEINFO_t & |
rTypeInfo |
|
) |
| |
|
inlinenoexcept |
the typeid() of some object we would create.
◆ CreateObject() [1/3]
virtual CObject* Gray::cObjectFactory::CreateObject |
( |
| ) |
const |
|
pure virtual |
◆ CreateObject() [2/3]
static CObject* __stdcall Gray::cObjectFactory::CreateObject |
( |
const char * |
pszName | ) |
|
|
static |
◆ CreateObject() [3/3]
static CObject* __stdcall Gray::cObjectFactory::CreateObject |
( |
const TYPEINFO_t & |
type | ) |
|
|
static |
◆ m_pszName
const char* const Gray::cObjectFactory::m_pszName |
◆ m_TypeInfo
const cTypeInfo& Gray::cObjectFactory::m_TypeInfo |
The main name we can create by. Might have multiple alternate aliases for interfaces. e.g. "IObjectName".
The documentation for this class was generated from the following file: