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

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

#include <ErsSarRecordFactory.h>

Inheritance diagram for ossimplugins::ErsSarRecordFactory:
ossimplugins::ErsSarLeaderFactory

Public Member Functions

 ErsSarRecordFactory ()
 Constructor. More...
 
virtual ~ErsSarRecordFactory ()
 Destructor. More...
 
void RegisterRecord (int id, ErsSarRecord *record)
 Add a new Record type available in this factory. More...
 
ErsSarRecordInstanciate (int id)
 Instanciate a new Record. More...
 

Protected Attributes

std::map< int, ErsSarRecord * > _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 31 of file ErsSarRecordFactory.h.

Constructor & Destructor Documentation

◆ ErsSarRecordFactory()

ossimplugins::ErsSarRecordFactory::ErsSarRecordFactory ( )

Constructor.

Definition at line 17 of file ErsSarRecordFactory.cpp.

18 {
19 }

◆ ~ErsSarRecordFactory()

ossimplugins::ErsSarRecordFactory::~ErsSarRecordFactory ( )
virtual

Destructor.

Definition at line 21 of file ErsSarRecordFactory.cpp.

22 {
23 }

Member Function Documentation

◆ Instanciate()

ErsSarRecord * ossimplugins::ErsSarRecordFactory::Instanciate ( int  id)

Instanciate a new Record.

Parameters
idId of the Record we want to instanciate

Definition at line 25 of file ErsSarRecordFactory.cpp.

References _availableRecords, and ossimplugins::ErsSarRecord::Instanciate().

Referenced by ossimplugins::operator>>().

26 {
27  ErsSarRecord* record = _availableRecords[id];
28  if (record == NULL)
29  {
30  return NULL;
31  }
32  else
33  {
34  return record->Instanciate();
35  }
36 }
std::map< int, ErsSarRecord * > _availableRecords
Contain all the available Records for the factory.

◆ RegisterRecord()

void ossimplugins::ErsSarRecordFactory::RegisterRecord ( int  id,
ErsSarRecord 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 38 of file ErsSarRecordFactory.cpp.

References _availableRecords.

Referenced by ossimplugins::ErsSarLeaderFactory::ErsSarLeaderFactory().

39 {
40  _availableRecords[id] = record;
41 }
std::map< int, ErsSarRecord * > _availableRecords
Contain all the available Records for the factory.

Member Data Documentation

◆ _availableRecords

std::map<int, ErsSarRecord*> ossimplugins::ErsSarRecordFactory::_availableRecords
protected

Contain all the available Records for the factory.

Definition at line 60 of file ErsSarRecordFactory.h.

Referenced by Instanciate(), RegisterRecord(), and ossimplugins::ErsSarLeaderFactory::~ErsSarLeaderFactory().


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