Debian Codegraph @

sys/oo_EQUAL.h

raw symbols SCIP
1 /* oo_EQUAL.h
2 *
3 * Copyright (C) 1994-2007,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_EQUAL.h:21:9`!(type, storage, x) \
22 if (ourcxx . . $ `melder/melder.h:42:9`! x != thycxx . . $ `melder/melder.h:45:9`! x) \
23 return false;
24
25 #define oo_SETcxx . . $ `sys/oo_EQUAL.h:25:9`!(type, storage, x, setType) \
26 for (int _i = 0; _i <= (int) setType::MAX; _i ++) { \
27 if (our x [_i] != thy x [_i]) \
28 return false; \
29 }
30
31 #define oo_ANYVECcxx . . $ `sys/oo_EQUAL.h:31:9`!(type, storage, x, sizeExpression) \
32 { \
33 const integer _size = (sizeExpression); \
34 Melder_assert (our x.size == _size); \
35 if (_size > 0) { \
36 if (! NUMequal (our x.get(), thy x.get())) \
37 return false; \
38 } \
39 }
40
41 #define oo_ANYMATcxx . . $ `sys/oo_EQUAL.h:41:9`!(type, storage, x, nrowExpression, ncolExpression) \
42 { \
43 const integer _nrow = (nrowExpression), _ncol = (ncolExpression); \
44 if (_nrow > 0 && _ncol > 0) { \
45 /*Melder_assert (our x.nrow == _nrow && our x.ncol == _ncol); BUG routinely violated in SSCP for lowerCholesky */ \
46 if (! NUMequal (our x.get(), thy x.get())) \
47 return false; \
48 } \
49 }
50
51 #define oo_ANYTEN3cxx . . $ `sys/oo_EQUAL.h:51:9`!(type, storage, x, ndim1Expression, ndim2Expression, ndim3Expression) \
52 { \
53 const integer _ndim1 = (ndim1Expression), _ndim2 = (ndim2Expression), _ndim3 = (ndim3Expression); \
54 if (_ndim1 > 0 && _ndim2 > 0 && _ndim3 > 0) { \
55 if (! NUMequal (our x.get(), thy x.get())) \
56 return false; \
57 } \
58 }
59
60 #define oo_ENUMxcxx . . $ `sys/oo_EQUAL.h:60:9`!(kType, storage, x) \
61 if (our x != thy x) \
62 return false;
63
64 //#define oo_ENUMx_SET(kType, storage, x, setType) \
65 // for (int _i = 0; _i <= (int) setType::MAX; _i ++) \
66 // if (our x [_i] != thy x [_i]) \
67 // return false;
68
69 #define oo_STRINGxcxx . . $ `sys/oo_EQUAL.h:69:9`!(storage, x) \
70 if (! Melder_equcxx . . $ `melder/melder_str32.h:124:9`! (ourcxx . . $ `melder/melder.h:42:9`! x.get(), thycxx . . $ `melder/melder.h:45:9`! x.get())) \
71 return false;
72
73 #define oo_STRINGx_SETcxx . . $ `sys/oo_EQUAL.h:73:9`!(storage, x, setType) \
74 for (int _i = 0; _i <= setType::MAX; _i ++) \
75 if (! Melder_equ (our x [_i].get(), thy x [_i].get())) \
76 return false;
77
78 #define oo_STRINGx_VECTORcxx . . $ `sys/oo_EQUAL.h:78:9`!(storage, x, sizeExpression) \
79 { \
80 const integer _size = (sizeExpression); \
81 Melder_assert (_size == our x.size); \
82 if (! our x != ! thy x) \
83 return false; \
84 if (our x) { \
85 for (integer _i = 1; _i <= _size; _i ++) { \
86 if (! Melder_equ (our x [_i].get(), thy x [_i].get())) \
87 return false; \
88 } \
89 } \
90 }
91
92 #define oo_STRUCTcxx . . $ `sys/oo_EQUAL.h:92:9`!(Type, x) \
93 if (! our x. equal (& thy x)) \
94 return false;
95
96 #define oo_STRUCT_SETcxx . . $ `sys/oo_EQUAL.h:96:9`!(Type, x, setType) \
97 for (int _i = 0; _i <= (int) setType::MAX; _i ++) { \
98 if (! our x [_i]. equal (& thy x [_i])) \
99 return false; \
100 }
101
102 #define oo_STRUCTVECcxx . . $ `sys/oo_EQUAL.h:102:9`!(Type, x, sizeExpression) \
103 { \
104 const integer _size = (sizeExpression); \
105 Melder_assert (_size == our x.size); \
106 if (thy x.size != _size) \
107 return false; \
108 for (integer _i = 1; _i <= _size; _i ++) { \
109 if (! our x [_i]. equal (& thy x [_i])) \
110 return false; \
111 } \
112 }
113
114 #define oo_STRUCTMATcxx . . $ `sys/oo_EQUAL.h:114:9`!(Type, x, nrowExpression, ncolExpression) \
115 { \
116 const integer _nrow = (sizeExpression), _ncol = (ncolExpression); \
117 Melder_assert (_nrow == our x.nrow && _ncol == our x.ncol); \
118 if (thy x.nrow != _nrow || thy x.ncol != _ncol) \
119 return false; \
120 for (integer _irow = 1; _irow <= _nrow; _irow ++) { \
121 for (integer _icol = 1; _icol <= _ncol; _icol ++) { \
122 if (! our x [_irow] [_icol]. equal (& thy x [_irow] [_icol])) \
123 return false; \
124 } \
125 } \
126 }
127
128 #define oo_OBJECTcxx . . $ `sys/oo_EQUAL.h:128:9`!(Class, version, x) \
129 if (! our x != ! thy x || (our x && ! Data_equal (our x.get(), thy x.get()))) \
130 return false;
131
132 #define oo_COLLECTION_OFcxx . . $ `sys/oo_EQUAL.h:132:9`!(Class, x, ItemClass, version) \
133 for (integer _i = 1; _i <= our x.size; _i ++) { \
134 if (! our x.at [_i] != ! thy x.at [_i] || (our x.at [_i] && ! Data_equal (our x.at [_i], thy x.at [_i]))) \
135 return false; \
136 }
137
138 #define oo_COLLECTIONcxx . . $ `sys/oo_EQUAL.h:138:9`!(Class, x, ItemClass, version) \
139 if (! our x != ! thy x || (our x && ! Data_equal (our x.get(), thy x.get()))) \
140 return false;
141
142 #define oo_TRANSIENT_FILEcxx . . $ `sys/oo_EQUAL.h:142:9`!(x) \
143 if (! MelderFile_equal (& our x, & thy x)) \
144 return false;
145
146 #define oo_TRANSIENT_FOLDERcxx . . $ `sys/oo_EQUAL.h:146:9`!(x) \
147 if (! MelderFolder_equal (& our x, & thy x)) \
148 return false;
149
150 #define oo_UNSAFE_BORROWED_TRANSIENT_CONST_OBJECT_REFERENCEcxx . . $ `sys/oo_EQUAL.h:150:9`!(Class, x) \
151 if (our x != thy x) /* pointer comparison */ \
152 return false;
153
154 #define oo_UNSAFE_BORROWED_TRANSIENT_MUTABLE_OBJECT_REFERENCEcxx . . $ `sys/oo_EQUAL.h:154:9`!(Class, x) \
155 if (our x != thy x) /* pointer comparison */ \
156 return false;
157
158 #define oo_DEFINE_STRUCTcxx . . $ `sys/oo_EQUAL.h:158:9`!(Type) \
159 bool struct##Type :: equal (Type thee) {
160
161 #define oo_END_STRUCTcxx . . $ `sys/oo_EQUAL.h:161:9`!(Type) \
162 return true; \
163 }
164
165 #define oo_DEFINE_CLASScxx . . $ `sys/oo_EQUAL.h:165:9`!(Class, Parent) \
166 bool struct##Class :: v1_equal (Daata _thee_Daata) { \
167 Class thee = static_cast <Class> (_thee_Daata); \
168 if (! Class##_Parent :: v1_equal (thee)) \
169 return false;
170
171 #define oo_END_CLASScxx . . $ `sys/oo_EQUAL.h:171:9`!(Class) \
172 return true; \
173 }
174
175 #define oo_FROMcxx . . $ `sys/oo_EQUAL.h:175:9`!(from)
176
177 #define oo_ENDFROMcxx . . $ `sys/oo_EQUAL.h:177:9`!
178
179 #define oo_DECLARINGcxx . . $ `sys/oo_EQUAL.h:179:9`! 0
180 #define oo_DESTROYINGcxx . . $ `sys/oo_EQUAL.h:180:9`! 0
181 #define oo_COPYINGcxx . . $ `sys/oo_EQUAL.h:181:9`! 0
182 #define oo_COMPARINGcxx . . $ `sys/oo_EQUAL.h:182:9`! 1
183 #define oo_VALIDATING_ENCODINGcxx . . $ `sys/oo_EQUAL.h:183:9`! 0
184 #define oo_READINGcxx . . $ `sys/oo_EQUAL.h:184:9`! 0
185 #define oo_READING_TEXTcxx . . $ `sys/oo_EQUAL.h:185:9`! 0
186 #define oo_READING_BINARYcxx . . $ `sys/oo_EQUAL.h:186:9`! 0
187 #define oo_WRITINGcxx . . $ `sys/oo_EQUAL.h:187:9`! 0
188 #define oo_WRITING_TEXTcxx . . $ `sys/oo_EQUAL.h:188:9`! 0
189 #define oo_WRITING_BINARYcxx . . $ `sys/oo_EQUAL.h:189:9`! 0
190 #define oo_DESCRIBINGcxx . . $ `sys/oo_EQUAL.h:190:9`! 0
191
192 /* End of file oo_EQUAL.h */