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
 

Macros

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)
 
Reference Management

Macros for convenient lifetime control.

#define GBL_REF(box)
 
#define GBL_UNREF(box)
 

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, 2025 Falco Girgis
Todo
  • GblBoxClass_destructing()?

Definition in file gimbal_box.h.

Macro Definition Documentation

◆ GBL_BOX_TYPE

#define GBL_BOX_TYPE

GblType UUID of a GblBox.

Definition at line 32 of file gimbal_box.h.

◆ GBL_BOX

#define GBL_BOX ( self)

Casts a GblInstance to GblBox.

Definition at line 33 of file gimbal_box.h.

◆ GBL_BOX_CLASS

#define GBL_BOX_CLASS ( klass)

Casts a GblClass to GblBoxClass.

Definition at line 34 of file gimbal_box.h.

◆ GBL_BOX_GET_CLASS

#define GBL_BOX_GET_CLASS ( self)

Gets a GblBoxClass from a GblInstance.

Definition at line 35 of file gimbal_box.h.

◆ GBL_REF

#define GBL_REF ( box)

Auto-casting convenience macro around GblBox_ref()

Definition at line 42 of file gimbal_box.h.

◆ GBL_UNREF

#define GBL_UNREF ( box)

Auto-casting convenience macro around GblBox_unref()

Definition at line 43 of file gimbal_box.h.