libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
struct | GblInstance |
Macros | |
Instance Root Type | |
UUID and cast operators | |
#define | GBL_INSTANCE_TYPE |
#define | GBL_INSTANCE(self) |
#define | GBL_INSTANCE_GET_CLASS(self) |
Instance Operators | |
Builtin operations for Instance-derived types |
Functions | |
Lifetime Management | |
Constructors and Destructors | |
GblInstance * | GblInstance_create (GblType type, size_t publicSize, GblClass *pClass) |
GBL_RESULT | GblInstance_construct (GblInstance *pSelf, GblType type, GblClass *pClass) |
GblRefCount | GblInstance_destroy (GblInstance *pSelf) |
GblRefCount | GblInstance_destruct (GblInstance *pSelf) |
GblInstance structure and related functions.
This file contains the API for the GblInstance type, which is the most low-level, minimalistic primitive instantiable type within the type-system. It's the root of all other instantiables and contains nothing other than a pointer to its GblClass.
Definition in file gimbal_instance.h.
#define GBL_INSTANCE_TYPE |
Type UUID for GblInstance.
Definition at line 26 of file gimbal_instance.h.
#define GBL_INSTANCE | ( | self | ) |
Casts GblInstance-compatible to GblInstance.
Definition at line 27 of file gimbal_instance.h.
#define GBL_INSTANCE_GET_CLASS | ( | self | ) |
Extracts the class from a GblInstance.
Definition at line 28 of file gimbal_instance.h.
GblInstance * GblInstance_create | ( | GblType | type, |
size_t | publicSize, | ||
GblClass * | pClass | ||
) |
Creates and returns an instance, optionally with an extended size and/or non-default class.
GBL_RESULT GblInstance_construct | ( | GblInstance * | pSelf, |
GblType | type, | ||
GblClass * | pClass | ||
) |
Constructs an instance, optionally with a non-default class, returning a result code.
|
related |
Destructs and deallocates an instance. It must have been created with GblInstance_create().
GblRefCount GblInstance_destruct | ( | GblInstance * | pSelf | ) |
Destructs but doesn't deallocate an instance. It must have been created with GblInstance_construct().
Equivalent to GblInstance_destroy(), except that the allocation is not deallocated.
This is equivalent to a placement delete operation in C++.
pSelf | existing allocation |