HCE project C++ developers source code library
1.1.1
HCE project developer library
Main Page
Namespaces
Classes
Files
File List
File Members
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)]);};
18
ComponentBase
*
createInstance
(
ComponentType
cType)
19
{
return
Poco::DynamicFactory<ComponentBase>::createInstance
(
componentNames
[static_cast<int>(cType)]);}
20
template
<
class
T>
21
void
registerClass
(
ComponentType
cType)
22
{Poco::DynamicFactory<ComponentBase>::registerClass<T>(
componentNames
[
static_cast<
int
>
(cType)]);}
23
~ComponentsFactory
() {};
24
};
25
}
26
}
27
28
#endif
sources
HCECSM
src
ComponentsFactory.hpp
Generated on Mon Jan 13 2014 13:08:37 for HCE project C++ developers source code library by
1.8.1.2