A factory for creating instances of ConfObject-derived classes. More...
#include <object-factory.h>
Public Member Functions | |
| ObjectFactory ()=default | |
| ConfObject * | create (conf_object_t *obj) const override |
| Creates an instance of the ConfObject-derived class. | |
| ObjectFactoryInterface * | clone () const override |
| Clones the current ObjectFactory instance. | |
Public Member Functions inherited from simics::ObjectFactoryInterface | |
| virtual | ~ObjectFactoryInterface ()=default |
| virtual ConfObject * | create (conf_object_t *obj) const =0 |
| Creates a ConfObject instance from a conf_object_t pointer. | |
| virtual ObjectFactoryInterface * | clone () const =0 |
| Clones the current ObjectFactoryInterface instance. | |
A factory for creating instances of ConfObject-derived classes.
The ObjectFactory class template provides a factory for creating instances of classes derived from ConfObject. It implements the ObjectFactoryInterface.
| T | The type of the ConfObject-derived class to be created. |
|
default |
|
inlineoverridevirtual |
Clones the current ObjectFactory instance.
This function creates and returns a copy of the current ObjectFactory instance.
Implements simics::ObjectFactoryInterface.
|
inlineoverridevirtual |
Creates an instance of the ConfObject-derived class.
This function creates and returns a new instance of the ConfObject-derived class using the provided conf_object_t pointer.
| obj | Pointer to a conf_object_t instance. |
Implements simics::ObjectFactoryInterface.