OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ErsSarRecordFactory.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // "Copyright Centre National d'Etudes Spatiales"
4 //
5 // License: LGPL
6 //
7 // See LICENSE.txt file in the top level directory for more details.
8 //
9 //----------------------------------------------------------------------------
10 // $Id$
11 
12 #ifndef ErsSarRecordFactory_h
13 #define ErsSarRecordFactory_h
14 
15 
17 #include "erssar/ErsSarRecord.h"
18 
19 #include <map>
20 
21 
22 namespace ossimplugins
23 {
24 
25 
32 {
33 public:
41  virtual ~ErsSarRecordFactory();
42 
48  void RegisterRecord(int id, ErsSarRecord * record);
49 
54  ErsSarRecord* Instanciate(int id) ;
55 protected:
56 
60  std::map<int, ErsSarRecord*> _availableRecords;
61 
62 private:
63 };
64 }
65 
66 #endif
This class is a facory able to construct Record base classes given the id of the record wanted...
void RegisterRecord(int id, ErsSarRecord *record)
Add a new Record type available in this factory.
virtual ~ErsSarRecordFactory()
Destructor.
ErsSarRecord * Instanciate(int id)
Instanciate a new Record.
This class is the base class of all the record classes.
Definition: ErsSarRecord.h:27
std::map< int, ErsSarRecord * > _availableRecords
Contain all the available Records for the factory.