highlighter application
1.1
HCE project utils : highlighter
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
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
utils
HCECSM
src
ComponentsFactory.hpp
Generated on Mon Jan 13 2014 16:16:17 for highlighter application by
1.8.1.2