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  {
35  {
36  // If these values change, you must also change the values
37  // returned by octave_get_float_format.
38 
42  };
43 
45 
46  bool words_big_endian (void);
47 
48  bool words_little_endian (void);
49 
51 
53  }
54 }
55 
56 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
57 
58 class oct_mach_info
59 {
60 public:
61 
63 
64  OCTAVE_DEPRECATED (4.4, "use 'octave::mach_info::native_float_format' instead")
65  static float_format native_float_format (void)
66  {
68  }
69 
70  OCTAVE_DEPRECATED (4.4, "use 'octave::mach_info::words_big_endian' instead")
71  static bool words_big_endian (void)
72  {
74  }
75 
76  OCTAVE_DEPRECATED (4.4, "use 'octave::mach_info::words_little_endian' instead")
77  static bool words_little_endian (void)
78  {
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  {
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  {
92  }
93 };
94 
95 #endif
96 
97 #endif
float_format string_to_float_format(const std::string &s)
Definition: mach-info.cc:83
STL namespace.
float_format native_float_format(void)
Definition: mach-info.cc:62
std::string str
Definition: hash.cc:118
bool words_big_endian(void)
Definition: mach-info.cc:69
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
bool words_little_endian(void)
Definition: mach-info.cc:76
std::string float_format_as_string(float_format flt_fmt)
Definition: mach-info.cc:102