OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
RadarSatRecordFactory.cpp
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 
13 
14 namespace ossimplugins
15 {
17 {
18 }
19 
21 {
22 }
23 
25 {
26  RadarSatRecord* record = _availableRecords[id];
27  if(record == NULL)
28  {
29  return NULL;
30  }
31  else
32  {
33  return record->Instanciate();
34  }
35 }
36 
38 {
39  _availableRecords[id] = record;
40 }
41 }
virtual RadarSatRecord * Instanciate()=0
This function is able to create a new instance of the class.
RadarSatRecord * Instanciate(int id)
Instanciates a new Record.
This class is the base class of all the record classes.
std::map< int, RadarSatRecord * > _availableRecords
Contains all the available Records for the factory.
void RegisterRecord(int id, RadarSatRecord *record)
Add a new Record type available in this factory.