GNU Octave
10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Loading...
Searching...
No Matches
mx-type-traits.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 2020-2025 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 <string>
32
33
#include "mxtypes.h"
34
#include "
oct-inttypes-fwd.h
"
35
36
template
<
typename
T>
37
class
mx_type_traits
38
{
39
public
:
40
static
const
mxClassID
mx_class
;
41
typedef
T
mx_type
;
42
};
43
44
template
<>
45
class
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
mx_type_traits
<char>
54
{
55
public
:
56
static
const
mxClassID
mx_class
= mxCHAR_CLASS;
57
typedef
mxChar
mx_type
;
58
};
59
60
template
<>
61
class
mx_type_traits
<
double
>
62
{
63
public
:
64
static
const
mxClassID
mx_class
= mxDOUBLE_CLASS;
65
typedef
mxDouble
mx_type
;
66
};
67
68
template
<>
69
class
mx_type_traits
<
float
>
70
{
71
public
:
72
static
const
mxClassID
mx_class
= mxSINGLE_CLASS;
73
typedef
mxSingle
mx_type
;
74
};
75
76
template
<>
77
class
mx_type_traits
<
octave_int8
>
78
{
79
public
:
80
static
const
mxClassID
mx_class
= mxINT8_CLASS;
81
typedef
mxInt8
mx_type
;
82
};
83
84
template
<>
85
class
mx_type_traits
<
octave_uint8
>
86
{
87
public
:
88
static
const
mxClassID
mx_class
= mxUINT8_CLASS;
89
typedef
mxUint8
mx_type
;
90
};
91
92
template
<>
93
class
mx_type_traits
<
octave_int16
>
94
{
95
public
:
96
static
const
mxClassID
mx_class
= mxINT16_CLASS;
97
typedef
mxInt16
mx_type
;
98
};
99
100
template
<>
101
class
mx_type_traits
<
octave_uint16
>
102
{
103
public
:
104
static
const
mxClassID
mx_class
= mxUINT16_CLASS;
105
typedef
mxUint16
mx_type
;
106
};
107
108
template
<>
109
class
mx_type_traits
<
octave_int32
>
110
{
111
public
:
112
static
const
mxClassID
mx_class
= mxINT32_CLASS;
113
typedef
mxInt32
mx_type
;
114
};
115
116
template
<>
117
class
mx_type_traits
<
octave_uint32
>
118
{
119
public
:
120
static
const
mxClassID
mx_class
= mxUINT32_CLASS;
121
typedef
mxUint32
mx_type
;
122
};
123
124
template
<>
125
class
mx_type_traits
<
octave_int64
>
126
{
127
public
:
128
static
const
mxClassID
mx_class
= mxINT64_CLASS;
129
typedef
mxInt64
mx_type
;
130
};
131
132
template
<>
133
class
mx_type_traits
<
octave_uint64
>
134
{
135
public
:
136
static
const
mxClassID
mx_class
= mxUINT64_CLASS;
137
typedef
mxUint64
mx_type
;
138
};
139
140
#endif
bool
double
float
mx_type_traits< bool >::mx_type
mxDouble mx_type
Definition
mx-type-traits.h:49
mx_type_traits< char >::mx_type
mxChar mx_type
Definition
mx-type-traits.h:57
mx_type_traits< double >::mx_type
mxDouble mx_type
Definition
mx-type-traits.h:65
mx_type_traits< float >::mx_type
mxSingle mx_type
Definition
mx-type-traits.h:73
mx_type_traits< octave_int16 >::mx_type
mxInt16 mx_type
Definition
mx-type-traits.h:97
mx_type_traits< octave_int32 >::mx_type
mxInt32 mx_type
Definition
mx-type-traits.h:113
mx_type_traits< octave_int64 >::mx_type
mxInt64 mx_type
Definition
mx-type-traits.h:129
mx_type_traits< octave_int8 >::mx_type
mxInt8 mx_type
Definition
mx-type-traits.h:81
mx_type_traits< octave_uint16 >::mx_type
mxUint16 mx_type
Definition
mx-type-traits.h:105
mx_type_traits< octave_uint32 >::mx_type
mxUint32 mx_type
Definition
mx-type-traits.h:121
mx_type_traits< octave_uint64 >::mx_type
mxUint64 mx_type
Definition
mx-type-traits.h:137
mx_type_traits< octave_uint8 >::mx_type
mxUint8 mx_type
Definition
mx-type-traits.h:89
mx_type_traits
Definition
mx-type-traits.h:38
mx_type_traits::mx_class
static const mxClassID mx_class
Definition
mx-type-traits.h:40
mx_type_traits::mx_type
T mx_type
Definition
mx-type-traits.h:41
octave_int
Definition
oct-inttypes.h:783
oct-inttypes-fwd.h
libinterp
corefcn
mx-type-traits.h
Generated on Sat Aug 2 2025 06:52:10 for GNU Octave by
1.9.8