JAPAn
Just Another Parity Analyzer
|
Abstract factory base for runtime object creation. More...
#include <QwFactory.h>
Public Member Functions | |
virtual | ~VQwFactory () |
Default virtual destructor. | |
virtual base_t * | Create (const std::string &name) const =0 |
Creation of objects by type (pure virtual) | |
virtual base_t * | Cast (base_t *base) const =0 |
Dynamic cast to type (pure virtual) | |
Static Public Member Functions | |
static base_t * | Create (const std::string &type, const std::string &name) |
Create an object of type with name. | |
static base_t * | Cast (base_t *base, const std::string &type) |
Dynamic cast of object into type. | |
static bool | InheritsFrom (base_t *base, const std::string &type) |
Test whether object inherits from type. | |
Static Protected Member Functions | |
static std::map< std::string, VQwFactory * > & | GetRegisteredTypes () |
Map from string to concrete type factories. | |
static void | ListRegisteredTypes () |
List available type factories. | |
static VQwFactory * | GetFactory (const std::string &type) |
Get a concrete type factory by string. | |
Abstract factory base for runtime object creation.
Enables instantiation of derived types based on runtime string identifiers. Maintains a registry of concrete factory instances that can create objects of specified types. Used throughout the framework to support configuration- driven object creation for subsystems, data handlers, and data elements.
Definition at line 39 of file QwFactory.h.
|
inlinevirtual |
|
pure virtual |
Dynamic cast to type (pure virtual)
Implemented in QwFactory< base_t, type_t >, QwFactory< VQwDataElement, dataelement_t >, QwFactory< VQwDataHandler, handler_t >, and QwFactory< VQwSubsystem, subsystem_t >.
|
inlinestatic |
Dynamic cast of object into type.
Definition at line 52 of file QwFactory.h.
References Cast(), and GetFactory().
Referenced by Cast(), and InheritsFrom().
|
pure virtual |
Creation of objects by type (pure virtual)
Implemented in QwFactory< base_t, type_t >, QwFactory< VQwDataElement, dataelement_t >, QwFactory< VQwDataHandler, handler_t >, and QwFactory< VQwSubsystem, subsystem_t >.
|
inlinestatic |
Create an object of type with name.
Definition at line 47 of file QwFactory.h.
References Create(), and GetFactory().
Referenced by Create().
|
inlinestaticprotected |
Get a concrete type factory by string.
Definition at line 82 of file QwFactory.h.
References QwLog::endl(), GetRegisteredTypes(), ListRegisteredTypes(), QwError, QwMessage, and QwWarning.
Referenced by Cast(), and Create().
|
inlinestaticprotected |
Map from string to concrete type factories.
Definition at line 69 of file QwFactory.h.
Referenced by GetFactory(), ListRegisteredTypes(), and QwFactory< base_t, type_t >::QwFactory().
|
inlinestatic |
|
inlinestaticprotected |
List available type factories.
Definition at line 74 of file QwFactory.h.
References QwLog::endl(), GetRegisteredTypes(), and QwMessage.
Referenced by GetFactory().