TypeConverter Namespace Reference

This namespace is a common place to put type to string conversions. More...


Functions

template<typename T>
const char * toString ()
template<typename T>
const char * toString (const T *)


Detailed Description

This namespace is a common place to put type to string conversions.

To use, simply do the following:

 TypeConverter::toString<int>(); // returns "int"
 DataElement *pElement;
 TypeConverter::toString(pElement); // returns "DataElement"
 TypeConverter::toString<std::vector<int> >(); // returns "vector<int>"
 TypeConverter::toString<std::vector<DataElement*> >(); // return "vector<DataElement>"

Function Documentation

template<typename T>
const char* TypeConverter::toString ( const T *   ) 

This function is exactly like the one above it, but may be more convenient where there is already an instance of the type desired.

Returns:
A string containing the type name.

Definition at line 48 of file TypeConverter.h.

template<typename T>
const char* TypeConverter::toString (  ) 

Generic form of type conversion.

This function is explicitly specialized to return type names for those listed in Supported TypeConverter Types

Returns:
A string containing the type name.


Software Development Kit - Opticks 4.8.0 Build 15482