GNU Octave
4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mach-info.h
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 1996-2018 John W. Eaton
4
5
This file is part of Octave.
6
7
Octave is free software: you can redistribute it and/or modify it
8
under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
Octave is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with Octave; see the file COPYING. If not, see
19
<https://www.gnu.org/licenses/>.
20
21
*/
22
23
#if ! defined (octave_mach_info_h)
24
#define octave_mach_info_h 1
25
26
#include "octave-config.h"
27
28
#include <string>
29
30
namespace
octave
31
{
32
namespace
mach_info
33
{
34
enum
float_format
35
{
36
// If these values change, you must also change the values
37
// returned by octave_get_float_format.
38
39
flt_fmt_unknown
= 0,
40
flt_fmt_ieee_little_endian
= 1,
41
flt_fmt_ieee_big_endian
= 2,
42
};
43
44
float_format
native_float_format
(
void
);
45
46
bool
words_big_endian
(
void
);
47
48
bool
words_little_endian
(
void
);
49
50
float_format
string_to_float_format
(
const
std::string
&);
51
52
std::string
float_format_as_string
(
float_format
);
53
}
54
}
55
56
#if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
57
58
class
oct_mach_info
59
{
60
public
:
61
62
typedef
octave::mach_info::float_format
float_format
;
63
64
OCTAVE_DEPRECATED (4.4,
"use 'octave::mach_info::native_float_format' instead"
)
65
static
float_format
native_float_format
(
void
)
66
{
67
return
octave::mach_info::native_float_format
();
68
}
69
70
OCTAVE_DEPRECATED (4.4,
"use 'octave::mach_info::words_big_endian' instead"
)
71
static
bool
words_big_endian
(
void
)
72
{
73
return
octave::mach_info::words_big_endian
();
74
}
75
76
OCTAVE_DEPRECATED (4.4,
"use 'octave::mach_info::words_little_endian' instead"
)
77
static
bool
words_little_endian
(
void
)
78
{
79
return
octave::mach_info::words_little_endian
();
80
}
81
82
OCTAVE_DEPRECATED (4.4,
"use 'octave::mach_info::string_to_float_format' instead"
)
83
static
float_format
string_to_float_format
(const
std
::
string
&
str
)
84
{
85
return
octave::mach_info::string_to_float_format
(
str
);
86
}
87
88
OCTAVE_DEPRECATED (4.4,
"use 'octave::mach_info::float_format_as_string' instead"
)
89
static
std
::
string
float_format_as_string
(
float_format
ff)
90
{
91
return
octave::mach_info::float_format_as_string
(ff);
92
}
93
};
94
95
#endif
96
97
#endif
octave::mach_info::flt_fmt_ieee_little_endian
Definition:
mach-info.h:40
float_format
Definition:
pr-flt-fmt.h:44
octave
Definition:
aepbalance.cc:44
octave::mach_info::string_to_float_format
float_format string_to_float_format(const std::string &s)
Definition:
mach-info.cc:83
std
STL namespace.
octave::mach_info::flt_fmt_ieee_big_endian
Definition:
mach-info.h:41
octave::mach_info::float_format
float_format
Definition:
mach-info.h:34
octave::mach_info::flt_fmt_unknown
Definition:
mach-info.h:39
octave::mach_info::native_float_format
float_format native_float_format(void)
Definition:
mach-info.cc:62
str
std::string str
Definition:
hash.cc:118
octave::mach_info::words_big_endian
bool words_big_endian(void)
Definition:
mach-info.cc:69
string
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition:
utils.cc:888
octave::mach_info::words_little_endian
bool words_little_endian(void)
Definition:
mach-info.cc:76
octave::mach_info::float_format_as_string
std::string float_format_as_string(float_format flt_fmt)
Definition:
mach-info.cc:102
liboctave
system
mach-info.h
Generated on Sat Sep 1 2018 14:01:46 for GNU Octave by
1.8.14