| 1 | /* | ||
| 2 | * *********************************************** | ||
| 3 | * | ||
| 4 | * !!!! DO NOT EDIT !!!! | ||
| 5 | * | ||
| 6 | * This file was auto-generated by Build.PL. | ||
| 7 | * | ||
| 8 | * *********************************************** | ||
| 9 | * | ||
| 10 | * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| 11 | * contributor license agreements. See the NOTICE file distributed with | ||
| 12 | * this work for additional information regarding copyright ownership. | ||
| 13 | * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| 14 | * (the "License"); you may not use this file except in compliance with | ||
| 15 | * the License. You may obtain a copy of the License at | ||
| 16 | * | ||
| 17 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 18 | * | ||
| 19 | * Unless required by applicable law or agreed to in writing, software | ||
| 20 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 22 | * See the License for the specific language governing permissions and | ||
| 23 | * limitations under the License. | ||
| 24 | */ | ||
| 25 | |||
| 26 | |||
| 27 | #ifndef H_CLOWNFISH_TESTHARNESS_TESTSUITE | ||
| 28 | #define H_CLOWNFISH_TESTHARNESS_TESTSUITE 1 | ||
| 29 | |||
| 30 | |||
| 31 | #ifdef __cplusplus | ||
| 32 | extern "C" { | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #include "cfish_parcel.h" | ||
| 36 | |||
| 37 | /* Include the header for this class's parent. | ||
| 38 | */ | ||
| 39 | |||
| 40 | #include "Clownfish/Obj.h" | ||
| 41 | |||
| 42 | /* Define the struct layout for instances of this class. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #ifdef C_CFISH_TESTSUITE | ||
| 46 | extern uint32_t cfish_TestSuite_IVARS_OFFSET; | ||
| 47 | typedef struct cfish_TestSuiteIVARS cfish_TestSuiteIVARS; | ||
| 48 | static CFISH_INLINE cfish_TestSuiteIVARS* | ||
| 49 | cfish_TestSuite_IVARS(cfish_TestSuite *self) { | ||
| 50 | char *ptr = (char*)self + cfish_TestSuite_IVARS_OFFSET; | ||
| 51 | return (cfish_TestSuiteIVARS*)ptr; | ||
| 52 | } | ||
| 53 | #ifdef CFISH_USE_SHORT_NAMES | ||
| 54 | #define TestSuiteIVARS cfish_TestSuiteIVARS | ||
| 55 | #define TestSuite_IVARS cfish_TestSuite_IVARS | ||
| 56 | #endif | ||
| 57 | |||
| 58 | struct cfish_TestSuite { | ||
| 59 | CFISH_OBJ_HEAD | ||
| 60 | cfish_Class* klass; | ||
| 61 | cfish_Vector* batches; | ||
| 62 | }; | ||
| 63 | |||
| 64 | #endif /* C_CFISH_TESTSUITE */ | ||
| 65 | |||
| 66 | /* Declare this class's inert variables. | ||
| 67 | */ | ||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | /* Declare both this class's inert functions and the C functions which | ||
| 72 | * implement this class's dynamic methods. | ||
| 73 | */ | ||
| 74 | |||
| 75 | CFISH_VISIBLE cfish_TestSuite* | ||
| 76 | cfish_TestSuite_new(void); | ||
| 77 | |||
| 78 | CFISH_VISIBLE cfish_TestSuite* | ||
| 79 | cfish_TestSuite_init(cfish_TestSuite* self); | ||
| 80 | |||
| 81 | void | ||
| 82 | CFISH_TestSuite_Destroy_IMP(cfish_TestSuite* self); | ||
| 83 | |||
| 84 | void | ||
| 85 | CFISH_TestSuite_Add_Batch_IMP(cfish_TestSuite* self, cfish_TestBatch* batch); | ||
| 86 | |||
| 87 | bool | ||
| 88 | CFISH_TestSuite_Run_Batch_IMP(cfish_TestSuite* self, cfish_String* class_name, cfish_TestFormatter* formatter); | ||
| 89 | |||
| 90 | bool | ||
| 91 | CFISH_TestSuite_Run_All_Batches_IMP(cfish_TestSuite* self, cfish_TestFormatter* formatter); | ||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | /* Define typedefs for each dynamic method, allowing us to cast generic | ||
| 96 | * pointers to the appropriate function pointer type more cleanly. | ||
| 97 | */ | ||
| 98 | |||
| 99 | typedef void* | ||
| 100 | (*CFISH_TestSuite_To_Host_t)(cfish_TestSuite* self, void* vcache); | ||
| 101 | |||
| 102 | typedef cfish_Obj* | ||
| 103 | (*CFISH_TestSuite_Clone_t)(cfish_TestSuite* self); | ||
| 104 | |||
| 105 | typedef bool | ||
| 106 | (*CFISH_TestSuite_Equals_t)(cfish_TestSuite* self, cfish_Obj* other); | ||
| 107 | |||
| 108 | typedef int32_t | ||
| 109 | (*CFISH_TestSuite_Compare_To_t)(cfish_TestSuite* self, cfish_Obj* other); | ||
| 110 | |||
| 111 | typedef void | ||
| 112 | (*CFISH_TestSuite_Destroy_t)(cfish_TestSuite* self); | ||
| 113 | |||
| 114 | typedef cfish_String* | ||
| 115 | (*CFISH_TestSuite_To_String_t)(cfish_TestSuite* self); | ||
| 116 | |||
| 117 | typedef void | ||
| 118 | (*CFISH_TestSuite_Add_Batch_t)(cfish_TestSuite* self, cfish_TestBatch* batch); | ||
| 119 | |||
| 120 | typedef bool | ||
| 121 | (*CFISH_TestSuite_Run_Batch_t)(cfish_TestSuite* self, cfish_String* class_name, cfish_TestFormatter* formatter); | ||
| 122 | |||
| 123 | typedef bool | ||
| 124 | (*CFISH_TestSuite_Run_All_Batches_t)(cfish_TestSuite* self, cfish_TestFormatter* formatter); | ||
| 125 | |||
| 126 | |||
| 127 | |||
| 128 | /* Define type-safe wrappers for inert functions of Obj. | ||
| 129 | */ | ||
| 130 | |||
| 131 | static CFISH_INLINE cfish_Class* | ||
| 132 | cfish_TestSuite_get_class(cfish_TestSuite *self) { | ||
| 133 | return cfish_Obj_get_class((cfish_Obj*)self); | ||
| 134 | } | ||
| 135 | |||
| 136 | static CFISH_INLINE cfish_String* | ||
| 137 | cfish_TestSuite_get_class_name(cfish_TestSuite *self) { | ||
| 138 | return cfish_Obj_get_class_name((cfish_Obj*)self); | ||
| 139 | } | ||
| 140 | |||
| 141 | static CFISH_INLINE bool | ||
| 142 | cfish_TestSuite_is_a(cfish_TestSuite *self, cfish_Class *ancestor) { | ||
| 143 | return cfish_Obj_is_a((cfish_Obj*)self, ancestor); | ||
| 144 | } | ||
| 145 | |||
| 146 | |||
| 147 | /* Define the inline functions which implement this class's virtual methods. | ||
| 148 | */ | ||
| 149 | |||
| 150 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_To_Host_OFFSET; | ||
| 151 | static CFISH_INLINE void* | ||
| 152 | CFISH_TestSuite_To_Host(cfish_TestSuite* self, void* vcache) { | ||
| 153 | const CFISH_TestSuite_To_Host_t method = (CFISH_TestSuite_To_Host_t)cfish_obj_method(self, CFISH_TestSuite_To_Host_OFFSET); | ||
| 154 | return method(self, vcache); | ||
| 155 | } | ||
| 156 | |||
| 157 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_Clone_OFFSET; | ||
| 158 | static CFISH_INLINE cfish_Obj* | ||
| 159 | CFISH_TestSuite_Clone(cfish_TestSuite* self) { | ||
| 160 | const CFISH_TestSuite_Clone_t method = (CFISH_TestSuite_Clone_t)cfish_obj_method(self, CFISH_TestSuite_Clone_OFFSET); | ||
| 161 | return method(self); | ||
| 162 | } | ||
| 163 | |||
| 164 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_Equals_OFFSET; | ||
| 165 | static CFISH_INLINE bool | ||
| 166 | CFISH_TestSuite_Equals(cfish_TestSuite* self, cfish_Obj* other) { | ||
| 167 | const CFISH_TestSuite_Equals_t method = (CFISH_TestSuite_Equals_t)cfish_obj_method(self, CFISH_TestSuite_Equals_OFFSET); | ||
| 168 | return method(self, other); | ||
| 169 | } | ||
| 170 | |||
| 171 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_Compare_To_OFFSET; | ||
| 172 | static CFISH_INLINE int32_t | ||
| 173 | CFISH_TestSuite_Compare_To(cfish_TestSuite* self, cfish_Obj* other) { | ||
| 174 | const CFISH_TestSuite_Compare_To_t method = (CFISH_TestSuite_Compare_To_t)cfish_obj_method(self, CFISH_TestSuite_Compare_To_OFFSET); | ||
| 175 | return method(self, other); | ||
| 176 | } | ||
| 177 | |||
| 178 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_Destroy_OFFSET; | ||
| 179 | static CFISH_INLINE void | ||
| 180 | CFISH_TestSuite_Destroy(cfish_TestSuite* self) { | ||
| 181 | const CFISH_TestSuite_Destroy_t method = (CFISH_TestSuite_Destroy_t)cfish_obj_method(self, CFISH_TestSuite_Destroy_OFFSET); | ||
| 182 | method(self); | ||
| 183 | } | ||
| 184 | |||
| 185 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_To_String_OFFSET; | ||
| 186 | static CFISH_INLINE cfish_String* | ||
| 187 | CFISH_TestSuite_To_String(cfish_TestSuite* self) { | ||
| 188 | const CFISH_TestSuite_To_String_t method = (CFISH_TestSuite_To_String_t)cfish_obj_method(self, CFISH_TestSuite_To_String_OFFSET); | ||
| 189 | return method(self); | ||
| 190 | } | ||
| 191 | |||
| 192 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_Add_Batch_OFFSET; | ||
| 193 | static CFISH_INLINE void | ||
| 194 | CFISH_TestSuite_Add_Batch(cfish_TestSuite* self, cfish_TestBatch* batch) { | ||
| 195 | const CFISH_TestSuite_Add_Batch_t method = (CFISH_TestSuite_Add_Batch_t)cfish_obj_method(self, CFISH_TestSuite_Add_Batch_OFFSET); | ||
| 196 | method(self, batch); | ||
| 197 | } | ||
| 198 | |||
| 199 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_Run_Batch_OFFSET; | ||
| 200 | static CFISH_INLINE bool | ||
| 201 | 68 | CFISH_TestSuite_Run_Batch(cfish_TestSuite* self, cfish_String* class_name, cfish_TestFormatter* formatter) { | |
| 202 | 68 | const CFISH_TestSuite_Run_Batch_t method = (CFISH_TestSuite_Run_Batch_t)cfish_obj_method(self, CFISH_TestSuite_Run_Batch_OFFSET); | |
| 203 | 68 | return method(self, class_name, formatter); | |
| 204 | } | ||
| 205 | |||
| 206 | extern CFISH_VISIBLE uint32_t CFISH_TestSuite_Run_All_Batches_OFFSET; | ||
| 207 | static CFISH_INLINE bool | ||
| 208 | CFISH_TestSuite_Run_All_Batches(cfish_TestSuite* self, cfish_TestFormatter* formatter) { | ||
| 209 | const CFISH_TestSuite_Run_All_Batches_t method = (CFISH_TestSuite_Run_All_Batches_t)cfish_obj_method(self, CFISH_TestSuite_Run_All_Batches_OFFSET); | ||
| 210 | return method(self, formatter); | ||
| 211 | } | ||
| 212 | |||
| 213 | |||
| 214 | |||
| 215 | /* Declare callbacks for wrapping host overrides. | ||
| 216 | */ | ||
| 217 | |||
| 218 | #ifdef CFISH_NO_DYNAMIC_OVERRIDES | ||
| 219 | #define Cfish_TestSuite_Add_Batch_OVERRIDE NULL | ||
| 220 | #define Cfish_TestSuite_Run_Batch_OVERRIDE NULL | ||
| 221 | #define Cfish_TestSuite_Run_All_Batches_OVERRIDE NULL | ||
| 222 | #else | ||
| 223 | void | ||
| 224 | Cfish_TestSuite_Add_Batch_OVERRIDE(cfish_TestSuite* self, cfish_TestBatch* batch); | ||
| 225 | bool | ||
| 226 | Cfish_TestSuite_Run_Batch_OVERRIDE(cfish_TestSuite* self, cfish_String* class_name, cfish_TestFormatter* formatter); | ||
| 227 | bool | ||
| 228 | Cfish_TestSuite_Run_All_Batches_OVERRIDE(cfish_TestSuite* self, cfish_TestFormatter* formatter); | ||
| 229 | #endif | ||
| 230 | |||
| 231 | |||
| 232 | /* Define "short names" for this class's symbols. | ||
| 233 | */ | ||
| 234 | |||
| 235 | #ifdef CFISH_USE_SHORT_NAMES | ||
| 236 | #define TestSuite cfish_TestSuite | ||
| 237 | #define TESTSUITE CFISH_TESTSUITE | ||
| 238 | #define TestSuite_new cfish_TestSuite_new | ||
| 239 | #define TestSuite_init cfish_TestSuite_init | ||
| 240 | #define TestSuite_get_class cfish_TestSuite_get_class | ||
| 241 | #define TestSuite_get_class_name cfish_TestSuite_get_class_name | ||
| 242 | #define TestSuite_is_a cfish_TestSuite_is_a | ||
| 243 | #define TestSuite_Destroy_IMP CFISH_TestSuite_Destroy_IMP | ||
| 244 | #define TestSuite_Add_Batch_IMP CFISH_TestSuite_Add_Batch_IMP | ||
| 245 | #define TestSuite_Run_Batch_IMP CFISH_TestSuite_Run_Batch_IMP | ||
| 246 | #define TestSuite_Run_All_Batches_IMP CFISH_TestSuite_Run_All_Batches_IMP | ||
| 247 | #define TestSuite_To_Host CFISH_TestSuite_To_Host | ||
| 248 | #define TestSuite_To_Host_t CFISH_TestSuite_To_Host_t | ||
| 249 | #define TestSuite_Clone CFISH_TestSuite_Clone | ||
| 250 | #define TestSuite_Clone_t CFISH_TestSuite_Clone_t | ||
| 251 | #define TestSuite_Equals CFISH_TestSuite_Equals | ||
| 252 | #define TestSuite_Equals_t CFISH_TestSuite_Equals_t | ||
| 253 | #define TestSuite_Compare_To CFISH_TestSuite_Compare_To | ||
| 254 | #define TestSuite_Compare_To_t CFISH_TestSuite_Compare_To_t | ||
| 255 | #define TestSuite_Destroy CFISH_TestSuite_Destroy | ||
| 256 | #define TestSuite_Destroy_t CFISH_TestSuite_Destroy_t | ||
| 257 | #define TestSuite_To_String CFISH_TestSuite_To_String | ||
| 258 | #define TestSuite_To_String_t CFISH_TestSuite_To_String_t | ||
| 259 | #define TestSuite_Add_Batch CFISH_TestSuite_Add_Batch | ||
| 260 | #define TestSuite_Add_Batch_t CFISH_TestSuite_Add_Batch_t | ||
| 261 | #define TestSuite_Run_Batch CFISH_TestSuite_Run_Batch | ||
| 262 | #define TestSuite_Run_Batch_t CFISH_TestSuite_Run_Batch_t | ||
| 263 | #define TestSuite_Run_All_Batches CFISH_TestSuite_Run_All_Batches | ||
| 264 | #define TestSuite_Run_All_Batches_t CFISH_TestSuite_Run_All_Batches_t | ||
| 265 | #endif /* CFISH_USE_SHORT_NAMES */ | ||
| 266 | |||
| 267 | |||
| 268 | |||
| 269 | |||
| 270 | |||
| 271 | #ifdef __cplusplus | ||
| 272 | } | ||
| 273 | #endif | ||
| 274 | |||
| 275 | #endif /* H_CLOWNFISH_TESTHARNESS_TESTSUITE */ | ||
| 276 | |||
| 277 | |||
| 278 | |||
| 279 |