autogen/include/Lucy/Index/Posting/ScorePosting.h

filter: Statementstmt 100% 6 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 6 / 6 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« autogen/include/Lucy/Index/Indexer.h ↑ Summary autogen/include/Lucy/Index/Similarity.h »
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_POSTING_SCOREPOSTING
28 #define H_LUCY_INDEX_POSTING_SCOREPOSTING 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 "Lucy/Index/Posting/MatchPosting.h"
41  
42 /* Define the struct layout for instances of this class.
43 */
44  
45 #ifdef C_LUCY_SCOREPOSTING
46 extern uint32_t lucy_ScorePost_IVARS_OFFSET;
47 typedef struct lucy_ScorePostingIVARS lucy_ScorePostingIVARS;
48 static CFISH_INLINE lucy_ScorePostingIVARS*
49 lucy_ScorePost_IVARS(lucy_ScorePosting *self) {
50 char *ptr = (char*)self + lucy_ScorePost_IVARS_OFFSET;
51 return (lucy_ScorePostingIVARS*)ptr;
52 }
53 #ifdef LUCY_USE_SHORT_NAMES
54 #define ScorePostingIVARS lucy_ScorePostingIVARS
55 #define ScorePost_IVARS lucy_ScorePost_IVARS
56 #endif
57  
58 struct lucy_ScorePostingIVARS {
59 int32_t doc_id;
60 lucy_Similarity* sim;
61 uint32_t freq;
62 float weight;
63 float* norm_decoder;
64 uint32_t* prox;
65 uint32_t prox_cap;
66 };
67  
68 #endif /* C_LUCY_SCOREPOSTING */
69  
70 /* Declare this class's inert variables.
71 */
72  
73  
74  
75 /* Declare both this class's inert functions and the C functions which
76 * implement this class's dynamic methods.
77 */
78  
79 LUCY_VISIBLE lucy_ScorePosting*
80 lucy_ScorePost_new(lucy_Similarity* similarity);
81  
82 LUCY_VISIBLE lucy_ScorePosting*
83 lucy_ScorePost_init(lucy_ScorePosting* self, lucy_Similarity* similarity);
84  
85 void
86 LUCY_ScorePost_Destroy_IMP(lucy_ScorePosting* self);
87  
88 void
89 LUCY_ScorePost_Read_Record_IMP(lucy_ScorePosting* self, lucy_InStream* instream);
90  
91 lucy_RawPosting*
92 LUCY_ScorePost_Read_Raw_IMP(lucy_ScorePosting* self, lucy_InStream* instream, int32_t last_doc_id, cfish_String* term_text, lucy_MemoryPool* mem_pool);
93  
94 void
95 LUCY_ScorePost_Add_Inversion_To_Pool_IMP(lucy_ScorePosting* self, lucy_PostingPool* post_pool, lucy_Inversion* inversion, lucy_FieldType* type, int32_t doc_id, float doc_boost, float length_norm);
96  
97 void
98 LUCY_ScorePost_Reset_IMP(lucy_ScorePosting* self);
99  
100 lucy_ScorePostingMatcher*
101 LUCY_ScorePost_Make_Matcher_IMP(lucy_ScorePosting* self, lucy_Similarity* sim, lucy_PostingList* plist, lucy_Compiler* compiler, bool need_score);
102  
103 uint32_t*
104 LUCY_ScorePost_Get_Prox_IMP(lucy_ScorePosting* self);
105  
106  
107  
108 /* Define typedefs for each dynamic method, allowing us to cast generic
109 * pointers to the appropriate function pointer type more cleanly.
110 */
111  
112 typedef void*
113 (*LUCY_ScorePost_To_Host_t)(lucy_ScorePosting* self, void* vcache);
114  
115 typedef cfish_Obj*
116 (*LUCY_ScorePost_Clone_t)(lucy_ScorePosting* self);
117  
118 typedef bool
119 (*LUCY_ScorePost_Equals_t)(lucy_ScorePosting* self, cfish_Obj* other);
120  
121 typedef int32_t
122 (*LUCY_ScorePost_Compare_To_t)(lucy_ScorePosting* self, cfish_Obj* other);
123  
124 typedef void
125 (*LUCY_ScorePost_Destroy_t)(lucy_ScorePosting* self);
126  
127 typedef cfish_String*
128 (*LUCY_ScorePost_To_String_t)(lucy_ScorePosting* self);
129  
130 typedef void
131 (*LUCY_ScorePost_Reset_t)(lucy_ScorePosting* self);
132  
133 typedef void
134 (*LUCY_ScorePost_Write_Key_Frame_t)(lucy_ScorePosting* self, lucy_OutStream* outstream, cfish_Obj* value);
135  
136 typedef void
137 (*LUCY_ScorePost_Write_Delta_t)(lucy_ScorePosting* self, lucy_OutStream* outstream, cfish_Obj* value);
138  
139 typedef void
140 (*LUCY_ScorePost_Read_Key_Frame_t)(lucy_ScorePosting* self, lucy_InStream* instream);
141  
142 typedef void
143 (*LUCY_ScorePost_Read_Delta_t)(lucy_ScorePosting* self, lucy_InStream* instream);
144  
145 typedef void
146 (*LUCY_ScorePost_Read_Record_t)(lucy_ScorePosting* self, lucy_InStream* instream);
147  
148 typedef lucy_RawPosting*
149 (*LUCY_ScorePost_Read_Raw_t)(lucy_ScorePosting* self, lucy_InStream* instream, int32_t last_doc_id, cfish_String* term_text, lucy_MemoryPool* mem_pool);
150  
151 typedef void
152 (*LUCY_ScorePost_Add_Inversion_To_Pool_t)(lucy_ScorePosting* self, lucy_PostingPool* post_pool, lucy_Inversion* inversion, lucy_FieldType* type, int32_t doc_id, float doc_boost, float length_norm);
153  
154 typedef void
155 (*LUCY_ScorePost_Set_Doc_ID_t)(lucy_ScorePosting* self, int32_t doc_id);
156  
157 typedef int32_t
158 (*LUCY_ScorePost_Get_Doc_ID_t)(lucy_ScorePosting* self);
159  
160 typedef lucy_ScorePostingMatcher*
161 (*LUCY_ScorePost_Make_Matcher_t)(lucy_ScorePosting* self, lucy_Similarity* sim, lucy_PostingList* plist, lucy_Compiler* compiler, bool need_score);
162  
163 typedef int32_t
164 (*LUCY_ScorePost_Get_Freq_t)(lucy_ScorePosting* self);
165  
166 typedef uint32_t*
167 (*LUCY_ScorePost_Get_Prox_t)(lucy_ScorePosting* self);
168  
169  
170  
171 /* Define type-safe wrappers for inert functions of Obj.
172 */
173  
174 static CFISH_INLINE cfish_Class*
175 lucy_ScorePost_get_class(lucy_ScorePosting *self) {
176 return cfish_Obj_get_class((cfish_Obj*)self);
177 }
178  
179 static CFISH_INLINE cfish_String*
180 lucy_ScorePost_get_class_name(lucy_ScorePosting *self) {
181 return cfish_Obj_get_class_name((cfish_Obj*)self);
182 }
183  
184 static CFISH_INLINE bool
185 lucy_ScorePost_is_a(lucy_ScorePosting *self, cfish_Class *ancestor) {
186 return cfish_Obj_is_a((cfish_Obj*)self, ancestor);
187 }
188  
189  
190 /* Define the inline functions which implement this class's virtual methods.
191 */
192  
193 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_To_Host_OFFSET;
194 static CFISH_INLINE void*
195 LUCY_ScorePost_To_Host(lucy_ScorePosting* self, void* vcache) {
196 const LUCY_ScorePost_To_Host_t method = (LUCY_ScorePost_To_Host_t)cfish_obj_method(self, LUCY_ScorePost_To_Host_OFFSET);
197 return method(self, vcache);
198 }
199  
200 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Clone_OFFSET;
201 static CFISH_INLINE cfish_Obj*
202 LUCY_ScorePost_Clone(lucy_ScorePosting* self) {
203 const LUCY_ScorePost_Clone_t method = (LUCY_ScorePost_Clone_t)cfish_obj_method(self, LUCY_ScorePost_Clone_OFFSET);
204 return method(self);
205 }
206  
207 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Equals_OFFSET;
208 static CFISH_INLINE bool
209 LUCY_ScorePost_Equals(lucy_ScorePosting* self, cfish_Obj* other) {
210 const LUCY_ScorePost_Equals_t method = (LUCY_ScorePost_Equals_t)cfish_obj_method(self, LUCY_ScorePost_Equals_OFFSET);
211 return method(self, other);
212 }
213  
214 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Compare_To_OFFSET;
215 static CFISH_INLINE int32_t
216 LUCY_ScorePost_Compare_To(lucy_ScorePosting* self, cfish_Obj* other) {
217 const LUCY_ScorePost_Compare_To_t method = (LUCY_ScorePost_Compare_To_t)cfish_obj_method(self, LUCY_ScorePost_Compare_To_OFFSET);
218 return method(self, other);
219 }
220  
221 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Destroy_OFFSET;
222 static CFISH_INLINE void
223 LUCY_ScorePost_Destroy(lucy_ScorePosting* self) {
224 const LUCY_ScorePost_Destroy_t method = (LUCY_ScorePost_Destroy_t)cfish_obj_method(self, LUCY_ScorePost_Destroy_OFFSET);
225 method(self);
226 }
227  
228 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_To_String_OFFSET;
229 static CFISH_INLINE cfish_String*
230 LUCY_ScorePost_To_String(lucy_ScorePosting* self) {
231 const LUCY_ScorePost_To_String_t method = (LUCY_ScorePost_To_String_t)cfish_obj_method(self, LUCY_ScorePost_To_String_OFFSET);
232 return method(self);
233 }
234  
235 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Reset_OFFSET;
236 static CFISH_INLINE void
237 LUCY_ScorePost_Reset(lucy_ScorePosting* self) {
238 const LUCY_ScorePost_Reset_t method = (LUCY_ScorePost_Reset_t)cfish_obj_method(self, LUCY_ScorePost_Reset_OFFSET);
239 method(self);
240 }
241  
242 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Write_Key_Frame_OFFSET;
243 static CFISH_INLINE void
244 LUCY_ScorePost_Write_Key_Frame(lucy_ScorePosting* self, lucy_OutStream* outstream, cfish_Obj* value) {
245 const LUCY_ScorePost_Write_Key_Frame_t method = (LUCY_ScorePost_Write_Key_Frame_t)cfish_obj_method(self, LUCY_ScorePost_Write_Key_Frame_OFFSET);
246 method(self, outstream, value);
247 }
248  
249 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Write_Delta_OFFSET;
250 static CFISH_INLINE void
251 LUCY_ScorePost_Write_Delta(lucy_ScorePosting* self, lucy_OutStream* outstream, cfish_Obj* value) {
252 const LUCY_ScorePost_Write_Delta_t method = (LUCY_ScorePost_Write_Delta_t)cfish_obj_method(self, LUCY_ScorePost_Write_Delta_OFFSET);
253 method(self, outstream, value);
254 }
255  
256 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Read_Key_Frame_OFFSET;
257 static CFISH_INLINE void
258 LUCY_ScorePost_Read_Key_Frame(lucy_ScorePosting* self, lucy_InStream* instream) {
259 const LUCY_ScorePost_Read_Key_Frame_t method = (LUCY_ScorePost_Read_Key_Frame_t)cfish_obj_method(self, LUCY_ScorePost_Read_Key_Frame_OFFSET);
260 method(self, instream);
261 }
262  
263 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Read_Delta_OFFSET;
264 static CFISH_INLINE void
265 LUCY_ScorePost_Read_Delta(lucy_ScorePosting* self, lucy_InStream* instream) {
266 const LUCY_ScorePost_Read_Delta_t method = (LUCY_ScorePost_Read_Delta_t)cfish_obj_method(self, LUCY_ScorePost_Read_Delta_OFFSET);
267 method(self, instream);
268 }
269  
270 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Read_Record_OFFSET;
271 static CFISH_INLINE void
272 LUCY_ScorePost_Read_Record(lucy_ScorePosting* self, lucy_InStream* instream) {
273 const LUCY_ScorePost_Read_Record_t method = (LUCY_ScorePost_Read_Record_t)cfish_obj_method(self, LUCY_ScorePost_Read_Record_OFFSET);
274 method(self, instream);
275 }
276  
277 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Read_Raw_OFFSET;
278 static CFISH_INLINE lucy_RawPosting*
279 LUCY_ScorePost_Read_Raw(lucy_ScorePosting* self, lucy_InStream* instream, int32_t last_doc_id, cfish_String* term_text, lucy_MemoryPool* mem_pool) {
280 const LUCY_ScorePost_Read_Raw_t method = (LUCY_ScorePost_Read_Raw_t)cfish_obj_method(self, LUCY_ScorePost_Read_Raw_OFFSET);
281 return method(self, instream, last_doc_id, term_text, mem_pool);
282 }
283  
284 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Add_Inversion_To_Pool_OFFSET;
285 static CFISH_INLINE void
286 LUCY_ScorePost_Add_Inversion_To_Pool(lucy_ScorePosting* self, lucy_PostingPool* post_pool, lucy_Inversion* inversion, lucy_FieldType* type, int32_t doc_id, float doc_boost, float length_norm) {
287 const LUCY_ScorePost_Add_Inversion_To_Pool_t method = (LUCY_ScorePost_Add_Inversion_To_Pool_t)cfish_obj_method(self, LUCY_ScorePost_Add_Inversion_To_Pool_OFFSET);
288 method(self, post_pool, inversion, type, doc_id, doc_boost, length_norm);
289 }
290  
291 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Set_Doc_ID_OFFSET;
292 static CFISH_INLINE void
293 LUCY_ScorePost_Set_Doc_ID(lucy_ScorePosting* self, int32_t doc_id) {
294 const LUCY_ScorePost_Set_Doc_ID_t method = (LUCY_ScorePost_Set_Doc_ID_t)cfish_obj_method(self, LUCY_ScorePost_Set_Doc_ID_OFFSET);
295 method(self, doc_id);
296 }
297  
298 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Get_Doc_ID_OFFSET;
299 static CFISH_INLINE int32_t
300 LUCY_ScorePost_Get_Doc_ID(lucy_ScorePosting* self) {
301 const LUCY_ScorePost_Get_Doc_ID_t method = (LUCY_ScorePost_Get_Doc_ID_t)cfish_obj_method(self, LUCY_ScorePost_Get_Doc_ID_OFFSET);
302 return method(self);
303 }
304  
305 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Make_Matcher_OFFSET;
306 static CFISH_INLINE lucy_ScorePostingMatcher*
307 LUCY_ScorePost_Make_Matcher(lucy_ScorePosting* self, lucy_Similarity* sim, lucy_PostingList* plist, lucy_Compiler* compiler, bool need_score) {
308 const LUCY_ScorePost_Make_Matcher_t method = (LUCY_ScorePost_Make_Matcher_t)cfish_obj_method(self, LUCY_ScorePost_Make_Matcher_OFFSET);
309 return method(self, sim, plist, compiler, need_score);
310 }
311  
312 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Get_Freq_OFFSET;
313 static CFISH_INLINE int32_t
314 2 LUCY_ScorePost_Get_Freq(lucy_ScorePosting* self) {
315 2 const LUCY_ScorePost_Get_Freq_t method = (LUCY_ScorePost_Get_Freq_t)cfish_obj_method(self, LUCY_ScorePost_Get_Freq_OFFSET);
316 2 return method(self);
317 }
318  
319 extern LUCY_VISIBLE uint32_t LUCY_ScorePost_Get_Prox_OFFSET;
320 static CFISH_INLINE uint32_t*
321 2 LUCY_ScorePost_Get_Prox(lucy_ScorePosting* self) {
322 2 const LUCY_ScorePost_Get_Prox_t method = (LUCY_ScorePost_Get_Prox_t)cfish_obj_method(self, LUCY_ScorePost_Get_Prox_OFFSET);
323 2 return method(self);
324 }
325  
326  
327  
328 /* Declare callbacks for wrapping host overrides.
329 */
330  
331 #ifdef CFISH_NO_DYNAMIC_OVERRIDES
332 #define Lucy_ScorePost_Get_Prox_OVERRIDE NULL
333 #else
334 uint32_t*
335 Lucy_ScorePost_Get_Prox_OVERRIDE(lucy_ScorePosting* self);
336 #endif
337  
338  
339 /* Define "short names" for this class's symbols.
340 */
341  
342 #ifdef LUCY_USE_SHORT_NAMES
343 #define ScorePosting lucy_ScorePosting
344 #define SCOREPOSTING LUCY_SCOREPOSTING
345 #define ScorePost_new lucy_ScorePost_new
346 #define ScorePost_init lucy_ScorePost_init
347 #define ScorePost_get_class lucy_ScorePost_get_class
348 #define ScorePost_get_class_name lucy_ScorePost_get_class_name
349 #define ScorePost_is_a lucy_ScorePost_is_a
350 #define ScorePost_Destroy_IMP LUCY_ScorePost_Destroy_IMP
351 #define ScorePost_Read_Record_IMP LUCY_ScorePost_Read_Record_IMP
352 #define ScorePost_Read_Raw_IMP LUCY_ScorePost_Read_Raw_IMP
353 #define ScorePost_Add_Inversion_To_Pool_IMP LUCY_ScorePost_Add_Inversion_To_Pool_IMP
354 #define ScorePost_Reset_IMP LUCY_ScorePost_Reset_IMP
355 #define ScorePost_Make_Matcher_IMP LUCY_ScorePost_Make_Matcher_IMP
356 #define ScorePost_Get_Prox_IMP LUCY_ScorePost_Get_Prox_IMP
357 #define ScorePost_To_Host LUCY_ScorePost_To_Host
358 #define ScorePost_To_Host_t LUCY_ScorePost_To_Host_t
359 #define ScorePost_Clone LUCY_ScorePost_Clone
360 #define ScorePost_Clone_t LUCY_ScorePost_Clone_t
361 #define ScorePost_Equals LUCY_ScorePost_Equals
362 #define ScorePost_Equals_t LUCY_ScorePost_Equals_t
363 #define ScorePost_Compare_To LUCY_ScorePost_Compare_To
364 #define ScorePost_Compare_To_t LUCY_ScorePost_Compare_To_t
365 #define ScorePost_Destroy LUCY_ScorePost_Destroy
366 #define ScorePost_Destroy_t LUCY_ScorePost_Destroy_t
367 #define ScorePost_To_String LUCY_ScorePost_To_String
368 #define ScorePost_To_String_t LUCY_ScorePost_To_String_t
369 #define ScorePost_Reset LUCY_ScorePost_Reset
370 #define ScorePost_Reset_t LUCY_ScorePost_Reset_t
371 #define ScorePost_Write_Key_Frame LUCY_ScorePost_Write_Key_Frame
372 #define ScorePost_Write_Key_Frame_t LUCY_ScorePost_Write_Key_Frame_t
373 #define ScorePost_Write_Delta LUCY_ScorePost_Write_Delta
374 #define ScorePost_Write_Delta_t LUCY_ScorePost_Write_Delta_t
375 #define ScorePost_Read_Key_Frame LUCY_ScorePost_Read_Key_Frame
376 #define ScorePost_Read_Key_Frame_t LUCY_ScorePost_Read_Key_Frame_t
377 #define ScorePost_Read_Delta LUCY_ScorePost_Read_Delta
378 #define ScorePost_Read_Delta_t LUCY_ScorePost_Read_Delta_t
379 #define ScorePost_Read_Record LUCY_ScorePost_Read_Record
380 #define ScorePost_Read_Record_t LUCY_ScorePost_Read_Record_t
381 #define ScorePost_Read_Raw LUCY_ScorePost_Read_Raw
382 #define ScorePost_Read_Raw_t LUCY_ScorePost_Read_Raw_t
383 #define ScorePost_Add_Inversion_To_Pool LUCY_ScorePost_Add_Inversion_To_Pool
384 #define ScorePost_Add_Inversion_To_Pool_t LUCY_ScorePost_Add_Inversion_To_Pool_t
385 #define ScorePost_Set_Doc_ID LUCY_ScorePost_Set_Doc_ID
386 #define ScorePost_Set_Doc_ID_t LUCY_ScorePost_Set_Doc_ID_t
387 #define ScorePost_Get_Doc_ID LUCY_ScorePost_Get_Doc_ID
388 #define ScorePost_Get_Doc_ID_t LUCY_ScorePost_Get_Doc_ID_t
389 #define ScorePost_Make_Matcher LUCY_ScorePost_Make_Matcher
390 #define ScorePost_Make_Matcher_t LUCY_ScorePost_Make_Matcher_t
391 #define ScorePost_Get_Freq LUCY_ScorePost_Get_Freq
392 #define ScorePost_Get_Freq_t LUCY_ScorePost_Get_Freq_t
393 #define ScorePost_Get_Prox LUCY_ScorePost_Get_Prox
394 #define ScorePost_Get_Prox_t LUCY_ScorePost_Get_Prox_t
395 #endif /* LUCY_USE_SHORT_NAMES */
396  
397  
398  
399 /* Include the header for this class's parent.
400 */
401  
402 #include "Lucy/Search/TermMatcher.h"
403  
404 /* Define the struct layout for instances of this class.
405 */
406  
407 #ifdef C_LUCY_SCOREPOSTINGMATCHER
408 extern uint32_t lucy_ScorePostMatcher_IVARS_OFFSET;
409 typedef struct lucy_ScorePostingMatcherIVARS lucy_ScorePostingMatcherIVARS;
410 static CFISH_INLINE lucy_ScorePostingMatcherIVARS*
411 lucy_ScorePostMatcher_IVARS(lucy_ScorePostingMatcher *self) {
412 char *ptr = (char*)self + lucy_ScorePostMatcher_IVARS_OFFSET;
413 return (lucy_ScorePostingMatcherIVARS*)ptr;
414 }
415 #ifdef LUCY_USE_SHORT_NAMES
416 #define ScorePostingMatcherIVARS lucy_ScorePostingMatcherIVARS
417 #define ScorePostMatcher_IVARS lucy_ScorePostMatcher_IVARS
418 #endif
419  
420 struct lucy_ScorePostingMatcherIVARS {
421 float weight;
422 lucy_Compiler* compiler;
423 lucy_Similarity* sim;
424 lucy_PostingList* plist;
425 lucy_Posting* posting;
426 float* score_cache;
427 };
428  
429 #endif /* C_LUCY_SCOREPOSTINGMATCHER */
430  
431 /* Declare this class's inert variables.
432 */
433  
434  
435  
436 /* Declare both this class's inert functions and the C functions which
437 * implement this class's dynamic methods.
438 */
439  
440 LUCY_VISIBLE lucy_ScorePostingMatcher*
441 lucy_ScorePostMatcher_init(lucy_ScorePostingMatcher* self, lucy_Similarity* sim, lucy_PostingList* plist, lucy_Compiler* compiler);
442  
443 float
444 LUCY_ScorePostMatcher_Score_IMP(lucy_ScorePostingMatcher* self);
445  
446 void
447 LUCY_ScorePostMatcher_Destroy_IMP(lucy_ScorePostingMatcher* self);
448  
449  
450  
451 /* Define typedefs for each dynamic method, allowing us to cast generic
452 * pointers to the appropriate function pointer type more cleanly.
453 */
454  
455 typedef void*
456 (*LUCY_ScorePostMatcher_To_Host_t)(lucy_ScorePostingMatcher* self, void* vcache);
457  
458 typedef cfish_Obj*
459 (*LUCY_ScorePostMatcher_Clone_t)(lucy_ScorePostingMatcher* self);
460  
461 typedef bool
462 (*LUCY_ScorePostMatcher_Equals_t)(lucy_ScorePostingMatcher* self, cfish_Obj* other);
463  
464 typedef int32_t
465 (*LUCY_ScorePostMatcher_Compare_To_t)(lucy_ScorePostingMatcher* self, cfish_Obj* other);
466  
467 typedef void
468 (*LUCY_ScorePostMatcher_Destroy_t)(lucy_ScorePostingMatcher* self);
469  
470 typedef cfish_String*
471 (*LUCY_ScorePostMatcher_To_String_t)(lucy_ScorePostingMatcher* self);
472  
473 typedef int32_t
474 (*LUCY_ScorePostMatcher_Next_t)(lucy_ScorePostingMatcher* self);
475  
476 typedef int32_t
477 (*LUCY_ScorePostMatcher_Advance_t)(lucy_ScorePostingMatcher* self, int32_t target);
478  
479 typedef int32_t
480 (*LUCY_ScorePostMatcher_Get_Doc_ID_t)(lucy_ScorePostingMatcher* self);
481  
482 typedef float
483 (*LUCY_ScorePostMatcher_Score_t)(lucy_ScorePostingMatcher* self);
484  
485 typedef void
486 (*LUCY_ScorePostMatcher_Collect_t)(lucy_ScorePostingMatcher* self, lucy_Collector* collector, lucy_Matcher* deletions);
487  
488  
489  
490 /* Define type-safe wrappers for inert functions of Obj.
491 */
492  
493 static CFISH_INLINE cfish_Class*
494 lucy_ScorePostMatcher_get_class(lucy_ScorePostingMatcher *self) {
495 return cfish_Obj_get_class((cfish_Obj*)self);
496 }
497  
498 static CFISH_INLINE cfish_String*
499 lucy_ScorePostMatcher_get_class_name(lucy_ScorePostingMatcher *self) {
500 return cfish_Obj_get_class_name((cfish_Obj*)self);
501 }
502  
503 static CFISH_INLINE bool
504 lucy_ScorePostMatcher_is_a(lucy_ScorePostingMatcher *self, cfish_Class *ancestor) {
505 return cfish_Obj_is_a((cfish_Obj*)self, ancestor);
506 }
507  
508  
509 /* Define the inline functions which implement this class's virtual methods.
510 */
511  
512 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_To_Host_OFFSET;
513 static CFISH_INLINE void*
514 LUCY_ScorePostMatcher_To_Host(lucy_ScorePostingMatcher* self, void* vcache) {
515 const LUCY_ScorePostMatcher_To_Host_t method = (LUCY_ScorePostMatcher_To_Host_t)cfish_obj_method(self, LUCY_ScorePostMatcher_To_Host_OFFSET);
516 return method(self, vcache);
517 }
518  
519 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Clone_OFFSET;
520 static CFISH_INLINE cfish_Obj*
521 LUCY_ScorePostMatcher_Clone(lucy_ScorePostingMatcher* self) {
522 const LUCY_ScorePostMatcher_Clone_t method = (LUCY_ScorePostMatcher_Clone_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Clone_OFFSET);
523 return method(self);
524 }
525  
526 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Equals_OFFSET;
527 static CFISH_INLINE bool
528 LUCY_ScorePostMatcher_Equals(lucy_ScorePostingMatcher* self, cfish_Obj* other) {
529 const LUCY_ScorePostMatcher_Equals_t method = (LUCY_ScorePostMatcher_Equals_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Equals_OFFSET);
530 return method(self, other);
531 }
532  
533 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Compare_To_OFFSET;
534 static CFISH_INLINE int32_t
535 LUCY_ScorePostMatcher_Compare_To(lucy_ScorePostingMatcher* self, cfish_Obj* other) {
536 const LUCY_ScorePostMatcher_Compare_To_t method = (LUCY_ScorePostMatcher_Compare_To_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Compare_To_OFFSET);
537 return method(self, other);
538 }
539  
540 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Destroy_OFFSET;
541 static CFISH_INLINE void
542 LUCY_ScorePostMatcher_Destroy(lucy_ScorePostingMatcher* self) {
543 const LUCY_ScorePostMatcher_Destroy_t method = (LUCY_ScorePostMatcher_Destroy_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Destroy_OFFSET);
544 method(self);
545 }
546  
547 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_To_String_OFFSET;
548 static CFISH_INLINE cfish_String*
549 LUCY_ScorePostMatcher_To_String(lucy_ScorePostingMatcher* self) {
550 const LUCY_ScorePostMatcher_To_String_t method = (LUCY_ScorePostMatcher_To_String_t)cfish_obj_method(self, LUCY_ScorePostMatcher_To_String_OFFSET);
551 return method(self);
552 }
553  
554 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Next_OFFSET;
555 static CFISH_INLINE int32_t
556 LUCY_ScorePostMatcher_Next(lucy_ScorePostingMatcher* self) {
557 const LUCY_ScorePostMatcher_Next_t method = (LUCY_ScorePostMatcher_Next_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Next_OFFSET);
558 return method(self);
559 }
560  
561 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Advance_OFFSET;
562 static CFISH_INLINE int32_t
563 LUCY_ScorePostMatcher_Advance(lucy_ScorePostingMatcher* self, int32_t target) {
564 const LUCY_ScorePostMatcher_Advance_t method = (LUCY_ScorePostMatcher_Advance_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Advance_OFFSET);
565 return method(self, target);
566 }
567  
568 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Get_Doc_ID_OFFSET;
569 static CFISH_INLINE int32_t
570 LUCY_ScorePostMatcher_Get_Doc_ID(lucy_ScorePostingMatcher* self) {
571 const LUCY_ScorePostMatcher_Get_Doc_ID_t method = (LUCY_ScorePostMatcher_Get_Doc_ID_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Get_Doc_ID_OFFSET);
572 return method(self);
573 }
574  
575 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Score_OFFSET;
576 static CFISH_INLINE float
577 LUCY_ScorePostMatcher_Score(lucy_ScorePostingMatcher* self) {
578 const LUCY_ScorePostMatcher_Score_t method = (LUCY_ScorePostMatcher_Score_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Score_OFFSET);
579 return method(self);
580 }
581  
582 extern LUCY_VISIBLE uint32_t LUCY_ScorePostMatcher_Collect_OFFSET;
583 static CFISH_INLINE void
584 LUCY_ScorePostMatcher_Collect(lucy_ScorePostingMatcher* self, lucy_Collector* collector, lucy_Matcher* deletions) {
585 const LUCY_ScorePostMatcher_Collect_t method = (LUCY_ScorePostMatcher_Collect_t)cfish_obj_method(self, LUCY_ScorePostMatcher_Collect_OFFSET);
586 method(self, collector, deletions);
587 }
588  
589  
590  
591 /* Declare callbacks for wrapping host overrides.
592 */
593  
594 #ifdef CFISH_NO_DYNAMIC_OVERRIDES
595 #else
596 #endif
597  
598  
599 /* Define "short names" for this class's symbols.
600 */
601  
602 #ifdef LUCY_USE_SHORT_NAMES
603 #define ScorePostingMatcher lucy_ScorePostingMatcher
604 #define SCOREPOSTINGMATCHER LUCY_SCOREPOSTINGMATCHER
605 #define ScorePostMatcher_init lucy_ScorePostMatcher_init
606 #define ScorePostMatcher_get_class lucy_ScorePostMatcher_get_class
607 #define ScorePostMatcher_get_class_name lucy_ScorePostMatcher_get_class_name
608 #define ScorePostMatcher_is_a lucy_ScorePostMatcher_is_a
609 #define ScorePostMatcher_Score_IMP LUCY_ScorePostMatcher_Score_IMP
610 #define ScorePostMatcher_Destroy_IMP LUCY_ScorePostMatcher_Destroy_IMP
611 #define ScorePostMatcher_To_Host LUCY_ScorePostMatcher_To_Host
612 #define ScorePostMatcher_To_Host_t LUCY_ScorePostMatcher_To_Host_t
613 #define ScorePostMatcher_Clone LUCY_ScorePostMatcher_Clone
614 #define ScorePostMatcher_Clone_t LUCY_ScorePostMatcher_Clone_t
615 #define ScorePostMatcher_Equals LUCY_ScorePostMatcher_Equals
616 #define ScorePostMatcher_Equals_t LUCY_ScorePostMatcher_Equals_t
617 #define ScorePostMatcher_Compare_To LUCY_ScorePostMatcher_Compare_To
618 #define ScorePostMatcher_Compare_To_t LUCY_ScorePostMatcher_Compare_To_t
619 #define ScorePostMatcher_Destroy LUCY_ScorePostMatcher_Destroy
620 #define ScorePostMatcher_Destroy_t LUCY_ScorePostMatcher_Destroy_t
621 #define ScorePostMatcher_To_String LUCY_ScorePostMatcher_To_String
622 #define ScorePostMatcher_To_String_t LUCY_ScorePostMatcher_To_String_t
623 #define ScorePostMatcher_Next LUCY_ScorePostMatcher_Next
624 #define ScorePostMatcher_Next_t LUCY_ScorePostMatcher_Next_t
625 #define ScorePostMatcher_Advance LUCY_ScorePostMatcher_Advance
626 #define ScorePostMatcher_Advance_t LUCY_ScorePostMatcher_Advance_t
627 #define ScorePostMatcher_Get_Doc_ID LUCY_ScorePostMatcher_Get_Doc_ID
628 #define ScorePostMatcher_Get_Doc_ID_t LUCY_ScorePostMatcher_Get_Doc_ID_t
629 #define ScorePostMatcher_Score LUCY_ScorePostMatcher_Score
630 #define ScorePostMatcher_Score_t LUCY_ScorePostMatcher_Score_t
631 #define ScorePostMatcher_Collect LUCY_ScorePostMatcher_Collect
632 #define ScorePostMatcher_Collect_t LUCY_ScorePostMatcher_Collect_t
633 #endif /* LUCY_USE_SHORT_NAMES */
634  
635  
636  
637  
638  
639 #ifdef __cplusplus
640 }
641 #endif
642  
643 #endif /* H_LUCY_INDEX_POSTING_SCOREPOSTING */
644  
645  
646  
647  
« autogen/include/Lucy/Index/Indexer.h ↑ Summary autogen/include/Lucy/Index/Similarity.h »