File Coverage

autogen/include/Clownfish/Obj.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_CLOWNFISH_OBJ #define H_CLOWNFISH_OBJ 1 #ifdef __cplusplus extern "C" { #endif #include "cfish_parcel.h" /* Include the header for this class's parent. */ /* Define the struct layout for instances of this class. */ #ifdef C_CFISH_OBJ extern uint32_t cfish_Obj_IVARS_OFFSET; typedef struct cfish_ObjIVARS cfish_ObjIVARS; static CFISH_INLINE cfish_ObjIVARS* cfish_Obj_IVARS(cfish_Obj *self) { char *ptr = (char*)self + cfish_Obj_IVARS_OFFSET; return (cfish_ObjIVARS*)ptr; } #ifdef CFISH_USE_SHORT_NAMES #define ObjIVARS cfish_ObjIVARS #define Obj_IVARS cfish_Obj_IVARS #endif struct cfish_Obj { CFISH_OBJ_HEAD cfish_Class* klass; }; #endif /* C_CFISH_OBJ */ /* Declare this class's inert variables. */ /* Declare both this class's inert functions and the C functions which * implement this class's dynamic methods. */ CFISH_VISIBLE cfish_Obj* cfish_Obj_init(cfish_Obj* self); CFISH_VISIBLE cfish_Class* cfish_Obj_get_class(cfish_Obj* self); CFISH_VISIBLE cfish_String* cfish_Obj_get_class_name(cfish_Obj* self); CFISH_VISIBLE bool cfish_Obj_is_a(cfish_Obj* self, cfish_Class* ancestor); void* CFISH_Obj_To_Host_IMP(cfish_Obj* self, void* vcache); cfish_Obj* CFISH_Obj_Clone_IMP(cfish_Obj* self); bool CFISH_Obj_Equals_IMP(cfish_Obj* self, cfish_Obj* other); int32_t CFISH_Obj_Compare_To_IMP(cfish_Obj* self, cfish_Obj* other); void CFISH_Obj_Destroy_IMP(cfish_Obj* self); cfish_String* CFISH_Obj_To_String_IMP(cfish_Obj* self); /* Define typedefs for each dynamic method, allowing us to cast generic * pointers to the appropriate function pointer type more cleanly. */ typedef void* (*CFISH_Obj_To_Host_t)(cfish_Obj* self, void* vcache); typedef cfish_Obj* (*CFISH_Obj_Clone_t)(cfish_Obj* self); typedef bool (*CFISH_Obj_Equals_t)(cfish_Obj* self, cfish_Obj* other); typedef int32_t (*CFISH_Obj_Compare_To_t)(cfish_Obj* self, cfish_Obj* other); typedef void (*CFISH_Obj_Destroy_t)(cfish_Obj* self); typedef cfish_String* (*CFISH_Obj_To_String_t)(cfish_Obj* self); /* Define type-safe wrappers for inert functions of Obj. */ /* Define the inline functions which implement this class's virtual methods. */ extern CFISH_VISIBLE uint32_t CFISH_Obj_To_Host_OFFSET; static CFISH_INLINE void* CFISH_Obj_To_Host(cfish_Obj* self, void* vcache) { const CFISH_Obj_To_Host_t method = (CFISH_Obj_To_Host_t)cfish_obj_method(self, CFISH_Obj_To_Host_OFFSET); return method(self, vcache); } extern CFISH_VISIBLE uint32_t CFISH_Obj_Clone_OFFSET; static CFISH_INLINE cfish_Obj* CFISH_Obj_Clone(cfish_Obj* self) { const CFISH_Obj_Clone_t method = (CFISH_Obj_Clone_t)cfish_obj_method(self, CFISH_Obj_Clone_OFFSET); return method(self); } extern CFISH_VISIBLE uint32_t CFISH_Obj_Equals_OFFSET; static CFISH_INLINE bool CFISH_Obj_Equals(cfish_Obj* self, cfish_Obj* other) { const CFISH_Obj_Equals_t method = (CFISH_Obj_Equals_t)cfish_obj_method(self, CFISH_Obj_Equals_OFFSET); return method(self, other); } extern CFISH_VISIBLE uint32_t CFISH_Obj_Compare_To_OFFSET; static CFISH_INLINE int32_t CFISH_Obj_Compare_To(cfish_Obj* self, cfish_Obj* other) { const CFISH_Obj_Compare_To_t method = (CFISH_Obj_Compare_To_t)cfish_obj_method(self, CFISH_Obj_Compare_To_OFFSET); return method(self, other); } extern CFISH_VISIBLE uint32_t CFISH_Obj_Destroy_OFFSET; static CFISH_INLINE void CFISH_Obj_Destroy(cfish_Obj* self) { const CFISH_Obj_Destroy_t method = (CFISH_Obj_Destroy_t)cfish_obj_method(self, CFISH_Obj_Destroy_OFFSET); method(self); } extern CFISH_VISIBLE uint32_t CFISH_Obj_To_String_OFFSET; static CFISH_INLINE cfish_String* CFISH_Obj_To_String(cfish_Obj* self) { const CFISH_Obj_To_String_t method = (CFISH_Obj_To_String_t)cfish_obj_method(self, CFISH_Obj_To_String_OFFSET); return method(self); } /* Declare callbacks for wrapping host overrides. */ #ifdef CFISH_NO_DYNAMIC_OVERRIDES #define Cfish_Obj_To_Host_OVERRIDE NULL #define Cfish_Obj_Clone_OVERRIDE NULL #define Cfish_Obj_Equals_OVERRIDE NULL #define Cfish_Obj_Compare_To_OVERRIDE NULL #define Cfish_Obj_Destroy_OVERRIDE NULL #define Cfish_Obj_To_String_OVERRIDE NULL #else void* Cfish_Obj_To_Host_OVERRIDE(cfish_Obj* self, void* vcache); cfish_Obj* Cfish_Obj_Clone_OVERRIDE(cfish_Obj* self); bool Cfish_Obj_Equals_OVERRIDE(cfish_Obj* self, cfish_Obj* other); int32_t Cfish_Obj_Compare_To_OVERRIDE(cfish_Obj* self, cfish_Obj* other); void Cfish_Obj_Destroy_OVERRIDE(cfish_Obj* self); cfish_String* Cfish_Obj_To_String_OVERRIDE(cfish_Obj* self); #endif /* Define "short names" for this class's symbols. */ #ifdef CFISH_USE_SHORT_NAMES #define Obj cfish_Obj #define OBJ CFISH_OBJ #define Obj_init cfish_Obj_init #define Obj_get_class cfish_Obj_get_class #define Obj_get_class_name cfish_Obj_get_class_name #define Obj_is_a cfish_Obj_is_a #define Obj_To_Host_IMP CFISH_Obj_To_Host_IMP #define Obj_Clone_IMP CFISH_Obj_Clone_IMP #define Obj_Equals_IMP CFISH_Obj_Equals_IMP #define Obj_Compare_To_IMP CFISH_Obj_Compare_To_IMP #define Obj_Destroy_IMP CFISH_Obj_Destroy_IMP #define Obj_To_String_IMP CFISH_Obj_To_String_IMP #define Obj_To_Host CFISH_Obj_To_Host #define Obj_To_Host_t CFISH_Obj_To_Host_t #define Obj_Clone CFISH_Obj_Clone #define Obj_Clone_t CFISH_Obj_Clone_t #define Obj_Equals CFISH_Obj_Equals #define Obj_Equals_t CFISH_Obj_Equals_t #define Obj_Compare_To CFISH_Obj_Compare_To #define Obj_Compare_To_t CFISH_Obj_Compare_To_t #define Obj_Destroy CFISH_Obj_Destroy #define Obj_Destroy_t CFISH_Obj_Destroy_t #define Obj_To_String CFISH_Obj_To_String #define Obj_To_String_t CFISH_Obj_To_String_t #endif /* CFISH_USE_SHORT_NAMES */ #ifdef __cplusplus } #endif #endif /* H_CLOWNFISH_OBJ */