RMM API 2.0.0
Loading...
Searching...
No Matches
FrontEndFactory Class Reference

Factory class for creating and registering frontend objects. More...

#include <FrontEndFactory.h>

Static Public Member Functions

template<typename T, typename... Args>
static std::shared_ptr< T > createAndRegister (RMMAPI *pRmmAPI, int ring, int node, std::string name, Args &&... args)
 Creates and registers a frontend object.
 

Detailed Description

Factory class for creating and registering frontend objects.

This class provides a templated static method to create instances of frontend objects that inherit from FrontEndBase and automatically register them in the RMMAPI topology.

Member Function Documentation

◆ createAndRegister()

template<typename T, typename... Args>
static std::shared_ptr< T > FrontEndFactory::createAndRegister ( RMMAPI * pRmmAPI,
int ring,
int node,
std::string name,
Args &&... args )
inlinestatic

Creates and registers a frontend object.

This method creates a new instance of a frontend object of type T, registers it in the topology of the RMMAPI, and returns a shared pointer to it. The frontend object must inherit from FrontEndBase and implement the configFE method.

Template Parameters
TThe type of the frontend object to create. Must be derived from FrontEndBase.
ArgsVariadic template parameters for additional constructor arguments.
Parameters
[in]pRmmAPIPointer to the RMMAPI instance that manages the topology.
[in]ringThe ring ID where the frontend is located.
[in]nodeThe node ID within the ring.
[in]nameThe name of the frontend device.
[in]addrMapA mapping of register names to their addresses.
[in]argsAdditional arguments passed to the constructor of T.
Returns
std::shared_ptr<T> A shared pointer to the created frontend object.

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