38 #include <boost/shared_ptr.hpp> 39 #include <boost/unordered_map.hpp> 43 #include "uhal/log/log.hpp" 76 boost::unordered_map< std::string , boost::shared_ptr<CreatorInterface> >::const_iterator lIt =
mCreators.find ( aNode->
mClassName );
80 log (
Warning ,
"Class " ,
Quote ( aNode->
mClassName ) ,
" is unknown to the NodeTreeBuilder class factory. A plain node will be returned instead." );
84 log (
Warning ,
"Known types are:" );
88 log (
Warning ,
" > " , lIt->first );
93 log (
Warning ,
"No class types have been defined" );
100 Node* lClassNode ( lIt->second->create ( *aNode ) );
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...
std::string mClassName
Class name used to construct the derived node type.
static DerivedNodeFactory * mInstance
The single instance of the class.
DerivedNodeFactory()
Default constructor This is private since only a single instance is to be created, using the getInstance method.
A heirarchical node for navigating heirarchical firmwares.
_Quote< T > Quote(const T &aT)
Node * convertToClassType(Node *aNode)
A singleton class to register derived nodes, and create instances of them later NOTE! This is a facto...
virtual ~DerivedNodeFactory()
Destructor.
static DerivedNodeFactory & getInstance()
Static method to retrieve the single instance of the class.