C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
simics::ObjectFactoryInterface Class Referenceabstract

Interface for a factory pattern to create ConfObject instances. More...

#include <object-factory-interface.h>

Inheritance diagram for simics::ObjectFactoryInterface:
simics::ObjectFactory< T > simics::ObjectFactoryWithArg< T, A >

Public Member Functions

virtual ~ObjectFactoryInterface ()=default
 
virtual ConfObjectcreate (conf_object_t *obj) const =0
 Creates a ConfObject instance from a conf_object_t pointer.
 
virtual ObjectFactoryInterfaceclone () const =0
 Clones the current ObjectFactoryInterface instance.
 

Detailed Description

Interface for a factory pattern to create ConfObject instances.

The ObjectFactoryInterface defines an interface for creating instances of ConfObject.

Constructor & Destructor Documentation

◆ ~ObjectFactoryInterface()

virtual simics::ObjectFactoryInterface::~ObjectFactoryInterface ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual ObjectFactoryInterface * simics::ObjectFactoryInterface::clone ( ) const
pure virtual

Clones the current ObjectFactoryInterface instance.

This function creates and returns a copy of the current ObjectFactoryInterface instance.

Returns
Pointer to a cloned ObjectFactoryInterface instance.

Implemented in simics::ObjectFactory< T >, and simics::ObjectFactoryWithArg< T, A >.

◆ create()

virtual ConfObject * simics::ObjectFactoryInterface::create ( conf_object_t *  obj) const
pure virtual

Creates a ConfObject instance from a conf_object_t pointer.

This function creates and returns a pointer to a ConfObject instance using the provided conf_object_t pointer.

Parameters
objPointer to a conf_object_t instance.
Returns
Pointer to a newly created ConfObject instance.

Implemented in simics::ObjectFactory< T >, and simics::ObjectFactoryWithArg< T, A >.


The documentation for this class was generated from the following file: