Experimental!! Helper struct for adding the DerivedNode to the Node Factory Declaring an instance of an object at global scope means that it is created before the main code is entered We can use this to our advantage by using the constructor of this object to add entries to the factory in a distributed fashion (for instance, in the file where the derived node is defined), rather than manually having to add entries in one file To make things even simpler, the REGISTER macro expands the template argument to a string and passes it to the constructor. More...
#include <uhal/DerivedNode.hpp>
Public Member Functions | |
RegistrationHelper (const std::string &aDerivedClassName) | |
Constructor. More... | |
Experimental!! Helper struct for adding the DerivedNode to the Node Factory Declaring an instance of an object at global scope means that it is created before the main code is entered We can use this to our advantage by using the constructor of this object to add entries to the factory in a distributed fashion (for instance, in the file where the derived node is defined), rather than manually having to add entries in one file To make things even simpler, the REGISTER macro expands the template argument to a string and passes it to the constructor.
Helper class to add Nodes derived from DerivedNode to the class factory.
Definition at line 82 of file DerivedNode.hpp.
uhal::RegistrationHelper< T >::RegistrationHelper | ( | const std::string & | aDerivedClassName | ) |
Constructor.
aDerivedClassName | The name that will be used to identify this class in the factory |
Definition at line 38 of file DerivedNode.hxx.
References uhal::DerivedNodeFactory::add(), and uhal::DerivedNodeFactory::getInstance().