libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal_box.h File Reference

Go to the source code of this file.

Data Structures

struct  GblBoxClass
 
struct  GblBox
 

Macros

#define GBL_REF(box)
 
#define GBL_UNREF(box)
 
Type System

Type UUID and Cast operators

#define GBL_BOX_TYPE
 
#define GBL_BOX(self)
 
#define GBL_BOX_CLASS(klass)
 
#define GBL_BOX_GET_CLASS(self)
 

Functions

Floating Classes

Methods for managing floating classes

GblBoxClassGblBoxClass_createFloating (GblType derivedType, size_t size, void *pUserdata, GblArrayMapDtorFn pFnUdDtor)
 
GBL_RESULT GblBoxClass_constructFloating (GblBoxClass *pSelf, GblType derivedType, void *pUserdata, GblArrayMapDtorFn pFnUdDtor)
 
Constructors

Overloaded constructors for GblBox

GblBoxGblBox_create (GblType derived, size_t size, void *pUserdata, GblArrayMapDtorFn pFnUdDtor, GblBoxClass *pClass)
 
GBL_RESULT GblBox_construct (GblBox *pSelf, GblType derived, void *pUserdata, GblArrayMapDtorFn pFnUdDtor, GblBoxClass *pClass)
 

Detailed Description

GblBox (reference-counted, opaque userdata), and related functions.

GblBox represents the most minimal type within the type system that is still runtime extensible and still offers everything typically required for an object to have bindings to another language. A GblBox extends GblInstance with:

  • Reference counting/shared pointer semantics
  • Arbitrary userdata storage corresponding destructors
Author
2023 Falco Girgis

Definition in file gimbal_box.h.

Macro Definition Documentation

◆ GBL_BOX_TYPE

#define GBL_BOX_TYPE

GblType UUID of a GblBox.

Definition at line 27 of file gimbal_box.h.

◆ GBL_BOX

#define GBL_BOX (   self)

Casts a GblInstance to GblBox.

Definition at line 28 of file gimbal_box.h.

◆ GBL_BOX_CLASS

#define GBL_BOX_CLASS (   klass)

Casts a GblClass to GblBoxClass.

Definition at line 29 of file gimbal_box.h.

◆ GBL_BOX_GET_CLASS

#define GBL_BOX_GET_CLASS (   self)

Gets a GblBoxClass from a GblInstance.

Definition at line 30 of file gimbal_box.h.

◆ GBL_REF

#define GBL_REF (   box)

Auto-casting convenience macro around GblBox_ref()

Definition at line 33 of file gimbal_box.h.

◆ GBL_UNREF

#define GBL_UNREF (   box)

Auto-casting convenience macro around GblBox_unref()

Definition at line 34 of file gimbal_box.h.

Function Documentation

◆ GblBoxClass_createFloating()

GblBoxClass * GblBoxClass_createFloating ( GblType  derivedType,
size_t  size,
void *  pUserdata,
GblArrayMapDtorFn  pFnUdDtor 
)

Creates an extended floating class, setting its properties to the given values. Has default values.

◆ GblBoxClass_constructFloating()

GBL_RESULT GblBoxClass_constructFloating ( GblBoxClass pSelf,
GblType  derivedType,
void *  pUserdata,
GblArrayMapDtorFn  pFnUdDtor 
)

Constructs an extended floating class in-place, setting its properties to the given values. Has default values.

◆ GblBox_create()

GblBox * GblBox_create ( GblType  derived,
size_t  size,
void *  pUserdata,
GblArrayMapDtorFn  pFnUdDtor,
GblBoxClass pClass 
)

Creates a GblBox instance of the derived type and returns a pointer to it. Has default arguments.

◆ GblBox_construct()

GBL_RESULT GblBox_construct ( GblBox pSelf,
GblType  derived,
void *  pUserdata,
GblArrayMapDtorFn  pFnUdDtor,
GblBoxClass pClass 
)

Constructs a GblBox instance of the derived type in-place, returning a result status code.