|
Last change
on this file since 746ff1 was 746ff1, checked in by Frederik Heber <heber@…>, 15 years ago |
|
Added Creator and Factory pattern.
- unittests added.
- new subfolder stubs that contains stubs for Creator and Factory.
- the only preprocessor stuff is in Factory_impl.hpp.
- FactoryTypeList.hpp is necessary as long as no variadic template argument
lists are possible.
- library version is 2:0:0, API version is 1.0.2.
|
-
Property mode
set to
100644
|
|
File size:
556 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * FactoryStub.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Jan 4, 2011
|
|---|
| 5 | Author: heber
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef FACTORYSTUB_HPP_
|
|---|
| 9 | #define FACTORYSTUB_HPP_
|
|---|
| 10 |
|
|---|
| 11 | #include "CreatorStub.hpp"
|
|---|
| 12 |
|
|---|
| 13 | // has to be appear BEFORE Factory.hpp is included!
|
|---|
| 14 | #include "FactoryStub.def"
|
|---|
| 15 | #include "FactoryTypeList.hpp"
|
|---|
| 16 | #include "Factory.hpp"
|
|---|
| 17 |
|
|---|
| 18 | #include "Singleton.hpp"
|
|---|
| 19 |
|
|---|
| 20 | class FactoryStub :
|
|---|
| 21 | public Singleton<FactoryStub>,
|
|---|
| 22 | public Factory<ICreatorStub>
|
|---|
| 23 | {
|
|---|
| 24 | friend class Singleton<FactoryStub>;
|
|---|
| 25 | protected:
|
|---|
| 26 | FactoryStub();
|
|---|
| 27 | virtual ~FactoryStub();
|
|---|
| 28 | };
|
|---|
| 29 | #include "FactoryStub.undef"
|
|---|
| 30 |
|
|---|
| 31 | #endif /* FACTORYSTUB_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.