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_INDEX_SORTCACHE
#define H_LUCY_INDEX_SORTCACHE 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_SORTCACHE
extern uint32_t lucy_SortCache_IVARS_OFFSET;
typedef struct lucy_SortCacheIVARS lucy_SortCacheIVARS;
static CFISH_INLINE lucy_SortCacheIVARS*
lucy_SortCache_IVARS(lucy_SortCache *self) {
char *ptr = (char*)self + lucy_SortCache_IVARS_OFFSET;
return (lucy_SortCacheIVARS*)ptr;
}
#ifdef LUCY_USE_SHORT_NAMES
#define SortCacheIVARS lucy_SortCacheIVARS
#define SortCache_IVARS lucy_SortCache_IVARS
#endif
struct lucy_SortCacheIVARS {
cfish_String* field;
lucy_FieldType* type;
const void* ords;
int32_t doc_max;
int32_t cardinality;
int32_t ord_width;
int32_t null_ord;
bool native_ords;
};
#endif /* C_LUCY_SORTCACHE */
/* 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_SortCache*
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);
cfish_Obj*
LUCY_SortCache_Value_IMP(lucy_SortCache* self, int32_t ord);
const void*
LUCY_SortCache_Get_Ords_IMP(lucy_SortCache* self);
int32_t
LUCY_SortCache_Get_Cardinality_IMP(lucy_SortCache* self);
int32_t
LUCY_SortCache_Get_Ord_Width_IMP(lucy_SortCache* self);
int32_t
LUCY_SortCache_Get_Null_Ord_IMP(lucy_SortCache* self);
int32_t
LUCY_SortCache_Ordinal_IMP(lucy_SortCache* self, int32_t doc_id);
int32_t
LUCY_SortCache_Find_IMP(lucy_SortCache* self, cfish_Obj* term);
void
LUCY_SortCache_Set_Native_Ords_IMP(lucy_SortCache* self, bool native_ords);
bool
LUCY_SortCache_Get_Native_Ords_IMP(lucy_SortCache* self);
void
LUCY_SortCache_Destroy_IMP(lucy_SortCache* self);
/* Define typedefs for each dynamic method, allowing us to cast generic
* pointers to the appropriate function pointer type more cleanly.
*/
typedef void*
(*LUCY_SortCache_To_Host_t)(lucy_SortCache* self, void* vcache);
typedef cfish_Obj*
(*LUCY_SortCache_Clone_t)(lucy_SortCache* self);
typedef bool
(*LUCY_SortCache_Equals_t)(lucy_SortCache* self, cfish_Obj* other);
typedef int32_t
(*LUCY_SortCache_Compare_To_t)(lucy_SortCache* self, cfish_Obj* other);
typedef void
(*LUCY_SortCache_Destroy_t)(lucy_SortCache* self);
typedef cfish_String*
(*LUCY_SortCache_To_String_t)(lucy_SortCache* self);
typedef cfish_Obj*
(*LUCY_SortCache_Value_t)(lucy_SortCache* self, int32_t ord);
typedef const void*
(*LUCY_SortCache_Get_Ords_t)(lucy_SortCache* self);
typedef int32_t
(*LUCY_SortCache_Get_Cardinality_t)(lucy_SortCache* self);
typedef int32_t
(*LUCY_SortCache_Get_Ord_Width_t)(lucy_SortCache* self);
typedef int32_t
(*LUCY_SortCache_Get_Null_Ord_t)(lucy_SortCache* self);
typedef int32_t
(*LUCY_SortCache_Ordinal_t)(lucy_SortCache* self, int32_t doc_id);
typedef int32_t
(*LUCY_SortCache_Find_t)(lucy_SortCache* self, cfish_Obj* term);
typedef void
(*LUCY_SortCache_Set_Native_Ords_t)(lucy_SortCache* self, bool native_ords);
typedef bool
(*LUCY_SortCache_Get_Native_Ords_t)(lucy_SortCache* self);
/* Define type-safe wrappers for inert functions of Obj.
*/
static CFISH_INLINE cfish_Class*
lucy_SortCache_get_class(lucy_SortCache *self) {
return cfish_Obj_get_class((cfish_Obj*)self);
}
static CFISH_INLINE cfish_String*
lucy_SortCache_get_class_name(lucy_SortCache *self) {
return cfish_Obj_get_class_name((cfish_Obj*)self);
}
static CFISH_INLINE bool
lucy_SortCache_is_a(lucy_SortCache *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_SortCache_To_Host_OFFSET;
static CFISH_INLINE void*
LUCY_SortCache_To_Host(lucy_SortCache* self, void* vcache) {
const LUCY_SortCache_To_Host_t method = (LUCY_SortCache_To_Host_t)cfish_obj_method(self, LUCY_SortCache_To_Host_OFFSET);
return method(self, vcache);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Clone_OFFSET;
static CFISH_INLINE cfish_Obj*
LUCY_SortCache_Clone(lucy_SortCache* self) {
const LUCY_SortCache_Clone_t method = (LUCY_SortCache_Clone_t)cfish_obj_method(self, LUCY_SortCache_Clone_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Equals_OFFSET;
static CFISH_INLINE bool
LUCY_SortCache_Equals(lucy_SortCache* self, cfish_Obj* other) {
const LUCY_SortCache_Equals_t method = (LUCY_SortCache_Equals_t)cfish_obj_method(self, LUCY_SortCache_Equals_OFFSET);
return method(self, other);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Compare_To_OFFSET;
static CFISH_INLINE int32_t
LUCY_SortCache_Compare_To(lucy_SortCache* self, cfish_Obj* other) {
const LUCY_SortCache_Compare_To_t method = (LUCY_SortCache_Compare_To_t)cfish_obj_method(self, LUCY_SortCache_Compare_To_OFFSET);
return method(self, other);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Destroy_OFFSET;
static CFISH_INLINE void
LUCY_SortCache_Destroy(lucy_SortCache* self) {
const LUCY_SortCache_Destroy_t method = (LUCY_SortCache_Destroy_t)cfish_obj_method(self, LUCY_SortCache_Destroy_OFFSET);
method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_To_String_OFFSET;
static CFISH_INLINE cfish_String*
LUCY_SortCache_To_String(lucy_SortCache* self) {
const LUCY_SortCache_To_String_t method = (LUCY_SortCache_To_String_t)cfish_obj_method(self, LUCY_SortCache_To_String_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Value_OFFSET;
static CFISH_INLINE cfish_Obj*
LUCY_SortCache_Value(lucy_SortCache* self, int32_t ord) {
const LUCY_SortCache_Value_t method = (LUCY_SortCache_Value_t)cfish_obj_method(self, LUCY_SortCache_Value_OFFSET);
return method(self, ord);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Ords_OFFSET;
static CFISH_INLINE const void*
LUCY_SortCache_Get_Ords(lucy_SortCache* self) {
const LUCY_SortCache_Get_Ords_t method = (LUCY_SortCache_Get_Ords_t)cfish_obj_method(self, LUCY_SortCache_Get_Ords_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Cardinality_OFFSET;
static CFISH_INLINE int32_t
LUCY_SortCache_Get_Cardinality(lucy_SortCache* self) {
const LUCY_SortCache_Get_Cardinality_t method = (LUCY_SortCache_Get_Cardinality_t)cfish_obj_method(self, LUCY_SortCache_Get_Cardinality_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Ord_Width_OFFSET;
static CFISH_INLINE int32_t
LUCY_SortCache_Get_Ord_Width(lucy_SortCache* self) {
const LUCY_SortCache_Get_Ord_Width_t method = (LUCY_SortCache_Get_Ord_Width_t)cfish_obj_method(self, LUCY_SortCache_Get_Ord_Width_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Null_Ord_OFFSET;
static CFISH_INLINE int32_t
LUCY_SortCache_Get_Null_Ord(lucy_SortCache* self) {
const LUCY_SortCache_Get_Null_Ord_t method = (LUCY_SortCache_Get_Null_Ord_t)cfish_obj_method(self, LUCY_SortCache_Get_Null_Ord_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Ordinal_OFFSET;
static CFISH_INLINE int32_t
LUCY_SortCache_Ordinal(lucy_SortCache* self, int32_t doc_id) {
const LUCY_SortCache_Ordinal_t method = (LUCY_SortCache_Ordinal_t)cfish_obj_method(self, LUCY_SortCache_Ordinal_OFFSET);
return method(self, doc_id);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Find_OFFSET;
static CFISH_INLINE int32_t
LUCY_SortCache_Find(lucy_SortCache* self, cfish_Obj* term) {
const LUCY_SortCache_Find_t method = (LUCY_SortCache_Find_t)cfish_obj_method(self, LUCY_SortCache_Find_OFFSET);
return method(self, term);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Set_Native_Ords_OFFSET;
static CFISH_INLINE void
LUCY_SortCache_Set_Native_Ords(lucy_SortCache* self, bool native_ords) {
const LUCY_SortCache_Set_Native_Ords_t method = (LUCY_SortCache_Set_Native_Ords_t)cfish_obj_method(self, LUCY_SortCache_Set_Native_Ords_OFFSET);
method(self, native_ords);
}
extern LUCY_VISIBLE uint32_t LUCY_SortCache_Get_Native_Ords_OFFSET;
static CFISH_INLINE bool
LUCY_SortCache_Get_Native_Ords(lucy_SortCache* self) {
const LUCY_SortCache_Get_Native_Ords_t method = (LUCY_SortCache_Get_Native_Ords_t)cfish_obj_method(self, LUCY_SortCache_Get_Native_Ords_OFFSET);
return method(self);
}
/* Declare callbacks for wrapping host overrides.
*/
#ifdef CFISH_NO_DYNAMIC_OVERRIDES
#define Lucy_SortCache_Value_OVERRIDE NULL
#define Lucy_SortCache_Get_Ords_OVERRIDE NULL
#define Lucy_SortCache_Get_Cardinality_OVERRIDE NULL
#define Lucy_SortCache_Get_Ord_Width_OVERRIDE NULL
#define Lucy_SortCache_Get_Null_Ord_OVERRIDE NULL
#define Lucy_SortCache_Ordinal_OVERRIDE NULL
#define Lucy_SortCache_Find_OVERRIDE NULL
#define Lucy_SortCache_Set_Native_Ords_OVERRIDE NULL
#define Lucy_SortCache_Get_Native_Ords_OVERRIDE NULL
#else
cfish_Obj*
Lucy_SortCache_Value_OVERRIDE(lucy_SortCache* self, int32_t ord);
const void*
Lucy_SortCache_Get_Ords_OVERRIDE(lucy_SortCache* self);
int32_t
Lucy_SortCache_Get_Cardinality_OVERRIDE(lucy_SortCache* self);
int32_t
Lucy_SortCache_Get_Ord_Width_OVERRIDE(lucy_SortCache* self);
int32_t
Lucy_SortCache_Get_Null_Ord_OVERRIDE(lucy_SortCache* self);
int32_t
Lucy_SortCache_Ordinal_OVERRIDE(lucy_SortCache* self, int32_t doc_id);
int32_t
Lucy_SortCache_Find_OVERRIDE(lucy_SortCache* self, cfish_Obj* term);
void
Lucy_SortCache_Set_Native_Ords_OVERRIDE(lucy_SortCache* self, bool native_ords);
bool
Lucy_SortCache_Get_Native_Ords_OVERRIDE(lucy_SortCache* self);
#endif
/* Define "short names" for this class's symbols.
*/
#ifdef LUCY_USE_SHORT_NAMES
#define SortCache lucy_SortCache
#define SORTCACHE LUCY_SORTCACHE
#define SortCache_init lucy_SortCache_init
#define SortCache_get_class lucy_SortCache_get_class
#define SortCache_get_class_name lucy_SortCache_get_class_name
#define SortCache_is_a lucy_SortCache_is_a
#define SortCache_Value_IMP LUCY_SortCache_Value_IMP
#define SortCache_Get_Ords_IMP LUCY_SortCache_Get_Ords_IMP
#define SortCache_Get_Cardinality_IMP LUCY_SortCache_Get_Cardinality_IMP
#define SortCache_Get_Ord_Width_IMP LUCY_SortCache_Get_Ord_Width_IMP
#define SortCache_Get_Null_Ord_IMP LUCY_SortCache_Get_Null_Ord_IMP
#define SortCache_Ordinal_IMP LUCY_SortCache_Ordinal_IMP
#define SortCache_Find_IMP LUCY_SortCache_Find_IMP
#define SortCache_Set_Native_Ords_IMP LUCY_SortCache_Set_Native_Ords_IMP
#define SortCache_Get_Native_Ords_IMP LUCY_SortCache_Get_Native_Ords_IMP
#define SortCache_Destroy_IMP LUCY_SortCache_Destroy_IMP
#define SortCache_To_Host LUCY_SortCache_To_Host
#define SortCache_To_Host_t LUCY_SortCache_To_Host_t
#define SortCache_Clone LUCY_SortCache_Clone
#define SortCache_Clone_t LUCY_SortCache_Clone_t
#define SortCache_Equals LUCY_SortCache_Equals
#define SortCache_Equals_t LUCY_SortCache_Equals_t
#define SortCache_Compare_To LUCY_SortCache_Compare_To
#define SortCache_Compare_To_t LUCY_SortCache_Compare_To_t
#define SortCache_Destroy LUCY_SortCache_Destroy
#define SortCache_Destroy_t LUCY_SortCache_Destroy_t
#define SortCache_To_String LUCY_SortCache_To_String
#define SortCache_To_String_t LUCY_SortCache_To_String_t
#define SortCache_Value LUCY_SortCache_Value
#define SortCache_Value_t LUCY_SortCache_Value_t
#define SortCache_Get_Ords LUCY_SortCache_Get_Ords
#define SortCache_Get_Ords_t LUCY_SortCache_Get_Ords_t
#define SortCache_Get_Cardinality LUCY_SortCache_Get_Cardinality
#define SortCache_Get_Cardinality_t LUCY_SortCache_Get_Cardinality_t
#define SortCache_Get_Ord_Width LUCY_SortCache_Get_Ord_Width
#define SortCache_Get_Ord_Width_t LUCY_SortCache_Get_Ord_Width_t
#define SortCache_Get_Null_Ord LUCY_SortCache_Get_Null_Ord
#define SortCache_Get_Null_Ord_t LUCY_SortCache_Get_Null_Ord_t
#define SortCache_Ordinal LUCY_SortCache_Ordinal
#define SortCache_Ordinal_t LUCY_SortCache_Ordinal_t
#define SortCache_Find LUCY_SortCache_Find
#define SortCache_Find_t LUCY_SortCache_Find_t
#define SortCache_Set_Native_Ords LUCY_SortCache_Set_Native_Ords
#define SortCache_Set_Native_Ords_t LUCY_SortCache_Set_Native_Ords_t
#define SortCache_Get_Native_Ords LUCY_SortCache_Get_Native_Ords
#define SortCache_Get_Native_Ords_t LUCY_SortCache_Get_Native_Ords_t
#endif /* LUCY_USE_SHORT_NAMES */
#ifdef __cplusplus
}
#endif
#endif /* H_LUCY_INDEX_SORTCACHE */
|