hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ComponentsFactory.hpp
Go to the documentation of this file.
1 #ifndef COMPONENTS_FACTORY_HPP
2 #define COMPONENTS_FACTORY_HPP
3 
4 #include <Poco/DynamicFactory.h>
5 
6 #include "HCEConstants.hpp"
7 #include "ComponentBase.hpp"
8 
9 namespace HCE
10 {
11  namespace component
12  {
13  class ComponentsFactory: public Poco::DynamicFactory<ComponentBase>
14  {
15  public:
16  ComponentsFactory() : Poco::DynamicFactory<ComponentBase>() {};
17  bool isClass(ComponentType cType) {return Poco::DynamicFactory<ComponentBase>::isClass(componentNames[static_cast<int>(cType)]);};
20  template<class T>
22  {Poco::DynamicFactory<ComponentBase>::registerClass<T>(componentNames[static_cast<int>(cType)]);}
24  };
25  }
26 }
27 
28 #endif