File Coverage

autogen/include/Lucy/Simple.h
Criterion Covered Total %
statement 4 4 100.0
branch n/a
condition n/a
subroutine n/a
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1            
2            
3            

perltidy

4            
 
5             /* * *********************************************** * * !!!! DO NOT EDIT !!!! * * This file was auto-generated by Build.PL. * * *********************************************** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef H_LUCY_SIMPLE #define H_LUCY_SIMPLE 1 #ifdef __cplusplus extern "C" { #endif #include "lucy_parcel.h" /* Include the header for this class's parent. */ #include "Clownfish/Obj.h" /* Define the struct layout for instances of this class. */ #ifdef C_LUCY_SIMPLE extern uint32_t lucy_Simple_IVARS_OFFSET; typedef struct lucy_SimpleIVARS lucy_SimpleIVARS; static CFISH_INLINE lucy_SimpleIVARS* lucy_Simple_IVARS(lucy_Simple *self) { char *ptr = (char*)self + lucy_Simple_IVARS_OFFSET; return (lucy_SimpleIVARS*)ptr; } #ifdef LUCY_USE_SHORT_NAMES #define SimpleIVARS lucy_SimpleIVARS #define Simple_IVARS lucy_Simple_IVARS #endif struct lucy_SimpleIVARS { cfish_Obj* index; cfish_String* language; lucy_Schema* schema; lucy_FieldType* type; lucy_Indexer* indexer; lucy_IndexSearcher* searcher; lucy_Hits* hits; }; #endif /* C_LUCY_SIMPLE */ /* Declare this class's inert variables. */ /* Declare both this class's inert functions and the C functions which * implement this class's dynamic methods. */ LUCY_VISIBLE lucy_Simple* lucy_Simple_new(cfish_Obj* path, cfish_String* language); LUCY_VISIBLE lucy_Simple* lucy_Simple_init(lucy_Simple* self, cfish_Obj* path, cfish_String* language); void LUCY_Simple_Add_Doc_IMP(lucy_Simple* self, lucy_Doc* doc); uint32_t LUCY_Simple_Search_IMP(lucy_Simple* self, cfish_String* query, uint32_t offset, uint32_t num_wanted, lucy_SortSpec* sort_spec); lucy_HitDoc* LUCY_Simple_Next_IMP(lucy_Simple* self); lucy_Indexer* LUCY_Simple_Get_Indexer_IMP(lucy_Simple* self); lucy_Hits* LUCY_Simple_Get_Hits_IMP(lucy_Simple* self); void LUCY_Simple_Finish_Indexing_IMP(lucy_Simple* self); void LUCY_Simple_Destroy_IMP(lucy_Simple* self); /* Define typedefs for each dynamic method, allowing us to cast generic * pointers to the appropriate function pointer type more cleanly. */ typedef void* (*LUCY_Simple_To_Host_t)(lucy_Simple* self, void* vcache); typedef cfish_Obj* (*LUCY_Simple_Clone_t)(lucy_Simple* self); typedef bool (*LUCY_Simple_Equals_t)(lucy_Simple* self, cfish_Obj* other); typedef int32_t (*LUCY_Simple_Compare_To_t)(lucy_Simple* self, cfish_Obj* other); typedef void (*LUCY_Simple_Destroy_t)(lucy_Simple* self); typedef cfish_String* (*LUCY_Simple_To_String_t)(lucy_Simple* self); typedef void (*LUCY_Simple_Add_Doc_t)(lucy_Simple* self, lucy_Doc* doc); typedef uint32_t (*LUCY_Simple_Search_t)(lucy_Simple* self, cfish_String* query, uint32_t offset, uint32_t num_wanted, lucy_SortSpec* sort_spec); typedef lucy_HitDoc* (*LUCY_Simple_Next_t)(lucy_Simple* self); typedef lucy_Indexer* (*LUCY_Simple_Get_Indexer_t)(lucy_Simple* self); typedef lucy_Hits* (*LUCY_Simple_Get_Hits_t)(lucy_Simple* self); typedef void (*LUCY_Simple_Finish_Indexing_t)(lucy_Simple* self); /* Define type-safe wrappers for inert functions of Obj. */ static CFISH_INLINE cfish_Class* lucy_Simple_get_class(lucy_Simple *self) { return cfish_Obj_get_class((cfish_Obj*)self); } static CFISH_INLINE cfish_String* lucy_Simple_get_class_name(lucy_Simple *self) { return cfish_Obj_get_class_name((cfish_Obj*)self); } static CFISH_INLINE bool lucy_Simple_is_a(lucy_Simple *self, cfish_Class *ancestor) { return cfish_Obj_is_a((cfish_Obj*)self, ancestor); } /* Define the inline functions which implement this class's virtual methods. */ extern LUCY_VISIBLE uint32_t LUCY_Simple_To_Host_OFFSET; static CFISH_INLINE void* LUCY_Simple_To_Host(lucy_Simple* self, void* vcache) { const LUCY_Simple_To_Host_t method = (LUCY_Simple_To_Host_t)cfish_obj_method(self, LUCY_Simple_To_Host_OFFSET); return method(self, vcache); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Clone_OFFSET; static CFISH_INLINE cfish_Obj* LUCY_Simple_Clone(lucy_Simple* self) { const LUCY_Simple_Clone_t method = (LUCY_Simple_Clone_t)cfish_obj_method(self, LUCY_Simple_Clone_OFFSET); return method(self); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Equals_OFFSET; static CFISH_INLINE bool LUCY_Simple_Equals(lucy_Simple* self, cfish_Obj* other) { const LUCY_Simple_Equals_t method = (LUCY_Simple_Equals_t)cfish_obj_method(self, LUCY_Simple_Equals_OFFSET); return method(self, other); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Compare_To_OFFSET; static CFISH_INLINE int32_t LUCY_Simple_Compare_To(lucy_Simple* self, cfish_Obj* other) { const LUCY_Simple_Compare_To_t method = (LUCY_Simple_Compare_To_t)cfish_obj_method(self, LUCY_Simple_Compare_To_OFFSET); return method(self, other); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Destroy_OFFSET; static CFISH_INLINE void LUCY_Simple_Destroy(lucy_Simple* self) { const LUCY_Simple_Destroy_t method = (LUCY_Simple_Destroy_t)cfish_obj_method(self, LUCY_Simple_Destroy_OFFSET); method(self); } extern LUCY_VISIBLE uint32_t LUCY_Simple_To_String_OFFSET; static CFISH_INLINE cfish_String* LUCY_Simple_To_String(lucy_Simple* self) { const LUCY_Simple_To_String_t method = (LUCY_Simple_To_String_t)cfish_obj_method(self, LUCY_Simple_To_String_OFFSET); return method(self); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Add_Doc_OFFSET; static CFISH_INLINE void LUCY_Simple_Add_Doc(lucy_Simple* self, lucy_Doc* doc) { const LUCY_Simple_Add_Doc_t method = (LUCY_Simple_Add_Doc_t)cfish_obj_method(self, LUCY_Simple_Add_Doc_OFFSET); method(self, doc); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Search_OFFSET; static CFISH_INLINE uint32_t LUCY_Simple_Search(lucy_Simple* self, cfish_String* query, uint32_t offset, uint32_t num_wanted, lucy_SortSpec* sort_spec) { const LUCY_Simple_Search_t method = (LUCY_Simple_Search_t)cfish_obj_method(self, LUCY_Simple_Search_OFFSET); return method(self, query, offset, num_wanted, sort_spec); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Next_OFFSET; static CFISH_INLINE lucy_HitDoc* LUCY_Simple_Next(lucy_Simple* self) { const LUCY_Simple_Next_t method = (LUCY_Simple_Next_t)cfish_obj_method(self, LUCY_Simple_Next_OFFSET); return method(self); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Get_Indexer_OFFSET; static CFISH_INLINE lucy_Indexer* LUCY_Simple_Get_Indexer(lucy_Simple* self) { const LUCY_Simple_Get_Indexer_t method = (LUCY_Simple_Get_Indexer_t)cfish_obj_method(self, LUCY_Simple_Get_Indexer_OFFSET); return method(self); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Get_Hits_OFFSET; static CFISH_INLINE lucy_Hits* LUCY_Simple_Get_Hits(lucy_Simple* self) { const LUCY_Simple_Get_Hits_t method = (LUCY_Simple_Get_Hits_t)cfish_obj_method(self, LUCY_Simple_Get_Hits_OFFSET); return method(self); } extern LUCY_VISIBLE uint32_t LUCY_Simple_Finish_Indexing_OFFSET; static CFISH_INLINE void LUCY_Simple_Finish_Indexing(lucy_Simple* self) { const LUCY_Simple_Finish_Indexing_t method = (LUCY_Simple_Finish_Indexing_t)cfish_obj_method(self, LUCY_Simple_Finish_Indexing_OFFSET); method(self); } /* Declare callbacks for wrapping host overrides. */ #ifdef CFISH_NO_DYNAMIC_OVERRIDES #define Lucy_Simple_Add_Doc_OVERRIDE NULL #define Lucy_Simple_Search_OVERRIDE NULL #define Lucy_Simple_Next_OVERRIDE NULL #define Lucy_Simple_Get_Indexer_OVERRIDE NULL #define Lucy_Simple_Get_Hits_OVERRIDE NULL #define Lucy_Simple_Finish_Indexing_OVERRIDE NULL #else void Lucy_Simple_Add_Doc_OVERRIDE(lucy_Simple* self, lucy_Doc* doc); uint32_t Lucy_Simple_Search_OVERRIDE(lucy_Simple* self, cfish_String* query, uint32_t offset, uint32_t num_wanted, lucy_SortSpec* sort_spec); lucy_HitDoc* Lucy_Simple_Next_OVERRIDE(lucy_Simple* self); lucy_Indexer* Lucy_Simple_Get_Indexer_OVERRIDE(lucy_Simple* self); lucy_Hits* Lucy_Simple_Get_Hits_OVERRIDE(lucy_Simple* self); void Lucy_Simple_Finish_Indexing_OVERRIDE(lucy_Simple* self); #endif /* Define "short names" for this class's symbols. */ #ifdef LUCY_USE_SHORT_NAMES #define Simple lucy_Simple #define SIMPLE LUCY_SIMPLE #define Simple_new lucy_Simple_new #define Simple_init lucy_Simple_init #define Simple_get_class lucy_Simple_get_class #define Simple_get_class_name lucy_Simple_get_class_name #define Simple_is_a lucy_Simple_is_a #define Simple_Add_Doc_IMP LUCY_Simple_Add_Doc_IMP #define Simple_Search_IMP LUCY_Simple_Search_IMP #define Simple_Next_IMP LUCY_Simple_Next_IMP #define Simple_Get_Indexer_IMP LUCY_Simple_Get_Indexer_IMP #define Simple_Get_Hits_IMP LUCY_Simple_Get_Hits_IMP #define Simple_Finish_Indexing_IMP LUCY_Simple_Finish_Indexing_IMP #define Simple_Destroy_IMP LUCY_Simple_Destroy_IMP #define Simple_To_Host LUCY_Simple_To_Host #define Simple_To_Host_t LUCY_Simple_To_Host_t #define Simple_Clone LUCY_Simple_Clone #define Simple_Clone_t LUCY_Simple_Clone_t #define Simple_Equals LUCY_Simple_Equals #define Simple_Equals_t LUCY_Simple_Equals_t #define Simple_Compare_To LUCY_Simple_Compare_To #define Simple_Compare_To_t LUCY_Simple_Compare_To_t #define Simple_Destroy LUCY_Simple_Destroy #define Simple_Destroy_t LUCY_Simple_Destroy_t #define Simple_To_String LUCY_Simple_To_String #define Simple_To_String_t LUCY_Simple_To_String_t #define Simple_Add_Doc LUCY_Simple_Add_Doc #define Simple_Add_Doc_t LUCY_Simple_Add_Doc_t #define Simple_Search LUCY_Simple_Search #define Simple_Search_t LUCY_Simple_Search_t #define Simple_Next LUCY_Simple_Next #define Simple_Next_t LUCY_Simple_Next_t #define Simple_Get_Indexer LUCY_Simple_Get_Indexer #define Simple_Get_Indexer_t LUCY_Simple_Get_Indexer_t #define Simple_Get_Hits LUCY_Simple_Get_Hits #define Simple_Get_Hits_t LUCY_Simple_Get_Hits_t #define Simple_Finish_Indexing LUCY_Simple_Finish_Indexing #define Simple_Finish_Indexing_t LUCY_Simple_Finish_Indexing_t #endif /* LUCY_USE_SHORT_NAMES */ #ifdef __cplusplus } #endif #endif /* H_LUCY_SIMPLE */