Type traits relating interfaces, corresponding primitive types, and their type names. More...
#include <type_traits.h>
Type traits relating interfaces, corresponding primitive types, and their type names.
These type traits are defined for two types of template arguments, interfaces and primitive types.
If the template parameter is an interface derived from mi::IData:
get_type_name()
returns the type name corresponding to the template parameter, e.g., "Sint32"
for the template parameter mi::ISint32.Primitive_type
is defined to the corresponding primitive type, e.g., mi::Sint32 for the template parameter mi::ISint32.Note the following special case for the mapping between primitive types:
const
char*
.Example:
If the template parameter is a primitive type:
get_type_name()
returns the type name corresponding to the template parameter, e.g., "Sint32"
for the template parameter mi::Sint32.Interface_type
is defined to the corresponding interface type, e.g., mi::ISint32 for the template parameter mi::Sint32.Since the set of primitive types is smaller than the set of interfaces the following interfaces do not appear as typedef Interface_type:
mi::IColor3, mi::IRef, mi::ISize, and mi::IDifference (plus all interfaces which are not supported as template parameter, see above). In particular, a string value does not provide enough to context to decide whether it represents just a string (mi::IString) or references a DB element (mi::IRef).
Example:
const
char*
is the only primitive type that does not have value semantics, but pointer semantics.