38#include <unordered_map>
75 std::unordered_map< std::string , std::shared_ptr<CreatorInterface> >::const_iterator lIt =
mCreators.find ( aNode->
mClassName );
79 log (
Warning ,
"Class " ,
Quote ( aNode->
mClassName ) ,
" is unknown to the NodeTreeBuilder class factory. A plain node will be returned instead." );
85 for ( std::unordered_map< std::string , std::shared_ptr<CreatorInterface> >::const_iterator lIt =
mCreators.begin() ; lIt !=
mCreators.end() ; ++lIt )
92 log (
Warning ,
"No class types have been defined" );
99 Node* lClassNode ( lIt->second->create ( *aNode ) );
A singleton class to register derived nodes, and create instances of them later NOTE!...
Node * convertToClassType(Node *aNode)
virtual ~DerivedNodeFactory()
Destructor.
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.
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...
static std::shared_ptr< DerivedNodeFactory > mInstance
The single instance of the class.
A heirarchical node for navigating heirarchical firmwares.
std::string mClassName
Class name used to construct the derived node type.
_Quote< T > Quote(const T &aT)
void log(FatalLevel &aFatal, const T0 &aArg0)
Function to add a log entry at Fatal level.