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
38template<typename T>
39inline MLint32 MLIsScalarTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isStandardType?1:0; }
41
42
45template<typename T>
46inline MLint32 MLIsSignedTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInSignedType; }
48
51template<typename T>
52inline MLDataType MLGetDataTypeFromPtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::dataType; }
54
57template<typename T>
58inline size_t MLGetDataTypeSizeFromPtr(const T*) { return sizeof(T); }
60
63template<typename T>
64inline MLint32 MLIs8_16_Or_32BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is8_16_32BitInteger?1:0; }
66
69template<typename T>
70inline MLint32 MLIs8BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is8BitInteger?1:0; }
72
75template<typename T>
76inline MLint32 MLIs16BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is16BitInteger?1:0; }
78
81template<typename T>
82inline MLint32 MLIs32BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is32BitInteger?1:0; }
84
87template<typename T>
88inline MLint32 MLIs64BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is64BitInteger?1:0; }
90
93template<typename T>
94inline MLint32 MLIsBuiltInIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInIntegerType?1:0; }
96
99template<typename T>
100inline MLint32 MLIsBuiltInFloatingPointTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInFloatType?1:0; }
102
103
104#endif
@ T
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