MeVisLab Toolbox Reference
mlTemplateSupport.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_TEMPLATE_SUPPORT_H
14 #define ML_TEMPLATE_SUPPORT_H
15 
32 
33 #include "mlInitSystemML.h"
34 #include "mlTypeTraits.h"
35 
38 template<typename T>
39 inline MLint32 MLIsScalarTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isStandardType?1:0; }
41 
42 
46 template<typename T>
47 inline MLint32 MLIsSignedTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInSignedType; }
49 
53 template<typename T>
54 inline MLDataType MLGetDataTypeFromPtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::dataType; }
56 
59 template<typename T>
60 inline size_t MLGetDataTypeSizeFromPtr(const T*) { return sizeof(T); }
62 
66 template<typename T>
67 inline MLint32 MLIs8_16_Or_32BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is8_16_32BitInteger?1:0; }
69 
72 template<typename T>
73 inline MLint32 MLIs8BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is8BitInteger?1:0; }
75 
78 template<typename T>
79 inline MLint32 MLIs16BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is16BitInteger?1:0; }
81 
84 template<typename T>
85 inline MLint32 MLIs32BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is32BitInteger?1:0; }
87 
90 template<typename T>
91 inline MLint32 MLIs64BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is64BitInteger?1:0; }
93 
96 template<typename T>
99 
102 template<typename T>
103 inline MLint32 MLIsBuiltInFloatingPointTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInFloatType?1:0; }
105 
106 
107 #endif
@ T
Definition: SoKeyGrabber.h:71
MLint32 MLDataType
MLDataType.
Definition: mlTypeDefs.h:596
MLint32 MLIsSignedTypePtr(const T *)
MLint32 MLIs8BitIntegerTypePtr(const T *)
MLint32 MLIsBuiltInFloatingPointTypePtr(const T *)
MLDataType MLGetDataTypeFromPtr(const T *)
MLint32 MLIs8_16_Or_32BitIntegerTypePtr(const T *)
MLint32 MLIs32BitIntegerTypePtr(const T *)
MLint32 MLIsBuiltInIntegerTypePtr(const T *)
MLint32 MLIs16BitIntegerTypePtr(const T *)
size_t MLGetDataTypeSizeFromPtr(const T *)
MLint32 MLIsScalarTypePtr(const T *)
MLint32 MLIs64BitIntegerTypePtr(const T *)
signed int MLint32
Definition: mlTypeDefs.h:161
SwitchType< ml::TypeTraits< T >::isBuiltInIntegerType > isBuiltInIntegerType()
Definition: mlTypeTraits.h:346