GNU Octave
9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mx-type-traits.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 2020-2024 The Octave Project Developers
4
//
5
// See the file COPYRIGHT.md in the top-level directory of this
6
// distribution or <https://octave.org/copyright/>.
7
//
8
// This file is part of Octave.
9
//
10
// Octave is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Octave is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU General Public License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with Octave; see the file COPYING. If not, see
22
// <https://www.gnu.org/licenses/>.
23
//
24
////////////////////////////////////////////////////////////////////////
25
26
#if ! defined (octave_mx_type_traits_h)
27
#define octave_mx_type_traits_h 1
28
29
#include "octave-config.h"
30
31
#include "
mxtypes.h
"
32
#include "
oct-inttypes-fwd.h
"
33
34
template
<
typename
T>
35
class
36
mx_type_traits
37
{
38
public
:
39
static
const
mxClassID
mx_class
;
40
typedef
T
mx_type
;
41
};
42
43
template
<>
44
class
45
mx_type_traits<bool>
46
{
47
public
:
48
static
const
mxClassID
mx_class =
mxLOGICAL_CLASS
;
49
typedef
mxDouble
mx_type
;
50
};
51
52
template
<>
53
class
54
mx_type_traits<char>
55
{
56
public
:
57
static
const
mxClassID
mx_class =
mxCHAR_CLASS
;
58
typedef
mxChar
mx_type
;
59
};
60
61
template
<>
62
class
63
mx_type_traits<double>
64
{
65
public
:
66
static
const
mxClassID
mx_class =
mxDOUBLE_CLASS
;
67
typedef
mxDouble
mx_type
;
68
};
69
70
template
<>
71
class
72
mx_type_traits<float>
73
{
74
public
:
75
static
const
mxClassID
mx_class =
mxSINGLE_CLASS
;
76
typedef
mxSingle
mx_type
;
77
};
78
79
template
<>
80
class
81
mx_type_traits<octave_int8>
82
{
83
public
:
84
static
const
mxClassID
mx_class =
mxINT8_CLASS
;
85
typedef
mxInt8
mx_type
;
86
};
87
88
template
<>
89
class
90
mx_type_traits<octave_uint8>
91
{
92
public
:
93
static
const
mxClassID
mx_class =
mxUINT8_CLASS
;
94
typedef
mxUint8
mx_type
;
95
};
96
97
template
<>
98
class
99
mx_type_traits<octave_int16>
100
{
101
public
:
102
static
const
mxClassID
mx_class =
mxINT16_CLASS
;
103
typedef
mxInt16
mx_type
;
104
};
105
106
template
<>
107
class
108
mx_type_traits<octave_uint16>
109
{
110
public
:
111
static
const
mxClassID
mx_class =
mxUINT16_CLASS
;
112
typedef
mxUint16
mx_type
;
113
};
114
115
template
<>
116
class
117
mx_type_traits<octave_int32>
118
{
119
public
:
120
static
const
mxClassID
mx_class =
mxINT32_CLASS
;
121
typedef
mxInt32
mx_type
;
122
};
123
124
template
<>
125
class
126
mx_type_traits<octave_uint32>
127
{
128
public
:
129
static
const
mxClassID
mx_class =
mxUINT32_CLASS
;
130
typedef
mxUint32
mx_type
;
131
};
132
133
template
<>
134
class
135
mx_type_traits<octave_int64>
136
{
137
public
:
138
static
const
mxClassID
mx_class =
mxINT64_CLASS
;
139
typedef
mxInt64
mx_type
;
140
};
141
142
template
<>
143
class
144
mx_type_traits<octave_uint64>
145
{
146
public
:
147
static
const
mxClassID
mx_class =
mxUINT64_CLASS
;
148
typedef
mxUint64
mx_type
;
149
};
150
151
#endif
mx_type_traits< bool >
Definition:
mx-type-traits.h:46
mx_type_traits< bool >::mx_type
mxDouble mx_type
Definition:
mx-type-traits.h:49
mx_type_traits< char >
Definition:
mx-type-traits.h:55
mx_type_traits< char >::mx_type
mxChar mx_type
Definition:
mx-type-traits.h:58
mx_type_traits< double >
Definition:
mx-type-traits.h:64
mx_type_traits< double >::mx_type
mxDouble mx_type
Definition:
mx-type-traits.h:67
mx_type_traits< float >
Definition:
mx-type-traits.h:73
mx_type_traits< float >::mx_type
mxSingle mx_type
Definition:
mx-type-traits.h:76
mx_type_traits< octave_int16 >
Definition:
mx-type-traits.h:100
mx_type_traits< octave_int16 >::mx_type
mxInt16 mx_type
Definition:
mx-type-traits.h:103
mx_type_traits< octave_int32 >
Definition:
mx-type-traits.h:118
mx_type_traits< octave_int32 >::mx_type
mxInt32 mx_type
Definition:
mx-type-traits.h:121
mx_type_traits< octave_int64 >
Definition:
mx-type-traits.h:136
mx_type_traits< octave_int64 >::mx_type
mxInt64 mx_type
Definition:
mx-type-traits.h:139
mx_type_traits< octave_int8 >
Definition:
mx-type-traits.h:82
mx_type_traits< octave_int8 >::mx_type
mxInt8 mx_type
Definition:
mx-type-traits.h:85
mx_type_traits< octave_uint16 >
Definition:
mx-type-traits.h:109
mx_type_traits< octave_uint16 >::mx_type
mxUint16 mx_type
Definition:
mx-type-traits.h:112
mx_type_traits< octave_uint32 >
Definition:
mx-type-traits.h:127
mx_type_traits< octave_uint32 >::mx_type
mxUint32 mx_type
Definition:
mx-type-traits.h:130
mx_type_traits< octave_uint64 >
Definition:
mx-type-traits.h:145
mx_type_traits< octave_uint64 >::mx_type
mxUint64 mx_type
Definition:
mx-type-traits.h:148
mx_type_traits< octave_uint8 >
Definition:
mx-type-traits.h:91
mx_type_traits< octave_uint8 >::mx_type
mxUint8 mx_type
Definition:
mx-type-traits.h:94
mx_type_traits
Definition:
mx-type-traits.h:37
mx_type_traits::mx_class
static const mxClassID mx_class
Definition:
mx-type-traits.h:39
mx_type_traits::mx_type
T mx_type
Definition:
mx-type-traits.h:40
mxtypes.h
mxInt16
int16_t mxInt16
Definition:
mxtypes.h:95
mxChar
char mxChar
Definition:
mxtypes.h:87
mxUint64
uint64_t mxUint64
Definition:
mxtypes.h:102
mxInt32
int32_t mxInt32
Definition:
mxtypes.h:96
mxSingle
float mxSingle
Definition:
mxtypes.h:92
mxClassID
mxClassID
Definition:
mxtypes.h:57
mxINT8_CLASS
@ mxINT8_CLASS
Definition:
mxtypes.h:66
mxINT64_CLASS
@ mxINT64_CLASS
Definition:
mxtypes.h:72
mxUINT8_CLASS
@ mxUINT8_CLASS
Definition:
mxtypes.h:67
mxLOGICAL_CLASS
@ mxLOGICAL_CLASS
Definition:
mxtypes.h:61
mxINT32_CLASS
@ mxINT32_CLASS
Definition:
mxtypes.h:70
mxSINGLE_CLASS
@ mxSINGLE_CLASS
Definition:
mxtypes.h:65
mxDOUBLE_CLASS
@ mxDOUBLE_CLASS
Definition:
mxtypes.h:64
mxUINT64_CLASS
@ mxUINT64_CLASS
Definition:
mxtypes.h:73
mxCHAR_CLASS
@ mxCHAR_CLASS
Definition:
mxtypes.h:62
mxUINT16_CLASS
@ mxUINT16_CLASS
Definition:
mxtypes.h:69
mxUINT32_CLASS
@ mxUINT32_CLASS
Definition:
mxtypes.h:71
mxINT16_CLASS
@ mxINT16_CLASS
Definition:
mxtypes.h:68
mxInt64
int64_t mxInt64
Definition:
mxtypes.h:97
mxDouble
double mxDouble
Definition:
mxtypes.h:91
mxUint32
uint32_t mxUint32
Definition:
mxtypes.h:101
mxUint8
uint8_t mxUint8
Definition:
mxtypes.h:99
mxUint16
uint16_t mxUint16
Definition:
mxtypes.h:100
mxInt8
int8_t mxInt8
Definition:
mxtypes.h:94
oct-inttypes-fwd.h
libinterp
corefcn
mx-type-traits.h
Generated on Sun Mar 17 2024 22:36:45 for GNU Octave by
1.9.1