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_DOCUMENT_DOC
#define H_LUCY_DOCUMENT_DOC 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_DOC
extern uint32_t lucy_Doc_IVARS_OFFSET;
typedef struct lucy_DocIVARS lucy_DocIVARS;
static CFISH_INLINE lucy_DocIVARS*
lucy_Doc_IVARS(lucy_Doc *self) {
char *ptr = (char*)self + lucy_Doc_IVARS_OFFSET;
return (lucy_DocIVARS*)ptr;
}
#ifdef LUCY_USE_SHORT_NAMES
#define DocIVARS lucy_DocIVARS
#define Doc_IVARS lucy_Doc_IVARS
#endif
struct lucy_DocIVARS {
void* fields;
int32_t doc_id;
};
#endif /* C_LUCY_DOC */
/* 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_Doc*
lucy_Doc_new(void* fields, int32_t doc_id);
LUCY_VISIBLE lucy_Doc*
lucy_Doc_init(lucy_Doc* self, void* fields, int32_t doc_id);
void
LUCY_Doc_Set_Doc_ID_IMP(lucy_Doc* self, int32_t doc_id);
int32_t
LUCY_Doc_Get_Doc_ID_IMP(lucy_Doc* self);
void
LUCY_Doc_Store_IMP(lucy_Doc* self, cfish_String* field, cfish_Obj* value);
void
LUCY_Doc_Set_Fields_IMP(lucy_Doc* self, void* fields);
void*
LUCY_Doc_Get_Fields_IMP(lucy_Doc* self);
uint32_t
LUCY_Doc_Get_Size_IMP(lucy_Doc* self);
cfish_Obj*
LUCY_Doc_Extract_IMP(lucy_Doc* self, cfish_String* field);
cfish_Vector*
LUCY_Doc_Field_Names_IMP(lucy_Doc* self);
bool
LUCY_Doc_Equals_IMP(lucy_Doc* self, cfish_Obj* other);
void
LUCY_Doc_Serialize_IMP(lucy_Doc* self, lucy_OutStream* outstream);
lucy_Doc*
LUCY_Doc_Deserialize_IMP(lucy_Doc* self, lucy_InStream* instream);
cfish_Hash*
LUCY_Doc_Dump_IMP(lucy_Doc* self);
lucy_Doc*
LUCY_Doc_Load_IMP(lucy_Doc* self, cfish_Obj* dump);
void
LUCY_Doc_Destroy_IMP(lucy_Doc* self);
/* Define typedefs for each dynamic method, allowing us to cast generic
* pointers to the appropriate function pointer type more cleanly.
*/
typedef void*
(*LUCY_Doc_To_Host_t)(lucy_Doc* self, void* vcache);
typedef cfish_Obj*
(*LUCY_Doc_Clone_t)(lucy_Doc* self);
typedef bool
(*LUCY_Doc_Equals_t)(lucy_Doc* self, cfish_Obj* other);
typedef int32_t
(*LUCY_Doc_Compare_To_t)(lucy_Doc* self, cfish_Obj* other);
typedef void
(*LUCY_Doc_Destroy_t)(lucy_Doc* self);
typedef cfish_String*
(*LUCY_Doc_To_String_t)(lucy_Doc* self);
typedef void
(*LUCY_Doc_Set_Doc_ID_t)(lucy_Doc* self, int32_t doc_id);
typedef int32_t
(*LUCY_Doc_Get_Doc_ID_t)(lucy_Doc* self);
typedef void
(*LUCY_Doc_Store_t)(lucy_Doc* self, cfish_String* field, cfish_Obj* value);
typedef void
(*LUCY_Doc_Set_Fields_t)(lucy_Doc* self, void* fields);
typedef void*
(*LUCY_Doc_Get_Fields_t)(lucy_Doc* self);
typedef uint32_t
(*LUCY_Doc_Get_Size_t)(lucy_Doc* self);
typedef cfish_Obj*
(*LUCY_Doc_Extract_t)(lucy_Doc* self, cfish_String* field);
typedef cfish_Vector*
(*LUCY_Doc_Field_Names_t)(lucy_Doc* self);
typedef void
(*LUCY_Doc_Serialize_t)(lucy_Doc* self, lucy_OutStream* outstream);
typedef lucy_Doc*
(*LUCY_Doc_Deserialize_t)(lucy_Doc* self, lucy_InStream* instream);
typedef cfish_Hash*
(*LUCY_Doc_Dump_t)(lucy_Doc* self);
typedef lucy_Doc*
(*LUCY_Doc_Load_t)(lucy_Doc* self, cfish_Obj* dump);
/* Define type-safe wrappers for inert functions of Obj.
*/
static CFISH_INLINE cfish_Class*
lucy_Doc_get_class(lucy_Doc *self) {
return cfish_Obj_get_class((cfish_Obj*)self);
}
static CFISH_INLINE cfish_String*
lucy_Doc_get_class_name(lucy_Doc *self) {
return cfish_Obj_get_class_name((cfish_Obj*)self);
}
static CFISH_INLINE bool
lucy_Doc_is_a(lucy_Doc *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_Doc_To_Host_OFFSET;
static CFISH_INLINE void*
LUCY_Doc_To_Host(lucy_Doc* self, void* vcache) {
const LUCY_Doc_To_Host_t method = (LUCY_Doc_To_Host_t)cfish_obj_method(self, LUCY_Doc_To_Host_OFFSET);
return method(self, vcache);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Clone_OFFSET;
static CFISH_INLINE cfish_Obj*
LUCY_Doc_Clone(lucy_Doc* self) {
const LUCY_Doc_Clone_t method = (LUCY_Doc_Clone_t)cfish_obj_method(self, LUCY_Doc_Clone_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Equals_OFFSET;
static CFISH_INLINE bool
LUCY_Doc_Equals(lucy_Doc* self, cfish_Obj* other) {
const LUCY_Doc_Equals_t method = (LUCY_Doc_Equals_t)cfish_obj_method(self, LUCY_Doc_Equals_OFFSET);
return method(self, other);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Compare_To_OFFSET;
static CFISH_INLINE int32_t
LUCY_Doc_Compare_To(lucy_Doc* self, cfish_Obj* other) {
const LUCY_Doc_Compare_To_t method = (LUCY_Doc_Compare_To_t)cfish_obj_method(self, LUCY_Doc_Compare_To_OFFSET);
return method(self, other);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Destroy_OFFSET;
static CFISH_INLINE void
LUCY_Doc_Destroy(lucy_Doc* self) {
const LUCY_Doc_Destroy_t method = (LUCY_Doc_Destroy_t)cfish_obj_method(self, LUCY_Doc_Destroy_OFFSET);
method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_To_String_OFFSET;
static CFISH_INLINE cfish_String*
LUCY_Doc_To_String(lucy_Doc* self) {
const LUCY_Doc_To_String_t method = (LUCY_Doc_To_String_t)cfish_obj_method(self, LUCY_Doc_To_String_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Set_Doc_ID_OFFSET;
static CFISH_INLINE void
LUCY_Doc_Set_Doc_ID(lucy_Doc* self, int32_t doc_id) {
const LUCY_Doc_Set_Doc_ID_t method = (LUCY_Doc_Set_Doc_ID_t)cfish_obj_method(self, LUCY_Doc_Set_Doc_ID_OFFSET);
method(self, doc_id);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Get_Doc_ID_OFFSET;
static CFISH_INLINE int32_t
LUCY_Doc_Get_Doc_ID(lucy_Doc* self) {
const LUCY_Doc_Get_Doc_ID_t method = (LUCY_Doc_Get_Doc_ID_t)cfish_obj_method(self, LUCY_Doc_Get_Doc_ID_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Store_OFFSET;
static CFISH_INLINE void
LUCY_Doc_Store(lucy_Doc* self, cfish_String* field, cfish_Obj* value) {
const LUCY_Doc_Store_t method = (LUCY_Doc_Store_t)cfish_obj_method(self, LUCY_Doc_Store_OFFSET);
method(self, field, value);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Set_Fields_OFFSET;
static CFISH_INLINE void
LUCY_Doc_Set_Fields(lucy_Doc* self, void* fields) {
const LUCY_Doc_Set_Fields_t method = (LUCY_Doc_Set_Fields_t)cfish_obj_method(self, LUCY_Doc_Set_Fields_OFFSET);
method(self, fields);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Get_Fields_OFFSET;
static CFISH_INLINE void*
LUCY_Doc_Get_Fields(lucy_Doc* self) {
const LUCY_Doc_Get_Fields_t method = (LUCY_Doc_Get_Fields_t)cfish_obj_method(self, LUCY_Doc_Get_Fields_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Get_Size_OFFSET;
static CFISH_INLINE uint32_t
LUCY_Doc_Get_Size(lucy_Doc* self) {
const LUCY_Doc_Get_Size_t method = (LUCY_Doc_Get_Size_t)cfish_obj_method(self, LUCY_Doc_Get_Size_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Extract_OFFSET;
static CFISH_INLINE cfish_Obj*
LUCY_Doc_Extract(lucy_Doc* self, cfish_String* field) {
const LUCY_Doc_Extract_t method = (LUCY_Doc_Extract_t)cfish_obj_method(self, LUCY_Doc_Extract_OFFSET);
return method(self, field);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Field_Names_OFFSET;
static CFISH_INLINE cfish_Vector*
LUCY_Doc_Field_Names(lucy_Doc* self) {
const LUCY_Doc_Field_Names_t method = (LUCY_Doc_Field_Names_t)cfish_obj_method(self, LUCY_Doc_Field_Names_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Serialize_OFFSET;
static CFISH_INLINE void
LUCY_Doc_Serialize(lucy_Doc* self, lucy_OutStream* outstream) {
const LUCY_Doc_Serialize_t method = (LUCY_Doc_Serialize_t)cfish_obj_method(self, LUCY_Doc_Serialize_OFFSET);
method(self, outstream);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Deserialize_OFFSET;
static CFISH_INLINE lucy_Doc*
LUCY_Doc_Deserialize(lucy_Doc* self, lucy_InStream* instream) {
const LUCY_Doc_Deserialize_t method = (LUCY_Doc_Deserialize_t)cfish_obj_method(self, LUCY_Doc_Deserialize_OFFSET);
return method(self, instream);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Dump_OFFSET;
static CFISH_INLINE cfish_Hash*
LUCY_Doc_Dump(lucy_Doc* self) {
const LUCY_Doc_Dump_t method = (LUCY_Doc_Dump_t)cfish_obj_method(self, LUCY_Doc_Dump_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_Doc_Load_OFFSET;
static CFISH_INLINE lucy_Doc*
LUCY_Doc_Load(lucy_Doc* self, cfish_Obj* dump) {
const LUCY_Doc_Load_t method = (LUCY_Doc_Load_t)cfish_obj_method(self, LUCY_Doc_Load_OFFSET);
return method(self, dump);
}
/* Declare callbacks for wrapping host overrides.
*/
#ifdef CFISH_NO_DYNAMIC_OVERRIDES
#define Lucy_Doc_Set_Doc_ID_OVERRIDE NULL
#define Lucy_Doc_Get_Doc_ID_OVERRIDE NULL
#define Lucy_Doc_Store_OVERRIDE NULL
#define Lucy_Doc_Set_Fields_OVERRIDE NULL
#define Lucy_Doc_Get_Fields_OVERRIDE NULL
#define Lucy_Doc_Get_Size_OVERRIDE NULL
#define Lucy_Doc_Extract_OVERRIDE NULL
#define Lucy_Doc_Field_Names_OVERRIDE NULL
#define Lucy_Doc_Serialize_OVERRIDE NULL
#define Lucy_Doc_Deserialize_OVERRIDE NULL
#define Lucy_Doc_Dump_OVERRIDE NULL
#define Lucy_Doc_Load_OVERRIDE NULL
#else
void
Lucy_Doc_Set_Doc_ID_OVERRIDE(lucy_Doc* self, int32_t doc_id);
int32_t
Lucy_Doc_Get_Doc_ID_OVERRIDE(lucy_Doc* self);
void
Lucy_Doc_Store_OVERRIDE(lucy_Doc* self, cfish_String* field, cfish_Obj* value);
void
Lucy_Doc_Set_Fields_OVERRIDE(lucy_Doc* self, void* fields);
void*
Lucy_Doc_Get_Fields_OVERRIDE(lucy_Doc* self);
uint32_t
Lucy_Doc_Get_Size_OVERRIDE(lucy_Doc* self);
cfish_Obj*
Lucy_Doc_Extract_OVERRIDE(lucy_Doc* self, cfish_String* field);
cfish_Vector*
Lucy_Doc_Field_Names_OVERRIDE(lucy_Doc* self);
void
Lucy_Doc_Serialize_OVERRIDE(lucy_Doc* self, lucy_OutStream* outstream);
lucy_Doc*
Lucy_Doc_Deserialize_OVERRIDE(lucy_Doc* self, lucy_InStream* instream);
cfish_Hash*
Lucy_Doc_Dump_OVERRIDE(lucy_Doc* self);
lucy_Doc*
Lucy_Doc_Load_OVERRIDE(lucy_Doc* self, cfish_Obj* dump);
#endif
/* Define "short names" for this class's symbols.
*/
#ifdef LUCY_USE_SHORT_NAMES
#define Doc lucy_Doc
#define DOC LUCY_DOC
#define Doc_new lucy_Doc_new
#define Doc_init lucy_Doc_init
#define Doc_get_class lucy_Doc_get_class
#define Doc_get_class_name lucy_Doc_get_class_name
#define Doc_is_a lucy_Doc_is_a
#define Doc_Set_Doc_ID_IMP LUCY_Doc_Set_Doc_ID_IMP
#define Doc_Get_Doc_ID_IMP LUCY_Doc_Get_Doc_ID_IMP
#define Doc_Store_IMP LUCY_Doc_Store_IMP
#define Doc_Set_Fields_IMP LUCY_Doc_Set_Fields_IMP
#define Doc_Get_Fields_IMP LUCY_Doc_Get_Fields_IMP
#define Doc_Get_Size_IMP LUCY_Doc_Get_Size_IMP
#define Doc_Extract_IMP LUCY_Doc_Extract_IMP
#define Doc_Field_Names_IMP LUCY_Doc_Field_Names_IMP
#define Doc_Equals_IMP LUCY_Doc_Equals_IMP
#define Doc_Serialize_IMP LUCY_Doc_Serialize_IMP
#define Doc_Deserialize_IMP LUCY_Doc_Deserialize_IMP
#define Doc_Dump_IMP LUCY_Doc_Dump_IMP
#define Doc_Load_IMP LUCY_Doc_Load_IMP
#define Doc_Destroy_IMP LUCY_Doc_Destroy_IMP
#define Doc_To_Host LUCY_Doc_To_Host
#define Doc_To_Host_t LUCY_Doc_To_Host_t
#define Doc_Clone LUCY_Doc_Clone
#define Doc_Clone_t LUCY_Doc_Clone_t
#define Doc_Equals LUCY_Doc_Equals
#define Doc_Equals_t LUCY_Doc_Equals_t
#define Doc_Compare_To LUCY_Doc_Compare_To
#define Doc_Compare_To_t LUCY_Doc_Compare_To_t
#define Doc_Destroy LUCY_Doc_Destroy
#define Doc_Destroy_t LUCY_Doc_Destroy_t
#define Doc_To_String LUCY_Doc_To_String
#define Doc_To_String_t LUCY_Doc_To_String_t
#define Doc_Set_Doc_ID LUCY_Doc_Set_Doc_ID
#define Doc_Set_Doc_ID_t LUCY_Doc_Set_Doc_ID_t
#define Doc_Get_Doc_ID LUCY_Doc_Get_Doc_ID
#define Doc_Get_Doc_ID_t LUCY_Doc_Get_Doc_ID_t
#define Doc_Store LUCY_Doc_Store
#define Doc_Store_t LUCY_Doc_Store_t
#define Doc_Set_Fields LUCY_Doc_Set_Fields
#define Doc_Set_Fields_t LUCY_Doc_Set_Fields_t
#define Doc_Get_Fields LUCY_Doc_Get_Fields
#define Doc_Get_Fields_t LUCY_Doc_Get_Fields_t
#define Doc_Get_Size LUCY_Doc_Get_Size
#define Doc_Get_Size_t LUCY_Doc_Get_Size_t
#define Doc_Extract LUCY_Doc_Extract
#define Doc_Extract_t LUCY_Doc_Extract_t
#define Doc_Field_Names LUCY_Doc_Field_Names
#define Doc_Field_Names_t LUCY_Doc_Field_Names_t
#define Doc_Serialize LUCY_Doc_Serialize
#define Doc_Serialize_t LUCY_Doc_Serialize_t
#define Doc_Deserialize LUCY_Doc_Deserialize
#define Doc_Deserialize_t LUCY_Doc_Deserialize_t
#define Doc_Dump LUCY_Doc_Dump
#define Doc_Dump_t LUCY_Doc_Dump_t
#define Doc_Load LUCY_Doc_Load
#define Doc_Load_t LUCY_Doc_Load_t
#endif /* LUCY_USE_SHORT_NAMES */
#ifdef __cplusplus
}
#endif
#endif /* H_LUCY_DOCUMENT_DOC */
|