OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | List of all members
ossimplugins::DataFactory Class Reference

This class is a factory able to construct Record base classes. More...

#include <DataFactory.h>

Inheritance diagram for ossimplugins::DataFactory:
ossimplugins::RadarSatRecordFactory

Public Member Functions

 DataFactory ()
 Contstructor. More...
 
 ~DataFactory ()
 Destructor. More...
 
- Public Member Functions inherited from ossimplugins::RadarSatRecordFactory
 RadarSatRecordFactory ()
 Constructor. More...
 
 ~RadarSatRecordFactory ()
 Destructor. More...
 
void RegisterRecord (int id, RadarSatRecord *record)
 Add a new Record type available in this factory. More...
 
RadarSatRecordInstanciate (int id)
 Instanciates a new Record. More...
 

Additional Inherited Members

- Protected Attributes inherited from ossimplugins::RadarSatRecordFactory
std::map< int, RadarSatRecord * > _availableRecords
 Contains all the available Records for the factory. More...
 

Detailed Description

This class is a factory able to construct Record base classes.

Definition at line 25 of file DataFactory.h.

Constructor & Destructor Documentation

◆ DataFactory()

ossimplugins::DataFactory::DataFactory ( )

Contstructor.

Definition at line 20 of file DataFactory.cpp.

References ossimplugins::RadarSatRecordFactory::RegisterRecord().

21 {
22  RegisterRecord(1, new ImageOptionsFileDescriptor());
23  RegisterRecord(2, new ProcessedDataRecord());
24 }
void RegisterRecord(int id, RadarSatRecord *record)
Add a new Record type available in this factory.

◆ ~DataFactory()

ossimplugins::DataFactory::~DataFactory ( )

Destructor.

Definition at line 26 of file DataFactory.cpp.

References ossimplugins::RadarSatRecordFactory::_availableRecords.

27 {
28  std::map<int, RadarSatRecord*>::iterator i = _availableRecords.begin();
29 
30  while (i != _availableRecords.end())
31  {
32  if ( (*i).second )
33  {
34  delete (*i).second;
35  (*i).second = 0;
36  }
37  ++i;
38  }
39  _availableRecords.clear();
40 }
std::map< int, RadarSatRecord * > _availableRecords
Contains all the available Records for the factory.

The documentation for this class was generated from the following files: