Debian Codegraph @

sys/oo_READ_BINARY.h

raw symbols SCIP
1 /* oo_READ_BINARY.h
2 *
3 * Copyright (C) 1994-2009,2011-2020,2022,2024,2026 Paul Boersma
4 *
5 * This code is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This code is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this work. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "oo_undef.h"cxx . . $ `<file>/sys/oo_undef.h`/
20
21 #define oo_SIMPLEcxx . . $ `sys/oo_READ_BINARY.h:21:9`!(type, storage, x) \
22 ourcxx . . $ `melder/melder.h:42:9`! x = binget##storage (_filePointer_);
23
24 #define oo_SETcxx . . $ `sys/oo_READ_BINARY.h:24:9`!(type, storage, x, setType) \
25 for (int _i = 0; _i <= (int) setType::MAX; _i ++) { \
26 our x [_i] = binget##storage (_filePointer_); \
27 }
28
29 #define oo_ANYVECcxx . . $ `sys/oo_READ_BINARY.h:29:9`!(type, storage, x, sizeExpression) \
30 { \
31 const integer _size = (sizeExpression); \
32 our x = vector_readBinary_##storage (_size, _filePointer_); \
33 }
34
35 #define oo_ANYMATcxx . . $ `sys/oo_READ_BINARY.h:35:9`!(type, storage, x, nrowExpression, ncolExpression) \
36 { \
37 const integer _nrow = (nrowExpression), _ncol = (ncolExpression); \
38 our x = matrix_readBinary_##storage (_nrow, _ncol, _filePointer_); \
39 }
40
41 #define oo_ANYTEN3cxx . . $ `sys/oo_READ_BINARY.h:41:9`!(type, storage, x, ndim1Expression, ndim2Expression, ndim3Expression) \
42 { \
43 const integer _ndim1 = (ndim1Expression), _ndim2 = (ndim2Expression), _ndim3 = (ndim3Expression); \
44 our x = tensor3_readBinary_##storage (_ndim1, _ndim2, _ndim3, _filePointer_); \
45 }
46
47 #define oo_ENUMxcxx . . $ `sys/oo_READ_BINARY.h:47:9`!(kType, storage, x) \
48 our x = (kType) binget##storage (_filePointer_, (int) kType::MIN, (int) kType::MAX, U"" #kType);
49
50 #define oo_STRINGxcxx . . $ `sys/oo_READ_BINARY.h:50:9`!(storage, x) \
51 ourcxx . . $ `melder/melder.h:42:9`! x = binget##storage (_filePointer_);
52
53 #define oo_STRINGx_SETcxx . . $ `sys/oo_READ_BINARY.h:53:9`!(storage, x, setType) \
54 for (int _i = 0; _i <= setType::MAX; _i ++) { \
55 our x [_i] = binget##storage (_filePointer_); \
56 }
57
58 #define oo_STRINGx_VECTORcxx . . $ `sys/oo_READ_BINARY.h:58:9`!(storage, x, sizeExpression) \
59 { \
60 const integer _size = (sizeExpression); \
61 if (_size > 0) { \
62 our x = autoSTRVEC (_size); \
63 for (integer _i = 1; _i <= _size; _i ++) { \
64 our x [_i] = binget##storage (_filePointer_); \
65 } \
66 } \
67 }
68
69 #define oo_STRUCTcxx . . $ `sys/oo_READ_BINARY.h:69:9`!(Type,x) \
70 our x. readBinary (_filePointer_, _formatVersion_);
71
72 #define oo_STRUCT_SETcxx . . $ `sys/oo_READ_BINARY.h:72:9`!(Type, x, setType) \
73 for (int _i = 0; _i <= (int) setType::MAX; _i ++) { \
74 our x [_i]. readBinary (_filePointer_, _formatVersion_); \
75 }
76
77 #define oo_STRUCTVECcxx . . $ `sys/oo_READ_BINARY.h:77:9`!(Type, x, sizeExpression) \
78 { \
79 const integer _size = (sizeExpression); \
80 if (_size > 0) { \
81 our x = newvectorzero <struct##Type> (_size); \
82 for (integer _i = 1; _i <= _size; _i ++) { \
83 our x [_i]. readBinary (_filePointer_, _formatVersion_); \
84 } \
85 } \
86 }
87
88 #define oo_STRUCTMATcxx . . $ `sys/oo_READ_BINARY.h:88:9`!(Type, x, nrowExpression, ncolExpression) \
89 { \
90 const integer _nrow = (nrowExpression), _ncol = (ncolExpression); \
91 if (_nrow > 0 && _ncol > 0) { \
92 our x = newmatrixzero <struct##Type> (_nrow, _ncol); \
93 for (integer _irow = 1; _irow <= _nrow; _irow ++) { \
94 for (integer _icol = 1; _icol <= _ncol; _icol ++) { \
95 our x [_irow] [_icol]. readBinary (_filePointer_, _formatVersion_); \
96 } \
97 } \
98 } \
99 }
100
101 #define oo_OBJECTcxx . . $ `sys/oo_READ_BINARY.h:101:9`!(Class, formatVersion, x) \
102 { \
103 const int _formatVersion = (formatVersion); \
104 if (bingetex (_filePointer_)) { \
105 our x = Thing_new (Class); \
106 our x -> v1_readBinary (_filePointer_, _formatVersion); \
107 } \
108 }
109
110 #define oo_COLLECTION_OFcxx . . $ `sys/oo_READ_BINARY.h:110:9`!(Class, x, ItemClass, formatVersion) \
111 { \
112 const int _formatVersion = (formatVersion); \
113 const integer _n = bingetinteger32BE (_filePointer_); \
114 for (integer _i = 1; _i <= _n; _i ++) { \
115 auto##ItemClass _item = Thing_new (ItemClass); \
116 _item -> v1_readBinary (_filePointer_, _formatVersion); \
117 our x. addItem_move (_item.move()); \
118 } \
119 }
120
121 #define oo_COLLECTIONcxx . . $ `sys/oo_READ_BINARY.h:121:9`!(Class, x, ItemClass, formatVersion) \
122 { \
123 const int _formatVersion = (formatVersion); \
124 const integer _n = bingetinteger32BE (_filePointer_); \
125 our x = Class##_create (); \
126 for (integer _i = 1; _i <= _n; _i ++) { \
127 auto##ItemClass _item = Thing_new (ItemClass); \
128 _item -> v1_readBinary (_filePointer_, _formatVersion); \
129 our x -> addItem_move (_item.move()); \
130 } \
131 }
132
133 #define oo_TRANSIENT_FILEcxx . . $ `sys/oo_READ_BINARY.h:133:9`!(x)
134
135 #define oo_TRANSIENT_FOLDERcxx . . $ `sys/oo_READ_BINARY.h:135:9`!(x)
136
137 #define oo_UNSAFE_BORROWED_TRANSIENT_CONST_OBJECT_REFERENCEcxx . . $ `sys/oo_READ_BINARY.h:137:9`!(Class, x)
138
139 #define oo_UNSAFE_BORROWED_TRANSIENT_MUTABLE_OBJECT_REFERENCEcxx . . $ `sys/oo_READ_BINARY.h:139:9`!(Class, x)
140
141 #define oo_DEFINE_STRUCTcxx . . $ `sys/oo_READ_BINARY.h:141:9`!(Type) \
142 void struct##Type :: readBinary (FILE *_filePointer_, int _formatVersion_) { \
143 (void) _formatVersion_;
144
145 #define oo_END_STRUCTcxx . . $ `sys/oo_READ_BINARY.h:145:9`!(Type) \
146 }
147
148 #define oo_DEFINE_CLASScxx . . $ `sys/oo_READ_BINARY.h:148:9`!(Class, Parent) \
149 void struct##Class :: v1_readBinary (FILE *_filePointer_, int _formatVersion_) { \
150 Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (_formatVersion_ <= ourcxx . . $ `melder/melder.h:42:9`! classInfo -> version, \
151 U"The format of this file is too new. Download a newer version of Praat."); \
152 Class##_Parent :: v1_readBinary (_filePointer_, _formatVersion_);
153
154 #define oo_END_CLASScxx . . $ `sys/oo_READ_BINARY.h:154:9`!(Class) \
155 }
156
157 #define oo_FROMcxx . . $ `sys/oo_READ_BINARY.h:157:9`!(from) \
158 { \
159 const int _from = (from); \
160 if (_formatVersion_ >= _from) {
161
162 #define oo_ENDFROMcxx . . $ `sys/oo_READ_BINARY.h:162:9`! \
163 } \
164 }
165
166 #define oo_DECLARINGcxx . . $ `sys/oo_READ_BINARY.h:166:9`! 0
167 #define oo_DESTROYINGcxx . . $ `sys/oo_READ_BINARY.h:167:9`! 0
168 #define oo_COPYINGcxx . . $ `sys/oo_READ_BINARY.h:168:9`! 0
169 #define oo_COMPARINGcxx . . $ `sys/oo_READ_BINARY.h:169:9`! 0
170 #define oo_VALIDATING_ENCODINGcxx . . $ `sys/oo_READ_BINARY.h:170:9`! 0
171 #define oo_READINGcxx . . $ `sys/oo_READ_BINARY.h:171:9`! 1
172 #define oo_READING_TEXTcxx . . $ `sys/oo_READ_BINARY.h:172:9`! 0
173 #define oo_READING_BINARYcxx . . $ `sys/oo_READ_BINARY.h:173:9`! 1
174 #define oo_WRITINGcxx . . $ `sys/oo_READ_BINARY.h:174:9`! 0
175 #define oo_WRITING_TEXTcxx . . $ `sys/oo_READ_BINARY.h:175:9`! 0
176 #define oo_WRITING_BINARYcxx . . $ `sys/oo_READ_BINARY.h:176:9`! 0
177 #define oo_DESCRIBINGcxx . . $ `sys/oo_READ_BINARY.h:177:9`! 0
178
179 /* End of file oo_READ_BINARY.h */