Last change
on this file since 31 was 31, checked in by sgosseli, 12 years ago |
Huge commit: use the new includes style in all the files, add the license header in all the headers, and in some cpp.
|
File size:
1.0 KB
|
Rev | Line | |
---|
[31] | 1 | /**
|
---|
| 2 | *
|
---|
| 3 | * Distributed under the UTC Heudiascy Pacpus License, Version 1.0.
|
---|
| 4 | * Copyright (c) UTC Heudiasyc 2010 - 2013. All rights reserved.
|
---|
| 5 | *
|
---|
| 6 | * See the LICENSE file for more information or a copy at:
|
---|
| 7 | * http://www.hds.utc.fr/~kurdejma/LICENSE_1_0.txt
|
---|
| 8 | *
|
---|
| 9 | */
|
---|
[3] | 10 |
|
---|
[31] | 11 | #ifndef DEF_PACPUS_COMPONENTFACTORYBASE_H
|
---|
| 12 | #define DEF_PACPUS_COMPONENTFACTORYBASE_H
|
---|
[3] | 13 |
|
---|
[31] | 14 | #include <Pacpus/kernel/pacpus.h>
|
---|
[3] | 15 |
|
---|
| 16 | class QString;
|
---|
| 17 |
|
---|
| 18 | namespace pacpus {
|
---|
| 19 |
|
---|
| 20 | class ComponentManager;
|
---|
| 21 | class ComponentBase;
|
---|
| 22 |
|
---|
[31] | 23 | /** ComponentFactoryBase
|
---|
| 24 | * @brief Provide an abstract class to the template ComponentFactory.
|
---|
| 25 | */
|
---|
[3] | 26 | class PACPUSLIB_API ComponentFactoryBase
|
---|
| 27 | {
|
---|
| 28 | friend class ComponentManager;
|
---|
| 29 |
|
---|
| 30 | public:
|
---|
| 31 | ComponentFactoryBase();
|
---|
| 32 | virtual ~ComponentFactoryBase();
|
---|
| 33 |
|
---|
| 34 | protected:
|
---|
| 35 | virtual ComponentBase * instantiateComponent(const QString & name) = 0;
|
---|
| 36 | void addFactory(ComponentFactoryBase * addr, const QString & type);
|
---|
| 37 | void addComponent(const QString & name);
|
---|
| 38 |
|
---|
| 39 | private:
|
---|
| 40 | ComponentManager * mgr_;
|
---|
| 41 | };
|
---|
| 42 |
|
---|
| 43 | } // namespace pacpus
|
---|
| 44 |
|
---|
[31] | 45 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.