Rev | Line | |
---|
[903] | 1 | //
|
---|
| 2 | // C++ Interface: Factory
|
---|
| 3 | //
|
---|
| 4 | // Description:
|
---|
| 5 | //
|
---|
| 6 | //
|
---|
| 7 | // Author: Malte Marquarding <Malte.Marquarding@csiro.au>, (C) 2006
|
---|
| 8 | //
|
---|
| 9 | // Copyright: See COPYING file that comes with this distribution
|
---|
| 10 | //
|
---|
| 11 | //
|
---|
| 12 | #ifndef ASAPFACTORY_H
|
---|
| 13 | #define ASAPFACTORY_H
|
---|
| 14 |
|
---|
| 15 | #include "FactoryBase.h"
|
---|
| 16 |
|
---|
| 17 | namespace asap
|
---|
| 18 | {
|
---|
| 19 |
|
---|
| 20 | /**
|
---|
| 21 | A templated factory pattern
|
---|
| 22 |
|
---|
| 23 | @author Malte Marquarding
|
---|
| 24 | @date $Date:$
|
---|
| 25 |
|
---|
| 26 | */
|
---|
| 27 |
|
---|
| 28 | template <class BT,class DT>
|
---|
| 29 | class Factory : public FactoryBase<BT> {
|
---|
| 30 | public:
|
---|
| 31 | Factory() {}
|
---|
| 32 | virtual ~Factory() {}
|
---|
| 33 | virtual BT* create() { return new DT;}
|
---|
| 34 | };
|
---|
| 35 |
|
---|
| 36 | } //namespace
|
---|
| 37 |
|
---|
| 38 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.