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 
45 template<typename T>
46 inline MLint32 MLIsSignedTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInSignedType; }
48 
51 template<typename T>
52 inline MLDataType MLGetDataTypeFromPtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::dataType; }
54 
57 template<typename T>
58 inline size_t MLGetDataTypeSizeFromPtr(const T*) { return sizeof(T); }
60 
63 template<typename T>
64 inline MLint32 MLIs8_16_Or_32BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is8_16_32BitInteger?1:0; }
66 
69 template<typename T>
70 inline MLint32 MLIs8BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is8BitInteger?1:0; }
72 
75 template<typename T>
76 inline MLint32 MLIs16BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is16BitInteger?1:0; }
78 
81 template<typename T>
82 inline MLint32 MLIs32BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is32BitInteger?1:0; }
84 
87 template<typename T>
88 inline MLint32 MLIs64BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is64BitInteger?1:0; }
90 
93 template<typename T>
96 
99 template<typename T>
100 inline MLint32 MLIsBuiltInFloatingPointTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInFloatType?1:0; }
102 
103 
104 #if ML_DEPRECATED_SINCE(3,5,0)
105 
106 template<typename T>
107 inline MLint32 MLIsStandardTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isStandardType?1:0; }
108 
109 #if defined(WIN32) && !defined(ML_NO_DEPRECATED_WARNINGS)
110 #pragma deprecated("MLIsStandardTypePtr")
111 #endif
112 
113 #endif
114 
115 
116 #endif
@ T
Definition: SoKeyGrabber.h:71
MLint32 MLDataType
MLDataType.
Definition: mlTypeDefs.h:684
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:167
SwitchType< ml::TypeTraits< T >::isBuiltInIntegerType > isBuiltInIntegerType()
Definition: mlTypeTraits.h:346