|
μHAL (v2.7.9)
Part of the IPbus software repository
|
Go to the documentation of this file.
40 #ifndef _uhal_DerivedNodeFactory_hpp_
41 #define _uhal_DerivedNodeFactory_hpp_
46 #include <boost/noncopyable.hpp>
47 #include <boost/shared_ptr.hpp>
48 #include <boost/unordered_map.hpp>
58 class NodeTreeBuilder;
61 template<
typename T >
struct RegistrationHelper;
104 void add (
const std::string& aNodeClassName );
160 boost::unordered_map< std::string , boost::shared_ptr< CreatorInterface > >
mCreators;
virtual ~CreatorInterface()
Destructor.
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 boost::shared_ptr< DerivedNodeFactory > mInstance
The single instance of the class.
virtual Node * create(const Node &aNode)=0
Interface to a function which create a new derived node class based on the class name.
virtual ~Creator()
Destructor.
Templated concrete implementation with a CreatorInterface interface.
A singleton class to register derived nodes, and create instances of them later NOTE!...
Experimental!! Helper struct for adding the DerivedNode to the Node Factory Declaring an instance of ...
A class to build a node tree from an Address table file NOTE! This is a factory method and must be Mu...
DerivedNodeFactory()
Default constructor This is private since only a single instance is to be created,...
A heirarchical node for navigating heirarchical firmwares.
CreatorInterface()
Default constructor.
Node * create(const Node &aNode)
Concrete function which creates a new IPbus client based on the protocol identifier specified.
Node * convertToClassType(Node *aNode)
virtual ~DerivedNodeFactory()
Destructor.
static DerivedNodeFactory & getInstance()
Static method to retrieve the single instance of the class.
An abstract base class for defining the interface to the creators.
Creator()
Default constructor.
boost::unordered_map< std::string, boost::shared_ptr< CreatorInterface > > mCreators
Hash map associating a creator for a particular node type with a string identifier for that node type...