A singleton for managing the data type converter available in the system. More...
#include <DataConverterManager.h>
  
 Public Member Functions | |
| void | add (int src, int dst, DataTypeConverter conv) throw (Exception) | 
| It adds a converter to the list of known data type mappings.  More... | |
| void | clear () | 
| Clear the container.  More... | |
| const DataTypeConverter & | get (int src, int dst) throw (Exception) | 
| It returns a data type converter for the given source and destination data types.  More... | |
| const DataTypeConverter & | get (const std::pair< int, int > &typeMap) throw (Exception) | 
| It returns a data type converter for the given source and destination data types.  More... | |
Static Public Member Functions | |
| static DataConverterManager & | getInstance () | 
| It returns a reference to the singleton instance.  More... | |
Protected Member Functions | |
| DataConverterManager () | |
| Constructor.  More... | |
| ~DataConverterManager () | |
| Destructor.  More... | |
Private Attributes | |
| std::map< std::pair< int, int > , DataTypeConverter >  | m_convMap | 
| A map: (source-data-type, target-data-type) -> data type converter.  More... | |
Friends | |
| class | te::common::Singleton< DataConverterManager > | 
A singleton for managing the data type converter available in the system.
Definition at line 51 of file DataConverterManager.h.
      
  | 
  protected | 
Constructor.
Definition at line 58 of file DataConverterManager.cpp.
      
  | 
  protected | 
Destructor.
Definition at line 62 of file DataConverterManager.cpp.
| void te::dt::DataConverterManager::add | ( | int | src, | 
| int | dst, | ||
| DataTypeConverter | conv | ||
| ) | |||
| throw | ( | Exception | |
| ) | |||
It adds a converter to the list of known data type mappings.
| src | The source data type of the converter. | 
| dst | The destination data type of the converter. | 
| conv | The data type converter. | 
| Exception | It throws an exception if a converter for the same source and destination data types already exists. | 
Definition at line 33 of file DataConverterManager.cpp.
References TE_TR.
Referenced by te::dt::Module::initialize().
| void te::dt::DataConverterManager::clear | ( | ) | 
Clear the container.
Definition at line 53 of file DataConverterManager.cpp.
References m_convMap.
Referenced by te::dt::Module::finalize().
      
  | 
  inline | ||||||||||||||||||||
It returns a data type converter for the given source and destination data types.
| src | The source data type of the converter. | 
| dst | The destination data type of the converter. | 
| Exception | It throws an exception if none is found. | 
Definition at line 107 of file DataConverterManager.h.
| const te::dt::DataTypeConverter & te::dt::DataConverterManager::get | ( | const std::pair< int, int > & | typeMap | ) | |
| throw | ( | Exception | |||
| ) | |||||
It returns a data type converter for the given source and destination data types.
| typeMap | The type of converter: source-data-type -> destination-data-type. | 
| Exception | It throws an exception if none is found. | 
Definition at line 44 of file DataConverterManager.cpp.
References TE_TR.
      
  | 
  staticinherited | 
It returns a reference to the singleton instance.
Referenced by te::dt::Module::finalize(), te::da::GenericAttributeConverter(), te::gm::Module::initialize(), and te::dt::Module::initialize().
      
  | 
  friend | 
Definition at line 53 of file DataConverterManager.h.
      
  | 
  private | 
A map: (source-data-type, target-data-type) -> data type converter.
Definition at line 104 of file DataConverterManager.h.
Referenced by clear().