| 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_LUCY_STORE_OUTSTREAM | ||
| 28 | #define H_LUCY_STORE_OUTSTREAM 1 | ||
| 29 | |||
| 30 | |||
| 31 | #ifdef __cplusplus | ||
| 32 | extern "C" { | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #include "lucy_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_LUCY_OUTSTREAM | ||
| 46 | extern uint32_t lucy_OutStream_IVARS_OFFSET; | ||
| 47 | typedef struct lucy_OutStreamIVARS lucy_OutStreamIVARS; | ||
| 48 | static CFISH_INLINE lucy_OutStreamIVARS* | ||
| 49 | lucy_OutStream_IVARS(lucy_OutStream *self) { | ||
| 50 | char *ptr = (char*)self + lucy_OutStream_IVARS_OFFSET; | ||
| 51 | return (lucy_OutStreamIVARS*)ptr; | ||
| 52 | } | ||
| 53 | #ifdef LUCY_USE_SHORT_NAMES | ||
| 54 | #define OutStreamIVARS lucy_OutStreamIVARS | ||
| 55 | #define OutStream_IVARS lucy_OutStream_IVARS | ||
| 56 | #endif | ||
| 57 | |||
| 58 | struct lucy_OutStreamIVARS { | ||
| 59 | char* buf; | ||
| 60 | int64_t buf_start; | ||
| 61 | size_t buf_pos; | ||
| 62 | lucy_FileHandle* file_handle; | ||
| 63 | cfish_String* path; | ||
| 64 | }; | ||
| 65 | |||
| 66 | #endif /* C_LUCY_OUTSTREAM */ | ||
| 67 | |||
| 68 | /* Declare this class's inert variables. | ||
| 69 | */ | ||
| 70 | |||
| 71 | |||
| 72 | |||
| 73 | /* Declare both this class's inert functions and the C functions which | ||
| 74 | * implement this class's dynamic methods. | ||
| 75 | */ | ||
| 76 | |||
| 77 | LUCY_VISIBLE lucy_OutStream* | ||
| 78 | lucy_OutStream_open(cfish_Obj* file); | ||
| 79 | |||
| 80 | LUCY_VISIBLE lucy_OutStream* | ||
| 81 | lucy_OutStream_do_open(lucy_OutStream* self, cfish_Obj* file); | ||
| 82 | |||
| 83 | cfish_String* | ||
| 84 | LUCY_OutStream_Get_Path_IMP(lucy_OutStream* self); | ||
| 85 | |||
| 86 | int64_t | ||
| 87 | LUCY_OutStream_Tell_IMP(lucy_OutStream* self); | ||
| 88 | |||
| 89 | int64_t | ||
| 90 | LUCY_OutStream_Align_IMP(lucy_OutStream* self, int64_t modulus); | ||
| 91 | |||
| 92 | void | ||
| 93 | LUCY_OutStream_Flush_IMP(lucy_OutStream* self); | ||
| 94 | |||
| 95 | int64_t | ||
| 96 | LUCY_OutStream_Length_IMP(lucy_OutStream* self); | ||
| 97 | |||
| 98 | void | ||
| 99 | LUCY_OutStream_Grow_IMP(lucy_OutStream* self, int64_t length); | ||
| 100 | |||
| 101 | void | ||
| 102 | LUCY_OutStream_Write_Bytes_IMP(lucy_OutStream* self, const void* buf, size_t len); | ||
| 103 | |||
| 104 | void | ||
| 105 | LUCY_OutStream_Write_I8_IMP(lucy_OutStream* self, int8_t value); | ||
| 106 | |||
| 107 | void | ||
| 108 | LUCY_OutStream_Write_U8_IMP(lucy_OutStream* self, uint8_t value); | ||
| 109 | |||
| 110 | void | ||
| 111 | LUCY_OutStream_Write_I32_IMP(lucy_OutStream* self, int32_t value); | ||
| 112 | |||
| 113 | void | ||
| 114 | LUCY_OutStream_Write_U32_IMP(lucy_OutStream* self, uint32_t value); | ||
| 115 | |||
| 116 | void | ||
| 117 | LUCY_OutStream_Write_I64_IMP(lucy_OutStream* self, int64_t value); | ||
| 118 | |||
| 119 | void | ||
| 120 | LUCY_OutStream_Write_U64_IMP(lucy_OutStream* self, uint64_t value); | ||
| 121 | |||
| 122 | void | ||
| 123 | LUCY_OutStream_Write_CI32_IMP(lucy_OutStream* self, int32_t value); | ||
| 124 | |||
| 125 | void | ||
| 126 | LUCY_OutStream_Write_CU32_IMP(lucy_OutStream* self, uint32_t value); | ||
| 127 | |||
| 128 | void | ||
| 129 | LUCY_OutStream_Write_CI64_IMP(lucy_OutStream* self, int64_t value); | ||
| 130 | |||
| 131 | void | ||
| 132 | LUCY_OutStream_Write_CU64_IMP(lucy_OutStream* self, uint64_t value); | ||
| 133 | |||
| 134 | void | ||
| 135 | LUCY_OutStream_Write_F32_IMP(lucy_OutStream* self, float value); | ||
| 136 | |||
| 137 | void | ||
| 138 | LUCY_OutStream_Write_F64_IMP(lucy_OutStream* self, double value); | ||
| 139 | |||
| 140 | void | ||
| 141 | LUCY_OutStream_Write_String_IMP(lucy_OutStream* self, const char* buf, size_t len); | ||
| 142 | |||
| 143 | void | ||
| 144 | LUCY_OutStream_Absorb_IMP(lucy_OutStream* self, lucy_InStream* instream); | ||
| 145 | |||
| 146 | void | ||
| 147 | LUCY_OutStream_Close_IMP(lucy_OutStream* self); | ||
| 148 | |||
| 149 | void | ||
| 150 | LUCY_OutStream_Destroy_IMP(lucy_OutStream* self); | ||
| 151 | |||
| 152 | |||
| 153 | |||
| 154 | /* Define typedefs for each dynamic method, allowing us to cast generic | ||
| 155 | * pointers to the appropriate function pointer type more cleanly. | ||
| 156 | */ | ||
| 157 | |||
| 158 | typedef void* | ||
| 159 | (*LUCY_OutStream_To_Host_t)(lucy_OutStream* self, void* vcache); | ||
| 160 | |||
| 161 | typedef cfish_Obj* | ||
| 162 | (*LUCY_OutStream_Clone_t)(lucy_OutStream* self); | ||
| 163 | |||
| 164 | typedef bool | ||
| 165 | (*LUCY_OutStream_Equals_t)(lucy_OutStream* self, cfish_Obj* other); | ||
| 166 | |||
| 167 | typedef int32_t | ||
| 168 | (*LUCY_OutStream_Compare_To_t)(lucy_OutStream* self, cfish_Obj* other); | ||
| 169 | |||
| 170 | typedef void | ||
| 171 | (*LUCY_OutStream_Destroy_t)(lucy_OutStream* self); | ||
| 172 | |||
| 173 | typedef cfish_String* | ||
| 174 | (*LUCY_OutStream_To_String_t)(lucy_OutStream* self); | ||
| 175 | |||
| 176 | typedef cfish_String* | ||
| 177 | (*LUCY_OutStream_Get_Path_t)(lucy_OutStream* self); | ||
| 178 | |||
| 179 | typedef int64_t | ||
| 180 | (*LUCY_OutStream_Tell_t)(lucy_OutStream* self); | ||
| 181 | |||
| 182 | typedef int64_t | ||
| 183 | (*LUCY_OutStream_Align_t)(lucy_OutStream* self, int64_t modulus); | ||
| 184 | |||
| 185 | typedef void | ||
| 186 | (*LUCY_OutStream_Flush_t)(lucy_OutStream* self); | ||
| 187 | |||
| 188 | typedef int64_t | ||
| 189 | (*LUCY_OutStream_Length_t)(lucy_OutStream* self); | ||
| 190 | |||
| 191 | typedef void | ||
| 192 | (*LUCY_OutStream_Grow_t)(lucy_OutStream* self, int64_t length); | ||
| 193 | |||
| 194 | typedef void | ||
| 195 | (*LUCY_OutStream_Write_Bytes_t)(lucy_OutStream* self, const void* buf, size_t len); | ||
| 196 | |||
| 197 | typedef void | ||
| 198 | (*LUCY_OutStream_Write_I8_t)(lucy_OutStream* self, int8_t value); | ||
| 199 | |||
| 200 | typedef void | ||
| 201 | (*LUCY_OutStream_Write_U8_t)(lucy_OutStream* self, uint8_t value); | ||
| 202 | |||
| 203 | typedef void | ||
| 204 | (*LUCY_OutStream_Write_I32_t)(lucy_OutStream* self, int32_t value); | ||
| 205 | |||
| 206 | typedef void | ||
| 207 | (*LUCY_OutStream_Write_U32_t)(lucy_OutStream* self, uint32_t value); | ||
| 208 | |||
| 209 | typedef void | ||
| 210 | (*LUCY_OutStream_Write_I64_t)(lucy_OutStream* self, int64_t value); | ||
| 211 | |||
| 212 | typedef void | ||
| 213 | (*LUCY_OutStream_Write_U64_t)(lucy_OutStream* self, uint64_t value); | ||
| 214 | |||
| 215 | typedef void | ||
| 216 | (*LUCY_OutStream_Write_CI32_t)(lucy_OutStream* self, int32_t value); | ||
| 217 | |||
| 218 | typedef void | ||
| 219 | (*LUCY_OutStream_Write_CU32_t)(lucy_OutStream* self, uint32_t value); | ||
| 220 | |||
| 221 | typedef void | ||
| 222 | (*LUCY_OutStream_Write_CI64_t)(lucy_OutStream* self, int64_t value); | ||
| 223 | |||
| 224 | typedef void | ||
| 225 | (*LUCY_OutStream_Write_CU64_t)(lucy_OutStream* self, uint64_t value); | ||
| 226 | |||
| 227 | typedef void | ||
| 228 | (*LUCY_OutStream_Write_F32_t)(lucy_OutStream* self, float value); | ||
| 229 | |||
| 230 | typedef void | ||
| 231 | (*LUCY_OutStream_Write_F64_t)(lucy_OutStream* self, double value); | ||
| 232 | |||
| 233 | typedef void | ||
| 234 | (*LUCY_OutStream_Write_String_t)(lucy_OutStream* self, const char* buf, size_t len); | ||
| 235 | |||
| 236 | typedef void | ||
| 237 | (*LUCY_OutStream_Absorb_t)(lucy_OutStream* self, lucy_InStream* instream); | ||
| 238 | |||
| 239 | typedef void | ||
| 240 | (*LUCY_OutStream_Close_t)(lucy_OutStream* self); | ||
| 241 | |||
| 242 | |||
| 243 | |||
| 244 | /* Define type-safe wrappers for inert functions of Obj. | ||
| 245 | */ | ||
| 246 | |||
| 247 | static CFISH_INLINE cfish_Class* | ||
| 248 | lucy_OutStream_get_class(lucy_OutStream *self) { | ||
| 249 | return cfish_Obj_get_class((cfish_Obj*)self); | ||
| 250 | } | ||
| 251 | |||
| 252 | static CFISH_INLINE cfish_String* | ||
| 253 | lucy_OutStream_get_class_name(lucy_OutStream *self) { | ||
| 254 | return cfish_Obj_get_class_name((cfish_Obj*)self); | ||
| 255 | } | ||
| 256 | |||
| 257 | static CFISH_INLINE bool | ||
| 258 | lucy_OutStream_is_a(lucy_OutStream *self, cfish_Class *ancestor) { | ||
| 259 | return cfish_Obj_is_a((cfish_Obj*)self, ancestor); | ||
| 260 | } | ||
| 261 | |||
| 262 | |||
| 263 | /* Define the inline functions which implement this class's virtual methods. | ||
| 264 | */ | ||
| 265 | |||
| 266 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_To_Host_OFFSET; | ||
| 267 | static CFISH_INLINE void* | ||
| 268 | LUCY_OutStream_To_Host(lucy_OutStream* self, void* vcache) { | ||
| 269 | const LUCY_OutStream_To_Host_t method = (LUCY_OutStream_To_Host_t)cfish_obj_method(self, LUCY_OutStream_To_Host_OFFSET); | ||
| 270 | return method(self, vcache); | ||
| 271 | } | ||
| 272 | |||
| 273 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Clone_OFFSET; | ||
| 274 | static CFISH_INLINE cfish_Obj* | ||
| 275 | LUCY_OutStream_Clone(lucy_OutStream* self) { | ||
| 276 | const LUCY_OutStream_Clone_t method = (LUCY_OutStream_Clone_t)cfish_obj_method(self, LUCY_OutStream_Clone_OFFSET); | ||
| 277 | return method(self); | ||
| 278 | } | ||
| 279 | |||
| 280 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Equals_OFFSET; | ||
| 281 | static CFISH_INLINE bool | ||
| 282 | LUCY_OutStream_Equals(lucy_OutStream* self, cfish_Obj* other) { | ||
| 283 | const LUCY_OutStream_Equals_t method = (LUCY_OutStream_Equals_t)cfish_obj_method(self, LUCY_OutStream_Equals_OFFSET); | ||
| 284 | return method(self, other); | ||
| 285 | } | ||
| 286 | |||
| 287 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Compare_To_OFFSET; | ||
| 288 | static CFISH_INLINE int32_t | ||
| 289 | LUCY_OutStream_Compare_To(lucy_OutStream* self, cfish_Obj* other) { | ||
| 290 | const LUCY_OutStream_Compare_To_t method = (LUCY_OutStream_Compare_To_t)cfish_obj_method(self, LUCY_OutStream_Compare_To_OFFSET); | ||
| 291 | return method(self, other); | ||
| 292 | } | ||
| 293 | |||
| 294 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Destroy_OFFSET; | ||
| 295 | static CFISH_INLINE void | ||
| 296 | LUCY_OutStream_Destroy(lucy_OutStream* self) { | ||
| 297 | const LUCY_OutStream_Destroy_t method = (LUCY_OutStream_Destroy_t)cfish_obj_method(self, LUCY_OutStream_Destroy_OFFSET); | ||
| 298 | method(self); | ||
| 299 | } | ||
| 300 | |||
| 301 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_To_String_OFFSET; | ||
| 302 | static CFISH_INLINE cfish_String* | ||
| 303 | LUCY_OutStream_To_String(lucy_OutStream* self) { | ||
| 304 | const LUCY_OutStream_To_String_t method = (LUCY_OutStream_To_String_t)cfish_obj_method(self, LUCY_OutStream_To_String_OFFSET); | ||
| 305 | return method(self); | ||
| 306 | } | ||
| 307 | |||
| 308 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Get_Path_OFFSET; | ||
| 309 | static CFISH_INLINE cfish_String* | ||
| 310 | LUCY_OutStream_Get_Path(lucy_OutStream* self) { | ||
| 311 | const LUCY_OutStream_Get_Path_t method = (LUCY_OutStream_Get_Path_t)cfish_obj_method(self, LUCY_OutStream_Get_Path_OFFSET); | ||
| 312 | return method(self); | ||
| 313 | } | ||
| 314 | |||
| 315 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Tell_OFFSET; | ||
| 316 | static CFISH_INLINE int64_t | ||
| 317 | LUCY_OutStream_Tell(lucy_OutStream* self) { | ||
| 318 | #ifdef CFP_LUCY | ||
| 319 | return LUCY_OutStream_Tell_IMP(self); | ||
| 320 | #else | ||
| 321 | const LUCY_OutStream_Tell_t method = (LUCY_OutStream_Tell_t)cfish_obj_method(self, LUCY_OutStream_Tell_OFFSET); | ||
| 322 | return method(self); | ||
| 323 | #endif | ||
| 324 | } | ||
| 325 | |||
| 326 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Align_OFFSET; | ||
| 327 | static CFISH_INLINE int64_t | ||
| 328 | LUCY_OutStream_Align(lucy_OutStream* self, int64_t modulus) { | ||
| 329 | #ifdef CFP_LUCY | ||
| 330 | return LUCY_OutStream_Align_IMP(self, modulus); | ||
| 331 | #else | ||
| 332 | const LUCY_OutStream_Align_t method = (LUCY_OutStream_Align_t)cfish_obj_method(self, LUCY_OutStream_Align_OFFSET); | ||
| 333 | return method(self, modulus); | ||
| 334 | #endif | ||
| 335 | } | ||
| 336 | |||
| 337 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Flush_OFFSET; | ||
| 338 | static CFISH_INLINE void | ||
| 339 | LUCY_OutStream_Flush(lucy_OutStream* self) { | ||
| 340 | #ifdef CFP_LUCY | ||
| 341 | LUCY_OutStream_Flush_IMP(self); | ||
| 342 | #else | ||
| 343 | const LUCY_OutStream_Flush_t method = (LUCY_OutStream_Flush_t)cfish_obj_method(self, LUCY_OutStream_Flush_OFFSET); | ||
| 344 | method(self); | ||
| 345 | #endif | ||
| 346 | } | ||
| 347 | |||
| 348 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Length_OFFSET; | ||
| 349 | static CFISH_INLINE int64_t | ||
| 350 | LUCY_OutStream_Length(lucy_OutStream* self) { | ||
| 351 | #ifdef CFP_LUCY | ||
| 352 | return LUCY_OutStream_Length_IMP(self); | ||
| 353 | #else | ||
| 354 | const LUCY_OutStream_Length_t method = (LUCY_OutStream_Length_t)cfish_obj_method(self, LUCY_OutStream_Length_OFFSET); | ||
| 355 | return method(self); | ||
| 356 | #endif | ||
| 357 | } | ||
| 358 | |||
| 359 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Grow_OFFSET; | ||
| 360 | static CFISH_INLINE void | ||
| 361 | LUCY_OutStream_Grow(lucy_OutStream* self, int64_t length) { | ||
| 362 | const LUCY_OutStream_Grow_t method = (LUCY_OutStream_Grow_t)cfish_obj_method(self, LUCY_OutStream_Grow_OFFSET); | ||
| 363 | method(self, length); | ||
| 364 | } | ||
| 365 | |||
| 366 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_Bytes_OFFSET; | ||
| 367 | static CFISH_INLINE void | ||
| 368 | 152 | LUCY_OutStream_Write_Bytes(lucy_OutStream* self, const void* buf, size_t len) { | |
| 369 | #ifdef CFP_LUCY | ||
| 370 | 152 | LUCY_OutStream_Write_Bytes_IMP(self, buf, len); | |
| 371 | #else | ||
| 372 | const LUCY_OutStream_Write_Bytes_t method = (LUCY_OutStream_Write_Bytes_t)cfish_obj_method(self, LUCY_OutStream_Write_Bytes_OFFSET); | ||
| 373 | method(self, buf, len); | ||
| 374 | #endif | ||
| 375 | 152 | } | |
| 376 | |||
| 377 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_I8_OFFSET; | ||
| 378 | static CFISH_INLINE void | ||
| 379 | LUCY_OutStream_Write_I8(lucy_OutStream* self, int8_t value) { | ||
| 380 | #ifdef CFP_LUCY | ||
| 381 | LUCY_OutStream_Write_I8_IMP(self, value); | ||
| 382 | #else | ||
| 383 | const LUCY_OutStream_Write_I8_t method = (LUCY_OutStream_Write_I8_t)cfish_obj_method(self, LUCY_OutStream_Write_I8_OFFSET); | ||
| 384 | method(self, value); | ||
| 385 | #endif | ||
| 386 | } | ||
| 387 | |||
| 388 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_U8_OFFSET; | ||
| 389 | static CFISH_INLINE void | ||
| 390 | LUCY_OutStream_Write_U8(lucy_OutStream* self, uint8_t value) { | ||
| 391 | #ifdef CFP_LUCY | ||
| 392 | LUCY_OutStream_Write_U8_IMP(self, value); | ||
| 393 | #else | ||
| 394 | const LUCY_OutStream_Write_U8_t method = (LUCY_OutStream_Write_U8_t)cfish_obj_method(self, LUCY_OutStream_Write_U8_OFFSET); | ||
| 395 | method(self, value); | ||
| 396 | #endif | ||
| 397 | } | ||
| 398 | |||
| 399 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_I32_OFFSET; | ||
| 400 | static CFISH_INLINE void | ||
| 401 | LUCY_OutStream_Write_I32(lucy_OutStream* self, int32_t value) { | ||
| 402 | #ifdef CFP_LUCY | ||
| 403 | LUCY_OutStream_Write_I32_IMP(self, value); | ||
| 404 | #else | ||
| 405 | const LUCY_OutStream_Write_I32_t method = (LUCY_OutStream_Write_I32_t)cfish_obj_method(self, LUCY_OutStream_Write_I32_OFFSET); | ||
| 406 | method(self, value); | ||
| 407 | #endif | ||
| 408 | } | ||
| 409 | |||
| 410 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_U32_OFFSET; | ||
| 411 | static CFISH_INLINE void | ||
| 412 | LUCY_OutStream_Write_U32(lucy_OutStream* self, uint32_t value) { | ||
| 413 | #ifdef CFP_LUCY | ||
| 414 | LUCY_OutStream_Write_U32_IMP(self, value); | ||
| 415 | #else | ||
| 416 | const LUCY_OutStream_Write_U32_t method = (LUCY_OutStream_Write_U32_t)cfish_obj_method(self, LUCY_OutStream_Write_U32_OFFSET); | ||
| 417 | method(self, value); | ||
| 418 | #endif | ||
| 419 | } | ||
| 420 | |||
| 421 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_I64_OFFSET; | ||
| 422 | static CFISH_INLINE void | ||
| 423 | LUCY_OutStream_Write_I64(lucy_OutStream* self, int64_t value) { | ||
| 424 | #ifdef CFP_LUCY | ||
| 425 | LUCY_OutStream_Write_I64_IMP(self, value); | ||
| 426 | #else | ||
| 427 | const LUCY_OutStream_Write_I64_t method = (LUCY_OutStream_Write_I64_t)cfish_obj_method(self, LUCY_OutStream_Write_I64_OFFSET); | ||
| 428 | method(self, value); | ||
| 429 | #endif | ||
| 430 | } | ||
| 431 | |||
| 432 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_U64_OFFSET; | ||
| 433 | static CFISH_INLINE void | ||
| 434 | LUCY_OutStream_Write_U64(lucy_OutStream* self, uint64_t value) { | ||
| 435 | #ifdef CFP_LUCY | ||
| 436 | LUCY_OutStream_Write_U64_IMP(self, value); | ||
| 437 | #else | ||
| 438 | const LUCY_OutStream_Write_U64_t method = (LUCY_OutStream_Write_U64_t)cfish_obj_method(self, LUCY_OutStream_Write_U64_OFFSET); | ||
| 439 | method(self, value); | ||
| 440 | #endif | ||
| 441 | } | ||
| 442 | |||
| 443 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_CI32_OFFSET; | ||
| 444 | static CFISH_INLINE void | ||
| 445 | LUCY_OutStream_Write_CI32(lucy_OutStream* self, int32_t value) { | ||
| 446 | #ifdef CFP_LUCY | ||
| 447 | LUCY_OutStream_Write_CI32_IMP(self, value); | ||
| 448 | #else | ||
| 449 | const LUCY_OutStream_Write_CI32_t method = (LUCY_OutStream_Write_CI32_t)cfish_obj_method(self, LUCY_OutStream_Write_CI32_OFFSET); | ||
| 450 | method(self, value); | ||
| 451 | #endif | ||
| 452 | } | ||
| 453 | |||
| 454 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_CU32_OFFSET; | ||
| 455 | static CFISH_INLINE void | ||
| 456 | 9 | LUCY_OutStream_Write_CU32(lucy_OutStream* self, uint32_t value) { | |
| 457 | #ifdef CFP_LUCY | ||
| 458 | 9 | LUCY_OutStream_Write_CU32_IMP(self, value); | |
| 459 | #else | ||
| 460 | const LUCY_OutStream_Write_CU32_t method = (LUCY_OutStream_Write_CU32_t)cfish_obj_method(self, LUCY_OutStream_Write_CU32_OFFSET); | ||
| 461 | method(self, value); | ||
| 462 | #endif | ||
| 463 | 9 | } | |
| 464 | |||
| 465 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_CI64_OFFSET; | ||
| 466 | static CFISH_INLINE void | ||
| 467 | LUCY_OutStream_Write_CI64(lucy_OutStream* self, int64_t value) { | ||
| 468 | #ifdef CFP_LUCY | ||
| 469 | LUCY_OutStream_Write_CI64_IMP(self, value); | ||
| 470 | #else | ||
| 471 | const LUCY_OutStream_Write_CI64_t method = (LUCY_OutStream_Write_CI64_t)cfish_obj_method(self, LUCY_OutStream_Write_CI64_OFFSET); | ||
| 472 | method(self, value); | ||
| 473 | #endif | ||
| 474 | } | ||
| 475 | |||
| 476 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_CU64_OFFSET; | ||
| 477 | static CFISH_INLINE void | ||
| 478 | LUCY_OutStream_Write_CU64(lucy_OutStream* self, uint64_t value) { | ||
| 479 | #ifdef CFP_LUCY | ||
| 480 | LUCY_OutStream_Write_CU64_IMP(self, value); | ||
| 481 | #else | ||
| 482 | const LUCY_OutStream_Write_CU64_t method = (LUCY_OutStream_Write_CU64_t)cfish_obj_method(self, LUCY_OutStream_Write_CU64_OFFSET); | ||
| 483 | method(self, value); | ||
| 484 | #endif | ||
| 485 | } | ||
| 486 | |||
| 487 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_F32_OFFSET; | ||
| 488 | static CFISH_INLINE void | ||
| 489 | LUCY_OutStream_Write_F32(lucy_OutStream* self, float value) { | ||
| 490 | #ifdef CFP_LUCY | ||
| 491 | LUCY_OutStream_Write_F32_IMP(self, value); | ||
| 492 | #else | ||
| 493 | const LUCY_OutStream_Write_F32_t method = (LUCY_OutStream_Write_F32_t)cfish_obj_method(self, LUCY_OutStream_Write_F32_OFFSET); | ||
| 494 | method(self, value); | ||
| 495 | #endif | ||
| 496 | } | ||
| 497 | |||
| 498 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_F64_OFFSET; | ||
| 499 | static CFISH_INLINE void | ||
| 500 | LUCY_OutStream_Write_F64(lucy_OutStream* self, double value) { | ||
| 501 | #ifdef CFP_LUCY | ||
| 502 | LUCY_OutStream_Write_F64_IMP(self, value); | ||
| 503 | #else | ||
| 504 | const LUCY_OutStream_Write_F64_t method = (LUCY_OutStream_Write_F64_t)cfish_obj_method(self, LUCY_OutStream_Write_F64_OFFSET); | ||
| 505 | method(self, value); | ||
| 506 | #endif | ||
| 507 | } | ||
| 508 | |||
| 509 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Write_String_OFFSET; | ||
| 510 | static CFISH_INLINE void | ||
| 511 | LUCY_OutStream_Write_String(lucy_OutStream* self, const char* buf, size_t len) { | ||
| 512 | #ifdef CFP_LUCY | ||
| 513 | LUCY_OutStream_Write_String_IMP(self, buf, len); | ||
| 514 | #else | ||
| 515 | const LUCY_OutStream_Write_String_t method = (LUCY_OutStream_Write_String_t)cfish_obj_method(self, LUCY_OutStream_Write_String_OFFSET); | ||
| 516 | method(self, buf, len); | ||
| 517 | #endif | ||
| 518 | } | ||
| 519 | |||
| 520 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Absorb_OFFSET; | ||
| 521 | static CFISH_INLINE void | ||
| 522 | LUCY_OutStream_Absorb(lucy_OutStream* self, lucy_InStream* instream) { | ||
| 523 | const LUCY_OutStream_Absorb_t method = (LUCY_OutStream_Absorb_t)cfish_obj_method(self, LUCY_OutStream_Absorb_OFFSET); | ||
| 524 | method(self, instream); | ||
| 525 | } | ||
| 526 | |||
| 527 | extern LUCY_VISIBLE uint32_t LUCY_OutStream_Close_OFFSET; | ||
| 528 | static CFISH_INLINE void | ||
| 529 | 69 | LUCY_OutStream_Close(lucy_OutStream* self) { | |
| 530 | 69 | const LUCY_OutStream_Close_t method = (LUCY_OutStream_Close_t)cfish_obj_method(self, LUCY_OutStream_Close_OFFSET); | |
| 531 | 69 | method(self); | |
| 532 | 69 | } | |
| 533 | |||
| 534 | |||
| 535 | |||
| 536 | /* Declare callbacks for wrapping host overrides. | ||
| 537 | */ | ||
| 538 | |||
| 539 | #ifdef CFISH_NO_DYNAMIC_OVERRIDES | ||
| 540 | #define Lucy_OutStream_Get_Path_OVERRIDE NULL | ||
| 541 | #define Lucy_OutStream_Grow_OVERRIDE NULL | ||
| 542 | #define Lucy_OutStream_Absorb_OVERRIDE NULL | ||
| 543 | #define Lucy_OutStream_Close_OVERRIDE NULL | ||
| 544 | #else | ||
| 545 | cfish_String* | ||
| 546 | Lucy_OutStream_Get_Path_OVERRIDE(lucy_OutStream* self); | ||
| 547 | void | ||
| 548 | Lucy_OutStream_Grow_OVERRIDE(lucy_OutStream* self, int64_t length); | ||
| 549 | void | ||
| 550 | Lucy_OutStream_Absorb_OVERRIDE(lucy_OutStream* self, lucy_InStream* instream); | ||
| 551 | void | ||
| 552 | Lucy_OutStream_Close_OVERRIDE(lucy_OutStream* self); | ||
| 553 | #endif | ||
| 554 | |||
| 555 | |||
| 556 | /* Define "short names" for this class's symbols. | ||
| 557 | */ | ||
| 558 | |||
| 559 | #ifdef LUCY_USE_SHORT_NAMES | ||
| 560 | #define OutStream lucy_OutStream | ||
| 561 | #define OUTSTREAM LUCY_OUTSTREAM | ||
| 562 | #define OutStream_open lucy_OutStream_open | ||
| 563 | #define OutStream_do_open lucy_OutStream_do_open | ||
| 564 | #define OutStream_get_class lucy_OutStream_get_class | ||
| 565 | #define OutStream_get_class_name lucy_OutStream_get_class_name | ||
| 566 | #define OutStream_is_a lucy_OutStream_is_a | ||
| 567 | #define OutStream_Get_Path_IMP LUCY_OutStream_Get_Path_IMP | ||
| 568 | #define OutStream_Tell_IMP LUCY_OutStream_Tell_IMP | ||
| 569 | #define OutStream_Align_IMP LUCY_OutStream_Align_IMP | ||
| 570 | #define OutStream_Flush_IMP LUCY_OutStream_Flush_IMP | ||
| 571 | #define OutStream_Length_IMP LUCY_OutStream_Length_IMP | ||
| 572 | #define OutStream_Grow_IMP LUCY_OutStream_Grow_IMP | ||
| 573 | #define OutStream_Write_Bytes_IMP LUCY_OutStream_Write_Bytes_IMP | ||
| 574 | #define OutStream_Write_I8_IMP LUCY_OutStream_Write_I8_IMP | ||
| 575 | #define OutStream_Write_U8_IMP LUCY_OutStream_Write_U8_IMP | ||
| 576 | #define OutStream_Write_I32_IMP LUCY_OutStream_Write_I32_IMP | ||
| 577 | #define OutStream_Write_U32_IMP LUCY_OutStream_Write_U32_IMP | ||
| 578 | #define OutStream_Write_I64_IMP LUCY_OutStream_Write_I64_IMP | ||
| 579 | #define OutStream_Write_U64_IMP LUCY_OutStream_Write_U64_IMP | ||
| 580 | #define OutStream_Write_CI32_IMP LUCY_OutStream_Write_CI32_IMP | ||
| 581 | #define OutStream_Write_CU32_IMP LUCY_OutStream_Write_CU32_IMP | ||
| 582 | #define OutStream_Write_CI64_IMP LUCY_OutStream_Write_CI64_IMP | ||
| 583 | #define OutStream_Write_CU64_IMP LUCY_OutStream_Write_CU64_IMP | ||
| 584 | #define OutStream_Write_F32_IMP LUCY_OutStream_Write_F32_IMP | ||
| 585 | #define OutStream_Write_F64_IMP LUCY_OutStream_Write_F64_IMP | ||
| 586 | #define OutStream_Write_String_IMP LUCY_OutStream_Write_String_IMP | ||
| 587 | #define OutStream_Absorb_IMP LUCY_OutStream_Absorb_IMP | ||
| 588 | #define OutStream_Close_IMP LUCY_OutStream_Close_IMP | ||
| 589 | #define OutStream_Destroy_IMP LUCY_OutStream_Destroy_IMP | ||
| 590 | #define OutStream_To_Host LUCY_OutStream_To_Host | ||
| 591 | #define OutStream_To_Host_t LUCY_OutStream_To_Host_t | ||
| 592 | #define OutStream_Clone LUCY_OutStream_Clone | ||
| 593 | #define OutStream_Clone_t LUCY_OutStream_Clone_t | ||
| 594 | #define OutStream_Equals LUCY_OutStream_Equals | ||
| 595 | #define OutStream_Equals_t LUCY_OutStream_Equals_t | ||
| 596 | #define OutStream_Compare_To LUCY_OutStream_Compare_To | ||
| 597 | #define OutStream_Compare_To_t LUCY_OutStream_Compare_To_t | ||
| 598 | #define OutStream_Destroy LUCY_OutStream_Destroy | ||
| 599 | #define OutStream_Destroy_t LUCY_OutStream_Destroy_t | ||
| 600 | #define OutStream_To_String LUCY_OutStream_To_String | ||
| 601 | #define OutStream_To_String_t LUCY_OutStream_To_String_t | ||
| 602 | #define OutStream_Get_Path LUCY_OutStream_Get_Path | ||
| 603 | #define OutStream_Get_Path_t LUCY_OutStream_Get_Path_t | ||
| 604 | #define OutStream_Tell LUCY_OutStream_Tell | ||
| 605 | #define OutStream_Tell_t LUCY_OutStream_Tell_t | ||
| 606 | #define OutStream_Align LUCY_OutStream_Align | ||
| 607 | #define OutStream_Align_t LUCY_OutStream_Align_t | ||
| 608 | #define OutStream_Flush LUCY_OutStream_Flush | ||
| 609 | #define OutStream_Flush_t LUCY_OutStream_Flush_t | ||
| 610 | #define OutStream_Length LUCY_OutStream_Length | ||
| 611 | #define OutStream_Length_t LUCY_OutStream_Length_t | ||
| 612 | #define OutStream_Grow LUCY_OutStream_Grow | ||
| 613 | #define OutStream_Grow_t LUCY_OutStream_Grow_t | ||
| 614 | #define OutStream_Write_Bytes LUCY_OutStream_Write_Bytes | ||
| 615 | #define OutStream_Write_Bytes_t LUCY_OutStream_Write_Bytes_t | ||
| 616 | #define OutStream_Write_I8 LUCY_OutStream_Write_I8 | ||
| 617 | #define OutStream_Write_I8_t LUCY_OutStream_Write_I8_t | ||
| 618 | #define OutStream_Write_U8 LUCY_OutStream_Write_U8 | ||
| 619 | #define OutStream_Write_U8_t LUCY_OutStream_Write_U8_t | ||
| 620 | #define OutStream_Write_I32 LUCY_OutStream_Write_I32 | ||
| 621 | #define OutStream_Write_I32_t LUCY_OutStream_Write_I32_t | ||
| 622 | #define OutStream_Write_U32 LUCY_OutStream_Write_U32 | ||
| 623 | #define OutStream_Write_U32_t LUCY_OutStream_Write_U32_t | ||
| 624 | #define OutStream_Write_I64 LUCY_OutStream_Write_I64 | ||
| 625 | #define OutStream_Write_I64_t LUCY_OutStream_Write_I64_t | ||
| 626 | #define OutStream_Write_U64 LUCY_OutStream_Write_U64 | ||
| 627 | #define OutStream_Write_U64_t LUCY_OutStream_Write_U64_t | ||
| 628 | #define OutStream_Write_CI32 LUCY_OutStream_Write_CI32 | ||
| 629 | #define OutStream_Write_CI32_t LUCY_OutStream_Write_CI32_t | ||
| 630 | #define OutStream_Write_CU32 LUCY_OutStream_Write_CU32 | ||
| 631 | #define OutStream_Write_CU32_t LUCY_OutStream_Write_CU32_t | ||
| 632 | #define OutStream_Write_CI64 LUCY_OutStream_Write_CI64 | ||
| 633 | #define OutStream_Write_CI64_t LUCY_OutStream_Write_CI64_t | ||
| 634 | #define OutStream_Write_CU64 LUCY_OutStream_Write_CU64 | ||
| 635 | #define OutStream_Write_CU64_t LUCY_OutStream_Write_CU64_t | ||
| 636 | #define OutStream_Write_F32 LUCY_OutStream_Write_F32 | ||
| 637 | #define OutStream_Write_F32_t LUCY_OutStream_Write_F32_t | ||
| 638 | #define OutStream_Write_F64 LUCY_OutStream_Write_F64 | ||
| 639 | #define OutStream_Write_F64_t LUCY_OutStream_Write_F64_t | ||
| 640 | #define OutStream_Write_String LUCY_OutStream_Write_String | ||
| 641 | #define OutStream_Write_String_t LUCY_OutStream_Write_String_t | ||
| 642 | #define OutStream_Absorb LUCY_OutStream_Absorb | ||
| 643 | #define OutStream_Absorb_t LUCY_OutStream_Absorb_t | ||
| 644 | #define OutStream_Close LUCY_OutStream_Close | ||
| 645 | #define OutStream_Close_t LUCY_OutStream_Close_t | ||
| 646 | #endif /* LUCY_USE_SHORT_NAMES */ | ||
| 647 | |||
| 648 | |||
| 649 | |||
| 650 | |||
| 651 | |||
| 652 | #ifdef __cplusplus | ||
| 653 | } | ||
| 654 | #endif | ||
| 655 | |||
| 656 | #endif /* H_LUCY_STORE_OUTSTREAM */ | ||
| 657 | |||
| 658 | |||
| 659 | |||
| 660 |