ot::Translator Class Reference
[Core Classes]

#include <Translator.h>

List of all members.


Detailed Description

The Translator class translates compiler dependent type names provided by the RunTime Type Information (RTTI) system to generic type names. This class provides an interface to register combinations of generic type names and RTTI type information and for later translation. Generic type names are arbitrary but must be unique.
Author:
Jochen von Spiczak


Public Member Functions

void registerTypeName (const std::string &genericName, const std::type_info &typeInfo)
const std::string getGenericName (const std::string &rttiName) const throw (std::runtime_error)
bool knowsType (const std::string genericName) const

Protected Attributes

TranslationMap translationTable


Member Function Documentation

const std::string ot::Translator::getGenericName const std::string &  rttiName  )  const throw (std::runtime_error)
 

Translates rttiName to the according generic type name. Throws an exception if the type is not known by the system.

Parameters:
rttiName the RTTI name to be translated
Returns:
the according generic type name

bool ot::Translator::knowsType const std::string  genericName  )  const
 

Checks whether the generic type name genericName is known by the system.

Parameters:
genericName the generic type name to be checked
Returns:
whether the generic type name is known

void ot::Translator::registerTypeName const std::string &  genericName,
const std::type_info &  typeInfo
 

Registers a combination of a generic type name and the type name provided by the compiler for the RunTime Type Information (RTTI) system. The RTTI name is automatically generated according to the typeInfo parameter.

Parameters:
genericName the generic type name to be registered (must be unique!)
typeInfo RTTI type information of the type to be registered


Member Data Documentation

TranslationMap ot::Translator::translationTable [protected]
 

A map matching compiler dependent type names provided by the RunTime Type Information (RTTI) system to generic type names.


The documentation for this class was generated from the following files:
Generated on Wed Feb 28 15:29:16 2007 for NaviTrack by  doxygen 1.4.6