autogen/include/Lucy/Index/SortCache.h

filter: Statementstmt 0.0% 0 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 3 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« autogen/include/Clownfish/Obj.h ↑ Summary lib/Lucy/Test.xs »
1 /*
2 * ***********************************************
3 *
4 * !!!! DO NOT EDIT !!!!
5 *
6 * This file was auto-generated by Build.PL.
7 *
8 * ***********************************************
9 *
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed with
12 * this work for additional information regarding copyright ownership.
13 * The ASF licenses this file to You under the Apache License, Version 2.0
14 * (the "License"); you may not use this file except in compliance with
15 * the License. You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 */
25  
26  
27 #ifndef H_LUCY_INDEX_SORTCACHE
28 #define H_LUCY_INDEX_SORTCACHE 1
29  
30  
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34  
35 #include "lucy_parcel.h"
36  
37 /* Include the header for this class's parent.
38 */
39  
40 #include "Clownfish/Obj.h"
41  
42 /* Define the struct layout for instances of this class.
43 */
44  
45 #ifdef C_LUCY_SORTCACHE
46 extern uint32_t lucy_SortCache_IVARS_OFFSET;
47 typedef struct lucy_SortCacheIVARS lucy_SortCacheIVARS;
48 static CFISH_INLINE lucy_SortCacheIVARS*
49 lucy_SortCache_IVARS(lucy_SortCache *self) {
50 char *ptr = (char*)self + lucy_SortCache_IVARS_OFFSET;
51 return (lucy_SortCacheIVARS*)ptr;
52 }
53 #ifdef LUCY_USE_SHORT_NAMES
54 #define SortCacheIVARS lucy_SortCacheIVARS
55 #define SortCache_IVARS lucy_SortCache_IVARS
56 #endif
57  
58 struct lucy_SortCacheIVARS {
59 cfish_String* field;
60 lucy_FieldType* type;
61 const void* ords;
62 int32_t doc_max;
63 int32_t cardinality;
64 int32_t ord_width;
65 int32_t null_ord;
66 bool native_ords;
67 };
68  
69 #endif /* C_LUCY_SORTCACHE */
70  
71 /* Declare this class's inert variables.
72 */
73  
74  
75  
76 /* Declare both this class's inert functions and the C functions which
77 * implement this class's dynamic methods.
78 */
79  
80 LUCY_VISIBLE lucy_SortCache*
81 lucy_SortCache_init(lucy_SortCache* self, cfish_String* field, lucy_FieldType* type, const void* ords, int32_t cardinality, int32_t doc_max, int32_t null_ord, int32_t ord_width);
82  
83 cfish_Obj*
84 LUCY_SortCache_Value_IMP(lucy_SortCache* self, int32_t ord);
85  
86 const void*
87 LUCY_SortCache_Get_Ords_IMP(lucy_SortCache* self);
88  
89 int32_t
90 LUCY_SortCache_Get_Cardinality_IMP(lucy_SortCache* self);
91  
92 int32_t
93 LUCY_SortCache_Get_Ord_Width_IMP(lucy_SortCache* self);
94  
95 int32_t
96 LUCY_SortCache_Get_Null_Ord_IMP(lucy_SortCache* self);
97  
98 int32_t
99 LUCY_SortCache_Ordinal_IMP(lucy_SortCache* self, int32_t doc_id);
100  
101 int32_t
102 LUCY_SortCache_Find_IMP(lucy_SortCache* self, cfish_Obj* term);
103  
104 void
105 LUCY_SortCache_Set_Native_Ords_IMP(lucy_SortCache* self, bool native_ords);
106  
107 bool
108 LUCY_SortCache_Get_Native_Ords_IMP(lucy_SortCache* self);
109  
110 void
111 LUCY_SortCache_Destroy_IMP(lucy_SortCache* self);
112  
113  
114  
115 /* Define typedefs for each dynamic method, allowing us to cast generic
116 * pointers to the appropriate function pointer type more cleanly.
117 */
118  
119 typedef void*
120 (*LUCY_SortCache_To_Host_t)(lucy_SortCache* self, void* vcache);
121  
122 typedef cfish_Obj*
123 (*LUCY_SortCache_Clone_t)(lucy_SortCache* self);
124  
125 typedef bool
126 (*LUCY_SortCache_Equals_t)(lucy_SortCache* self, cfish_Obj* other);
127  
128 typedef int32_t
129 (*LUCY_SortCache_Compare_To_t)(lucy_SortCache* self, cfish_Obj* other);
130  
131 typedef void
132 (*LUCY_SortCache_Destroy_t)(lucy_SortCache* self);
133  
134 typedef cfish_String*
135 (*LUCY_SortCache_To_String_t)(lucy_SortCache* self);
136  
137 typedef cfish_Obj*
138 (*LUCY_SortCache_Value_t)(lucy_SortCache* self, int32_t ord);
139  
140 typedef const void*
141 (*LUCY_SortCache_Get_Ords_t)(lucy_SortCache* self);
142  
143 typedef int32_t
144 (*LUCY_SortCache_Get_Cardinality_t)(lucy_SortCache* self);
145  
146 typedef int32_t
147 (*LUCY_SortCache_Get_Ord_Width_t)(lucy_SortCache* self);
148  
149 typedef int32_t
150 (*LUCY_SortCache_Get_Null_Ord_t)(lucy_SortCache* self);
151  
152 typedef int32_t
153 (*LUCY_SortCache_Ordinal_t)(lucy_SortCache* self, int32_t doc_id);
154  
155 typedef int32_t
156 (*LUCY_SortCache_Find_t)(lucy_SortCache* self, cfish_Obj* term);
157  
158 typedef void
159 (*LUCY_SortCache_Set_Native_Ords_t)(lucy_SortCache* self, bool native_ords);
160  
161 typedef bool
162 (*LUCY_SortCache_Get_Native_Ords_t)(lucy_SortCache* self);
163  
164  
165  
166 /* Define type-safe wrappers for inert functions of Obj.
167 */
168  
169 static CFISH_INLINE cfish_Class*
170 lucy_SortCache_get_class(lucy_SortCache *self) {
171 return cfish_Obj_get_class((cfish_Obj*)self);
172 }
173  
174 static CFISH_INLINE cfish_String*
175 lucy_SortCache_get_class_name(lucy_SortCache *self) {
176 return cfish_Obj_get_class_name((cfish_Obj*)self);
177 }
178  
179 static CFISH_INLINE bool
180 lucy_SortCache_is_a(lucy_SortCache *self, cfish_Class *ancestor) {
181 return cfish_Obj_is_a((cfish_Obj*)self, ancestor);
182 }
183  
184  
185 /* Define the inline functions which implement this class's virtual methods.
186 */
187  
188 extern LUCY_VISIBLE uint32_t LUCY_SortCache_To_Host_OFFSET;
189 static CFISH_INLINE void*
190 LUCY_SortCache_To_Host(lucy_SortCache* self, void* vcache) {
191 const LUCY_SortCache_To_Host_t method = (LUCY_SortCache_To_Host_t)cfish_obj_method(self, LUCY_SortCache_To_Host_OFFSET);
192 return method(self, vcache);
193 }
194  
195 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Clone_OFFSET;
196 static CFISH_INLINE cfish_Obj*
197 LUCY_SortCache_Clone(lucy_SortCache* self) {
198 const LUCY_SortCache_Clone_t method = (LUCY_SortCache_Clone_t)cfish_obj_method(self, LUCY_SortCache_Clone_OFFSET);
199 return method(self);
200 }
201  
202 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Equals_OFFSET;
203 static CFISH_INLINE bool
204 LUCY_SortCache_Equals(lucy_SortCache* self, cfish_Obj* other) {
205 const LUCY_SortCache_Equals_t method = (LUCY_SortCache_Equals_t)cfish_obj_method(self, LUCY_SortCache_Equals_OFFSET);
206 return method(self, other);
207 }
208  
209 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Compare_To_OFFSET;
210 static CFISH_INLINE int32_t
211 LUCY_SortCache_Compare_To(lucy_SortCache* self, cfish_Obj* other) {
212 const LUCY_SortCache_Compare_To_t method = (LUCY_SortCache_Compare_To_t)cfish_obj_method(self, LUCY_SortCache_Compare_To_OFFSET);
213 return method(self, other);
214 }
215  
216 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Destroy_OFFSET;
217 static CFISH_INLINE void
218 LUCY_SortCache_Destroy(lucy_SortCache* self) {
219 const LUCY_SortCache_Destroy_t method = (LUCY_SortCache_Destroy_t)cfish_obj_method(self, LUCY_SortCache_Destroy_OFFSET);
220 method(self);
221 }
222  
223 extern LUCY_VISIBLE uint32_t LUCY_SortCache_To_String_OFFSET;
224 static CFISH_INLINE cfish_String*
225 LUCY_SortCache_To_String(lucy_SortCache* self) {
226 const LUCY_SortCache_To_String_t method = (LUCY_SortCache_To_String_t)cfish_obj_method(self, LUCY_SortCache_To_String_OFFSET);
227 return method(self);
228 }
229  
230 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Value_OFFSET;
231 static CFISH_INLINE cfish_Obj*
232 0 LUCY_SortCache_Value(lucy_SortCache* self, int32_t ord) {
233 0 const LUCY_SortCache_Value_t method = (LUCY_SortCache_Value_t)cfish_obj_method(self, LUCY_SortCache_Value_OFFSET);
234 0 return method(self, ord);
235 }
236  
237 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Ords_OFFSET;
238 static CFISH_INLINE const void*
239 LUCY_SortCache_Get_Ords(lucy_SortCache* self) {
240 const LUCY_SortCache_Get_Ords_t method = (LUCY_SortCache_Get_Ords_t)cfish_obj_method(self, LUCY_SortCache_Get_Ords_OFFSET);
241 return method(self);
242 }
243  
244 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Cardinality_OFFSET;
245 static CFISH_INLINE int32_t
246 LUCY_SortCache_Get_Cardinality(lucy_SortCache* self) {
247 const LUCY_SortCache_Get_Cardinality_t method = (LUCY_SortCache_Get_Cardinality_t)cfish_obj_method(self, LUCY_SortCache_Get_Cardinality_OFFSET);
248 return method(self);
249 }
250  
251 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Ord_Width_OFFSET;
252 static CFISH_INLINE int32_t
253 LUCY_SortCache_Get_Ord_Width(lucy_SortCache* self) {
254 const LUCY_SortCache_Get_Ord_Width_t method = (LUCY_SortCache_Get_Ord_Width_t)cfish_obj_method(self, LUCY_SortCache_Get_Ord_Width_OFFSET);
255 return method(self);
256 }
257  
258 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Null_Ord_OFFSET;
259 static CFISH_INLINE int32_t
260 LUCY_SortCache_Get_Null_Ord(lucy_SortCache* self) {
261 const LUCY_SortCache_Get_Null_Ord_t method = (LUCY_SortCache_Get_Null_Ord_t)cfish_obj_method(self, LUCY_SortCache_Get_Null_Ord_OFFSET);
262 return method(self);
263 }
264  
265 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Ordinal_OFFSET;
266 static CFISH_INLINE int32_t
267 LUCY_SortCache_Ordinal(lucy_SortCache* self, int32_t doc_id) {
268 const LUCY_SortCache_Ordinal_t method = (LUCY_SortCache_Ordinal_t)cfish_obj_method(self, LUCY_SortCache_Ordinal_OFFSET);
269 return method(self, doc_id);
270 }
271  
272 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Find_OFFSET;
273 static CFISH_INLINE int32_t
274 LUCY_SortCache_Find(lucy_SortCache* self, cfish_Obj* term) {
275 const LUCY_SortCache_Find_t method = (LUCY_SortCache_Find_t)cfish_obj_method(self, LUCY_SortCache_Find_OFFSET);
276 return method(self, term);
277 }
278  
279 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Set_Native_Ords_OFFSET;
280 static CFISH_INLINE void
281 LUCY_SortCache_Set_Native_Ords(lucy_SortCache* self, bool native_ords) {
282 const LUCY_SortCache_Set_Native_Ords_t method = (LUCY_SortCache_Set_Native_Ords_t)cfish_obj_method(self, LUCY_SortCache_Set_Native_Ords_OFFSET);
283 method(self, native_ords);
284 }
285  
286 extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Native_Ords_OFFSET;
287 static CFISH_INLINE bool
288 LUCY_SortCache_Get_Native_Ords(lucy_SortCache* self) {
289 const LUCY_SortCache_Get_Native_Ords_t method = (LUCY_SortCache_Get_Native_Ords_t)cfish_obj_method(self, LUCY_SortCache_Get_Native_Ords_OFFSET);
290 return method(self);
291 }
292  
293  
294  
295 /* Declare callbacks for wrapping host overrides.
296 */
297  
298 #ifdef CFISH_NO_DYNAMIC_OVERRIDES
299 #define Lucy_SortCache_Value_OVERRIDE NULL
300 #define Lucy_SortCache_Get_Ords_OVERRIDE NULL
301 #define Lucy_SortCache_Get_Cardinality_OVERRIDE NULL
302 #define Lucy_SortCache_Get_Ord_Width_OVERRIDE NULL
303 #define Lucy_SortCache_Get_Null_Ord_OVERRIDE NULL
304 #define Lucy_SortCache_Ordinal_OVERRIDE NULL
305 #define Lucy_SortCache_Find_OVERRIDE NULL
306 #define Lucy_SortCache_Set_Native_Ords_OVERRIDE NULL
307 #define Lucy_SortCache_Get_Native_Ords_OVERRIDE NULL
308 #else
309 cfish_Obj*
310 Lucy_SortCache_Value_OVERRIDE(lucy_SortCache* self, int32_t ord);
311 const void*
312 Lucy_SortCache_Get_Ords_OVERRIDE(lucy_SortCache* self);
313 int32_t
314 Lucy_SortCache_Get_Cardinality_OVERRIDE(lucy_SortCache* self);
315 int32_t
316 Lucy_SortCache_Get_Ord_Width_OVERRIDE(lucy_SortCache* self);
317 int32_t
318 Lucy_SortCache_Get_Null_Ord_OVERRIDE(lucy_SortCache* self);
319 int32_t
320 Lucy_SortCache_Ordinal_OVERRIDE(lucy_SortCache* self, int32_t doc_id);
321 int32_t
322 Lucy_SortCache_Find_OVERRIDE(lucy_SortCache* self, cfish_Obj* term);
323 void
324 Lucy_SortCache_Set_Native_Ords_OVERRIDE(lucy_SortCache* self, bool native_ords);
325 bool
326 Lucy_SortCache_Get_Native_Ords_OVERRIDE(lucy_SortCache* self);
327 #endif
328  
329  
330 /* Define "short names" for this class's symbols.
331 */
332  
333 #ifdef LUCY_USE_SHORT_NAMES
334 #define SortCache lucy_SortCache
335 #define SORTCACHE LUCY_SORTCACHE
336 #define SortCache_init lucy_SortCache_init
337 #define SortCache_get_class lucy_SortCache_get_class
338 #define SortCache_get_class_name lucy_SortCache_get_class_name
339 #define SortCache_is_a lucy_SortCache_is_a
340 #define SortCache_Value_IMP LUCY_SortCache_Value_IMP
341 #define SortCache_Get_Ords_IMP LUCY_SortCache_Get_Ords_IMP
342 #define SortCache_Get_Cardinality_IMP LUCY_SortCache_Get_Cardinality_IMP
343 #define SortCache_Get_Ord_Width_IMP LUCY_SortCache_Get_Ord_Width_IMP
344 #define SortCache_Get_Null_Ord_IMP LUCY_SortCache_Get_Null_Ord_IMP
345 #define SortCache_Ordinal_IMP LUCY_SortCache_Ordinal_IMP
346 #define SortCache_Find_IMP LUCY_SortCache_Find_IMP
347 #define SortCache_Set_Native_Ords_IMP LUCY_SortCache_Set_Native_Ords_IMP
348 #define SortCache_Get_Native_Ords_IMP LUCY_SortCache_Get_Native_Ords_IMP
349 #define SortCache_Destroy_IMP LUCY_SortCache_Destroy_IMP
350 #define SortCache_To_Host LUCY_SortCache_To_Host
351 #define SortCache_To_Host_t LUCY_SortCache_To_Host_t
352 #define SortCache_Clone LUCY_SortCache_Clone
353 #define SortCache_Clone_t LUCY_SortCache_Clone_t
354 #define SortCache_Equals LUCY_SortCache_Equals
355 #define SortCache_Equals_t LUCY_SortCache_Equals_t
356 #define SortCache_Compare_To LUCY_SortCache_Compare_To
357 #define SortCache_Compare_To_t LUCY_SortCache_Compare_To_t
358 #define SortCache_Destroy LUCY_SortCache_Destroy
359 #define SortCache_Destroy_t LUCY_SortCache_Destroy_t
360 #define SortCache_To_String LUCY_SortCache_To_String
361 #define SortCache_To_String_t LUCY_SortCache_To_String_t
362 #define SortCache_Value LUCY_SortCache_Value
363 #define SortCache_Value_t LUCY_SortCache_Value_t
364 #define SortCache_Get_Ords LUCY_SortCache_Get_Ords
365 #define SortCache_Get_Ords_t LUCY_SortCache_Get_Ords_t
366 #define SortCache_Get_Cardinality LUCY_SortCache_Get_Cardinality
367 #define SortCache_Get_Cardinality_t LUCY_SortCache_Get_Cardinality_t
368 #define SortCache_Get_Ord_Width LUCY_SortCache_Get_Ord_Width
369 #define SortCache_Get_Ord_Width_t LUCY_SortCache_Get_Ord_Width_t
370 #define SortCache_Get_Null_Ord LUCY_SortCache_Get_Null_Ord
371 #define SortCache_Get_Null_Ord_t LUCY_SortCache_Get_Null_Ord_t
372 #define SortCache_Ordinal LUCY_SortCache_Ordinal
373 #define SortCache_Ordinal_t LUCY_SortCache_Ordinal_t
374 #define SortCache_Find LUCY_SortCache_Find
375 #define SortCache_Find_t LUCY_SortCache_Find_t
376 #define SortCache_Set_Native_Ords LUCY_SortCache_Set_Native_Ords
377 #define SortCache_Set_Native_Ords_t LUCY_SortCache_Set_Native_Ords_t
378 #define SortCache_Get_Native_Ords LUCY_SortCache_Get_Native_Ords
379 #define SortCache_Get_Native_Ords_t LUCY_SortCache_Get_Native_Ords_t
380 #endif /* LUCY_USE_SHORT_NAMES */
381  
382  
383  
384  
385  
386 #ifdef __cplusplus
387 }
388 #endif
389  
390 #endif /* H_LUCY_INDEX_SORTCACHE */
391  
392  
393  
394  
« autogen/include/Clownfish/Obj.h ↑ Summary lib/Lucy/Test.xs »