OEGetDataType¶
template<class T>
const void *OEGetDataType()
template<class T>
const void *OEGetDataType(T &)
template<>
const void *OEGetDataType<unsigned int>()
These template functions provide a convenient and efficient
mechanism for run-time type identification (RTTI). A unique
const void pointer is returned for each requested data
type. Template classes which derive from a base class which has
a data type identification interface can then be resolved by
comparisons to data types returned by the OEGetDataType
template
function. Type comparisons are valid across compile
units. Run-time type identification using this function is
likely to be more efficient than built-in C++ RTTI.