A factory for creating instances of ConfObject-derived classes with an argument. More...
#include <object-factory.h>
Public Member Functions | |
| ObjectFactoryWithArg (A *arg) | |
| ConfObject * | create (conf_object_t *obj) const override |
| Creates an instance of the ConfObject-derived class with an argument. | |
| ObjectFactoryInterface * | clone () const override |
| Clones the current ObjectFactoryWithArg 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 with an argument.
The ObjectFactoryWithArg class template provides a factory for creating instances of classes derived from ConfObject, with an additional argument passed to the constructor. It implements the ObjectFactoryInterface.
| T | The type of the ConfObject-derived class to be created. |
| A | The type of the additional argument to be passed to the constructor. |
|
inlineexplicit |
|
inlineoverridevirtual |
Clones the current ObjectFactoryWithArg instance.
This function creates and returns a copy of the current ObjectFactoryWithArg instance.
Implements simics::ObjectFactoryInterface.
|
inlineoverridevirtual |
Creates an instance of the ConfObject-derived class with an argument.
This function creates and returns a new instance of the ConfObject-derived class using the provided conf_object_t pointer and the additional argument.
| obj | Pointer to a conf_object_t instance. |
Implements simics::ObjectFactoryInterface.