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_STORE_RAMFILE
#define H_LUCY_STORE_RAMFILE 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_RAMFILE
extern uint32_t lucy_RAMFile_IVARS_OFFSET;
typedef struct lucy_RAMFileIVARS lucy_RAMFileIVARS;
static CFISH_INLINE lucy_RAMFileIVARS*
lucy_RAMFile_IVARS(lucy_RAMFile *self) {
char *ptr = (char*)self + lucy_RAMFile_IVARS_OFFSET;
return (lucy_RAMFileIVARS*)ptr;
}
#ifdef LUCY_USE_SHORT_NAMES
#define RAMFileIVARS lucy_RAMFileIVARS
#define RAMFile_IVARS lucy_RAMFile_IVARS
#endif
struct lucy_RAMFileIVARS {
bool read_only;
cfish_ByteBuf* contents;
};
#endif /* C_LUCY_RAMFILE */
/* 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_RAMFile*
lucy_RAMFile_new(cfish_ByteBuf* contents, bool read_only);
LUCY_VISIBLE lucy_RAMFile*
lucy_RAMFile_init(lucy_RAMFile* self, cfish_ByteBuf* contents, bool read_only);
cfish_ByteBuf*
LUCY_RAMFile_Get_Contents_IMP(lucy_RAMFile* self);
bool
LUCY_RAMFile_Read_Only_IMP(lucy_RAMFile* self);
void
LUCY_RAMFile_Set_Read_Only_IMP(lucy_RAMFile* self, bool read_only);
void
LUCY_RAMFile_Destroy_IMP(lucy_RAMFile* self);
/* Define typedefs for each dynamic method, allowing us to cast generic
* pointers to the appropriate function pointer type more cleanly.
*/
typedef void*
(*LUCY_RAMFile_To_Host_t)(lucy_RAMFile* self, void* vcache);
typedef cfish_Obj*
(*LUCY_RAMFile_Clone_t)(lucy_RAMFile* self);
typedef bool
(*LUCY_RAMFile_Equals_t)(lucy_RAMFile* self, cfish_Obj* other);
typedef int32_t
(*LUCY_RAMFile_Compare_To_t)(lucy_RAMFile* self, cfish_Obj* other);
typedef void
(*LUCY_RAMFile_Destroy_t)(lucy_RAMFile* self);
typedef cfish_String*
(*LUCY_RAMFile_To_String_t)(lucy_RAMFile* self);
typedef cfish_ByteBuf*
(*LUCY_RAMFile_Get_Contents_t)(lucy_RAMFile* self);
typedef bool
(*LUCY_RAMFile_Read_Only_t)(lucy_RAMFile* self);
typedef void
(*LUCY_RAMFile_Set_Read_Only_t)(lucy_RAMFile* self, bool read_only);
/* Define type-safe wrappers for inert functions of Obj.
*/
static CFISH_INLINE cfish_Class*
lucy_RAMFile_get_class(lucy_RAMFile *self) {
return cfish_Obj_get_class((cfish_Obj*)self);
}
static CFISH_INLINE cfish_String*
lucy_RAMFile_get_class_name(lucy_RAMFile *self) {
return cfish_Obj_get_class_name((cfish_Obj*)self);
}
static CFISH_INLINE bool
lucy_RAMFile_is_a(lucy_RAMFile *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_RAMFile_To_Host_OFFSET;
static CFISH_INLINE void*
LUCY_RAMFile_To_Host(lucy_RAMFile* self, void* vcache) {
const LUCY_RAMFile_To_Host_t method = (LUCY_RAMFile_To_Host_t)cfish_obj_method(self, LUCY_RAMFile_To_Host_OFFSET);
return method(self, vcache);
}
extern LUCY_VISIBLE uint32_t LUCY_RAMFile_Clone_OFFSET;
static CFISH_INLINE cfish_Obj*
LUCY_RAMFile_Clone(lucy_RAMFile* self) {
const LUCY_RAMFile_Clone_t method = (LUCY_RAMFile_Clone_t)cfish_obj_method(self, LUCY_RAMFile_Clone_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_RAMFile_Equals_OFFSET;
static CFISH_INLINE bool
LUCY_RAMFile_Equals(lucy_RAMFile* self, cfish_Obj* other) {
const LUCY_RAMFile_Equals_t method = (LUCY_RAMFile_Equals_t)cfish_obj_method(self, LUCY_RAMFile_Equals_OFFSET);
return method(self, other);
}
extern LUCY_VISIBLE uint32_t LUCY_RAMFile_Compare_To_OFFSET;
static CFISH_INLINE int32_t
LUCY_RAMFile_Compare_To(lucy_RAMFile* self, cfish_Obj* other) {
const LUCY_RAMFile_Compare_To_t method = (LUCY_RAMFile_Compare_To_t)cfish_obj_method(self, LUCY_RAMFile_Compare_To_OFFSET);
return method(self, other);
}
extern LUCY_VISIBLE uint32_t LUCY_RAMFile_Destroy_OFFSET;
static CFISH_INLINE void
LUCY_RAMFile_Destroy(lucy_RAMFile* self) {
const LUCY_RAMFile_Destroy_t method = (LUCY_RAMFile_Destroy_t)cfish_obj_method(self, LUCY_RAMFile_Destroy_OFFSET);
method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_RAMFile_To_String_OFFSET;
static CFISH_INLINE cfish_String*
LUCY_RAMFile_To_String(lucy_RAMFile* self) {
const LUCY_RAMFile_To_String_t method = (LUCY_RAMFile_To_String_t)cfish_obj_method(self, LUCY_RAMFile_To_String_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_RAMFile_Get_Contents_OFFSET;
static CFISH_INLINE cfish_ByteBuf*
LUCY_RAMFile_Get_Contents(lucy_RAMFile* self) {
const LUCY_RAMFile_Get_Contents_t method = (LUCY_RAMFile_Get_Contents_t)cfish_obj_method(self, LUCY_RAMFile_Get_Contents_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_RAMFile_Read_Only_OFFSET;
static CFISH_INLINE bool
LUCY_RAMFile_Read_Only(lucy_RAMFile* self) {
const LUCY_RAMFile_Read_Only_t method = (LUCY_RAMFile_Read_Only_t)cfish_obj_method(self, LUCY_RAMFile_Read_Only_OFFSET);
return method(self);
}
extern LUCY_VISIBLE uint32_t LUCY_RAMFile_Set_Read_Only_OFFSET;
static CFISH_INLINE void
LUCY_RAMFile_Set_Read_Only(lucy_RAMFile* self, bool read_only) {
const LUCY_RAMFile_Set_Read_Only_t method = (LUCY_RAMFile_Set_Read_Only_t)cfish_obj_method(self, LUCY_RAMFile_Set_Read_Only_OFFSET);
method(self, read_only);
}
/* Declare callbacks for wrapping host overrides.
*/
#ifdef CFISH_NO_DYNAMIC_OVERRIDES
#define Lucy_RAMFile_Get_Contents_OVERRIDE NULL
#define Lucy_RAMFile_Read_Only_OVERRIDE NULL
#define Lucy_RAMFile_Set_Read_Only_OVERRIDE NULL
#else
cfish_ByteBuf*
Lucy_RAMFile_Get_Contents_OVERRIDE(lucy_RAMFile* self);
bool
Lucy_RAMFile_Read_Only_OVERRIDE(lucy_RAMFile* self);
void
Lucy_RAMFile_Set_Read_Only_OVERRIDE(lucy_RAMFile* self, bool read_only);
#endif
/* Define "short names" for this class's symbols.
*/
#ifdef LUCY_USE_SHORT_NAMES
#define RAMFile lucy_RAMFile
#define RAMFILE LUCY_RAMFILE
#define RAMFile_new lucy_RAMFile_new
#define RAMFile_init lucy_RAMFile_init
#define RAMFile_get_class lucy_RAMFile_get_class
#define RAMFile_get_class_name lucy_RAMFile_get_class_name
#define RAMFile_is_a lucy_RAMFile_is_a
#define RAMFile_Get_Contents_IMP LUCY_RAMFile_Get_Contents_IMP
#define RAMFile_Read_Only_IMP LUCY_RAMFile_Read_Only_IMP
#define RAMFile_Set_Read_Only_IMP LUCY_RAMFile_Set_Read_Only_IMP
#define RAMFile_Destroy_IMP LUCY_RAMFile_Destroy_IMP
#define RAMFile_To_Host LUCY_RAMFile_To_Host
#define RAMFile_To_Host_t LUCY_RAMFile_To_Host_t
#define RAMFile_Clone LUCY_RAMFile_Clone
#define RAMFile_Clone_t LUCY_RAMFile_Clone_t
#define RAMFile_Equals LUCY_RAMFile_Equals
#define RAMFile_Equals_t LUCY_RAMFile_Equals_t
#define RAMFile_Compare_To LUCY_RAMFile_Compare_To
#define RAMFile_Compare_To_t LUCY_RAMFile_Compare_To_t
#define RAMFile_Destroy LUCY_RAMFile_Destroy
#define RAMFile_Destroy_t LUCY_RAMFile_Destroy_t
#define RAMFile_To_String LUCY_RAMFile_To_String
#define RAMFile_To_String_t LUCY_RAMFile_To_String_t
#define RAMFile_Get_Contents LUCY_RAMFile_Get_Contents
#define RAMFile_Get_Contents_t LUCY_RAMFile_Get_Contents_t
#define RAMFile_Read_Only LUCY_RAMFile_Read_Only
#define RAMFile_Read_Only_t LUCY_RAMFile_Read_Only_t
#define RAMFile_Set_Read_Only LUCY_RAMFile_Set_Read_Only
#define RAMFile_Set_Read_Only_t LUCY_RAMFile_Set_Read_Only_t
#endif /* LUCY_USE_SHORT_NAMES */
#ifdef __cplusplus
}
#endif
#endif /* H_LUCY_STORE_RAMFILE */
|