source: pacpusframework/trunk/include/Pacpus/kernel/ComponentFactoryBase.h@ 18

Last change on this file since 18 was 3, checked in by sgosseli, 12 years ago
  • Add the existing Pacpus files from pacpusdev and pacpuscore.
  • Provide a clean build system based on multiple CMake files.
File size: 1.0 KB
Line 
1/********************************************************************
2// created: 2006/02/14 - 16:08
3// filename: ComponentFactoryBase.h
4//
5// author: Gerald Dherbomez
6//
7// purpose: The ComponentFactoryBase class is used to provide an
8// abstract class to the template ComponentFactory
9*********************************************************************/
10
11#ifndef COMPONENTFACTORYBASE_H
12#define COMPONENTFACTORYBASE_H
13
14#include "pacpus.h"
15
16class QString;
17
18namespace pacpus {
19
20class ComponentManager;
21class ComponentBase;
22
23class PACPUSLIB_API ComponentFactoryBase
24{
25 friend class ComponentManager;
26
27public:
28 ComponentFactoryBase();
29 virtual ~ComponentFactoryBase();
30
31protected:
32 virtual ComponentBase * instantiateComponent(const QString & name) = 0;
33 void addFactory(ComponentFactoryBase * addr, const QString & type);
34 void addComponent(const QString & name);
35
36private:
37 ComponentManager * mgr_;
38};
39
40} // namespace pacpus
41
42#endif // COMPONENTFACTORYBASE_H
Note: See TracBrowser for help on using the repository browser.