|
Last change
on this file since 18 was 3, checked in by sgosseli, 13 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 |
|
|---|
| 16 | class QString;
|
|---|
| 17 |
|
|---|
| 18 | namespace pacpus {
|
|---|
| 19 |
|
|---|
| 20 | class ComponentManager;
|
|---|
| 21 | class ComponentBase;
|
|---|
| 22 |
|
|---|
| 23 | class PACPUSLIB_API ComponentFactoryBase
|
|---|
| 24 | {
|
|---|
| 25 | friend class ComponentManager;
|
|---|
| 26 |
|
|---|
| 27 | public:
|
|---|
| 28 | ComponentFactoryBase();
|
|---|
| 29 | virtual ~ComponentFactoryBase();
|
|---|
| 30 |
|
|---|
| 31 | protected:
|
|---|
| 32 | virtual ComponentBase * instantiateComponent(const QString & name) = 0;
|
|---|
| 33 | void addFactory(ComponentFactoryBase * addr, const QString & type);
|
|---|
| 34 | void addComponent(const QString & name);
|
|---|
| 35 |
|
|---|
| 36 | private:
|
|---|
| 37 | ComponentManager * mgr_;
|
|---|
| 38 | };
|
|---|
| 39 |
|
|---|
| 40 | } // namespace pacpus
|
|---|
| 41 |
|
|---|
| 42 | #endif // COMPONENTFACTORYBASE_H
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.