40#ifndef _uhal_DerivedNodeFactory_hpp_
41#define _uhal_DerivedNodeFactory_hpp_
46#include <unordered_map>
52 class NodeTreeBuilder;
55 template<
typename T >
struct RegistrationHelper;
102 void add (
const std::string& aNodeClassName );
158 std::unordered_map< std::string , std::shared_ptr< CreatorInterface > >
mCreators;
Templated concrete implementation with a CreatorInterface interface.
virtual ~Creator()
Destructor.
Node * create(const Node &aNode)
Concrete function which creates a new IPbus client based on the protocol identifier specified.
Creator()
Default constructor.
An abstract base class for defining the interface to the creators.
virtual Node * create(const Node &aNode)=0
Interface to a function which create a new derived node class based on the class name.
CreatorInterface()
Default constructor.
virtual ~CreatorInterface()
Destructor.
A singleton class to register derived nodes, and create instances of them later NOTE!...
Node * convertToClassType(Node *aNode)
virtual ~DerivedNodeFactory()
Destructor.
DerivedNodeFactory & operator=(const DerivedNodeFactory &)=delete
DerivedNodeFactory()
Default constructor This is private since only a single instance is to be created,...
static DerivedNodeFactory & getInstance()
Static method to retrieve the single instance of the class.
DerivedNodeFactory(const DerivedNodeFactory &)=delete
std::unordered_map< std::string, std::shared_ptr< CreatorInterface > > mCreators
Hash map associating a creator for a particular node type with a string identifier for that node type...
void add(const std::string &aNodeClassName)
Method to create an associate between a node type identifier and a Creator of that particular node ty...
static std::shared_ptr< DerivedNodeFactory > mInstance
The single instance of the class.
A heirarchical node for navigating heirarchical firmwares.
A class to build a node tree from an address table file.
Experimental!! Helper struct for adding the DerivedNode to the Node Factory Declaring an instance of ...