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

This class is a facory able to construct Record base classes given the id of the record wanted. More...

#include <AlosPalsarRecordFactory.h>

Inheritance diagram for ossimplugins::AlosPalsarRecordFactory:
ossimplugins::AlosPalsarLeaderFactory

Public Member Functions

 AlosPalsarRecordFactory ()
 Constructor. More...
 
 ~AlosPalsarRecordFactory ()
 Destructor. More...
 
void RegisterRecord (int id, AlosPalsarRecord *record)
 Add a new Record type available in this factory. More...
 
AlosPalsarRecordInstanciate (int id)
 Instanciate a new Record. More...
 

Protected Attributes

std::map< int, AlosPalsarRecord * > _availableRecords
 Contain all the available Records for the factory. More...
 

Detailed Description

This class is a facory able to construct Record base classes given the id of the record wanted.

Definition at line 28 of file AlosPalsarRecordFactory.h.

Constructor & Destructor Documentation

◆ AlosPalsarRecordFactory()

ossimplugins::AlosPalsarRecordFactory::AlosPalsarRecordFactory ( )

Constructor.

Definition at line 22 of file AlosPalsarRecordFactory.cpp.

23 {
24 }

◆ ~AlosPalsarRecordFactory()

ossimplugins::AlosPalsarRecordFactory::~AlosPalsarRecordFactory ( )

Destructor.

Definition at line 26 of file AlosPalsarRecordFactory.cpp.

27 {
28 }

Member Function Documentation

◆ Instanciate()

AlosPalsarRecord * ossimplugins::AlosPalsarRecordFactory::Instanciate ( int  id)

Instanciate a new Record.

Parameters
idId of the Record we want to instanciate

Definition at line 30 of file AlosPalsarRecordFactory.cpp.

References _availableRecords, ossimplugins::AlosPalsarRecord::Instanciate(), ossimNotify(), and ossimNotifyLevel_DEBUG.

Referenced by ossimplugins::operator>>().

31 {
32  if (traceDebug())
33  {
34  ossimNotify(ossimNotifyLevel_DEBUG) << "Intanciate AlosPalsar record:" << id << "\n";
35  }
36  AlosPalsarRecord* record = _availableRecords[id];
37  if (record == NULL)
38  {
39  return NULL;
40  }
41  else
42  {
43  return record->Instanciate();
44  }
45 }
std::map< int, AlosPalsarRecord * > _availableRecords
Contain all the available Records for the factory.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ RegisterRecord()

void ossimplugins::AlosPalsarRecordFactory::RegisterRecord ( int  id,
AlosPalsarRecord record 
)

Add a new Record type available in this factory.

Parameters
recordRecord to add in the factory
idId of the new avalaible Record

Definition at line 47 of file AlosPalsarRecordFactory.cpp.

References _availableRecords.

Referenced by ossimplugins::AlosPalsarLeaderFactory::AlosPalsarLeaderFactory().

48 {
49  _availableRecords[id] = record;
50 }
std::map< int, AlosPalsarRecord * > _availableRecords
Contain all the available Records for the factory.

Member Data Documentation

◆ _availableRecords

std::map<int, AlosPalsarRecord*> ossimplugins::AlosPalsarRecordFactory::_availableRecords
protected

Contain all the available Records for the factory.

Definition at line 57 of file AlosPalsarRecordFactory.h.

Referenced by Instanciate(), and RegisterRecord().


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