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
46template<typename T>
47inline MLint32 MLIsSignedTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInSignedType; }
49
53template<typename T>
54inline MLDataType MLGetDataTypeFromPtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::dataType; }
56
59template<typename T>
60inline size_t MLGetDataTypeSizeFromPtr(const T*) { return sizeof(T); }
62
66template<typename T>
67inline MLint32 MLIs8_16_Or_32BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is8_16_32BitInteger?1:0; }
69
72template<typename T>
73inline MLint32 MLIs8BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is8BitInteger?1:0; }
75
78template<typename T>
79inline MLint32 MLIs16BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is16BitInteger?1:0; }
81
84template<typename T>
85inline MLint32 MLIs32BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is32BitInteger?1:0; }
87
90template<typename T>
91inline MLint32 MLIs64BitIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::is64BitInteger?1:0; }
93
96template<typename T>
97inline MLint32 MLIsBuiltInIntegerTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInIntegerType?1:0; }
99
102template<typename T>
103inline MLint32 MLIsBuiltInFloatingPointTypePtr(const T*) { return ML_NAMESPACE::TypeTraits<T>::isBuiltInFloatType?1:0; }
105
106
107#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