source: branches/Release2.1/src/Factory.h@ 2607

Last change on this file since 2607 was 903, checked in by mar637, 19 years ago

Factory pattern class

File size: 553 bytes
Line 
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
17namespace asap
18{
19
20/**
21A templated factory pattern
22
23@author Malte Marquarding
24@date $Date:$
25
26*/
27
28template <class BT,class DT>
29class Factory : public FactoryBase<BT> {
30public:
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.