GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ls-mat5.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2003-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_ls_mat5_h)
27 #define octave_ls_mat5_h 1
28 
29 #include "octave-config.h"
30 
31 #include <iosfwd>
32 #include <string>
33 
34 class octave_value;
35 
37 {
38  miINT8 = 1, // 8 bit signed
39  miUINT8, // 8 bit unsigned
40  miINT16, // 16 bit signed
41  miUINT16, // 16 bit unsigned
42  miINT32, // 32 bit signed
43  miUINT32, // 32 bit unsigned
44  miSINGLE, // IEEE 754 single precision float
46  miDOUBLE, // IEEE 754 double precision float
49  miINT64, // 64 bit signed
50  miUINT64, // 64 bit unsigned
51  miMATRIX, // MATLAB array
52  miCOMPRESSED, // Compressed data
53  miUTF8, // Unicode UTF-8 Encoded Character Data
54  miUTF16, // Unicode UTF-16 Encoded Character Data
55  miUTF32 // Unicode UTF-32 Encoded Character Data
56 };
57 
58 extern OCTINTERP_API int
59 read_mat5_binary_file_header (std::istream& is, bool& swap,
60  bool quiet = false,
61  const std::string& filename = "");
62 extern OCTINTERP_API std::string
63 read_mat5_binary_element (std::istream& is, const std::string& filename,
64  bool swap, bool& global, octave_value& tc);
65 extern OCTINTERP_API bool
66 save_mat5_binary_element (std::ostream& os,
67  const octave_value& tc, const std::string& name,
68  bool mark_global, bool mat7_format,
69  bool save_as_floats, bool compressing = false);
70 
71 #endif
int read_mat5_binary_file_header(std::istream &is, bool &swap, bool quiet=false, const std::string &filename="")
Definition: ls-mat5.cc:1533
mat5_data_type
Definition: ls-mat5.h:37
@ miUTF16
Definition: ls-mat5.h:54
@ miINT64
Definition: ls-mat5.h:49
@ miDOUBLE
Definition: ls-mat5.h:46
@ miINT16
Definition: ls-mat5.h:40
@ miINT32
Definition: ls-mat5.h:42
@ miUINT16
Definition: ls-mat5.h:41
@ miMATRIX
Definition: ls-mat5.h:51
@ miINT8
Definition: ls-mat5.h:38
@ miUTF8
Definition: ls-mat5.h:53
@ miUINT32
Definition: ls-mat5.h:43
@ miRESERVE1
Definition: ls-mat5.h:45
@ miRESERVE2
Definition: ls-mat5.h:47
@ miUINT64
Definition: ls-mat5.h:50
@ miUTF32
Definition: ls-mat5.h:55
@ miRESERVE3
Definition: ls-mat5.h:48
@ miUINT8
Definition: ls-mat5.h:39
@ miSINGLE
Definition: ls-mat5.h:44
@ miCOMPRESSED
Definition: ls-mat5.h:52
bool save_mat5_binary_element(std::ostream &os, const octave_value &tc, const std::string &name, bool mark_global, bool mat7_format, bool save_as_floats, bool compressing=false)
Definition: ls-mat5.cc:2321
std::string read_mat5_binary_element(std::istream &is, const std::string &filename, bool swap, bool &global, octave_value &tc)
Definition: ls-mat5.cc:479