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

Go to the source code of this file.

Macros

#define GBL_TYPE_BUILTIN_COUNT
 
#define GBL_BUILTIN_TYPE(prefix)
 
Builtin Indices

Definitions providing each builtin type's index

#define GBL_TYPE_BUILTIN_INDEX_PROTOCOL
 
#define GBL_TYPE_BUILTIN_INDEX_STATIC_CLASS
 
#define GBL_TYPE_BUILTIN_INDEX_INTERFACE
 
#define GBL_TYPE_BUILTIN_INDEX_INSTANCE
 
#define GBL_TYPE_BUILTIN_INDEX_IVARIANT
 
#define GBL_TYPE_BUILTIN_INDEX_NIL
 
#define GBL_TYPE_BUILTIN_INDEX_BOOL
 
#define GBL_TYPE_BUILTIN_INDEX_CHAR
 
#define GBL_TYPE_BUILTIN_INDEX_UINT8
 
#define GBL_TYPE_BUILTIN_INDEX_INT16
 
#define GBL_TYPE_BUILTIN_INDEX_UINT16
 
#define GBL_TYPE_BUILTIN_INDEX_INT32
 
#define GBL_TYPE_BUILTIN_INDEX_UINT32
 
#define GBL_TYPE_BUILTIN_INDEX_INT64
 
#define GBL_TYPE_BUILTIN_INDEX_UINT64
 
#define GBL_TYPE_BUILTIN_INDEX_FLOAT
 
#define GBL_TYPE_BUILTIN_INDEX_DOUBLE
 
#define GBL_TYPE_BUILTIN_INDEX_STRING
 
#define GBL_TYPE_BUILTIN_INDEX_POINTER
 
Type Flag Tests

Convenience macros for testing individual type flags

#define GBL_TYPE_DEPENDENT_CHECK(type)
 
#define GBL_TYPE_CLASSED_CHECK(type)
 
#define GBL_TYPE_INTERFACED_CHECK(type)
 
#define GBL_TYPE_INSTANTIABLE_CHECK(type)
 
#define GBL_TYPE_DERIVABLE_CHECK(type)
 
#define GBL_TYPE_DEEP_DERIVABLE_CHECK(type)
 
#define GBL_TYPE_BUILTIN_CHECK(type)
 
#define GBL_TYPE_ABSTRACT_CHECK(type)
 
#define GBL_TYPE_FINAL_CHECK(type)
 
#define GBL_TYPE_ROOT_CHECK(type)
 

Enumerations

enum  GblTypeRootFlags
 

Functions

uintptr_t GblType_fromBuiltinIndex (size_t index)
 

Detailed Description

Builtin type UUIDs and Semi-Private GblType API.

This is a semi-private header which gets automatically included by gimbal_type.h, providing support for all builtin, auto-registered types as well as advanced type configuration flags for root types.

Author
2023 Falco Girgis

Definition in file gimbal_builtin_types.h.

Macro Definition Documentation

◆ GBL_TYPE_BUILTIN_INDEX_PROTOCOL

#define GBL_TYPE_BUILTIN_INDEX_PROTOCOL

Index of the builtin protocol type.

Definition at line 24 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_STATIC_CLASS

#define GBL_TYPE_BUILTIN_INDEX_STATIC_CLASS

Index of the builtin static class type.

Definition at line 25 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_INTERFACE

#define GBL_TYPE_BUILTIN_INDEX_INTERFACE

Index of the builtin interface type.

Definition at line 26 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_INSTANCE

#define GBL_TYPE_BUILTIN_INDEX_INSTANCE

Index of the builtin instance type.

Definition at line 27 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_IVARIANT

#define GBL_TYPE_BUILTIN_INDEX_IVARIANT

Index of the builtin GblIVariant type.

Definition at line 28 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_NIL

#define GBL_TYPE_BUILTIN_INDEX_NIL

Index of the builtin nil type.

Definition at line 29 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_BOOL

#define GBL_TYPE_BUILTIN_INDEX_BOOL

Index of the builtin GblBool type.

Definition at line 30 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_CHAR

#define GBL_TYPE_BUILTIN_INDEX_CHAR

Index of the builtin char type.

Definition at line 31 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_UINT8

#define GBL_TYPE_BUILTIN_INDEX_UINT8

Index of the builtin uint8_t type.

Definition at line 32 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_INT16

#define GBL_TYPE_BUILTIN_INDEX_INT16

Index of the builtin int16_t type.

Definition at line 33 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_UINT16

#define GBL_TYPE_BUILTIN_INDEX_UINT16

Index of the builtin uint16_t type.

Definition at line 34 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_INT32

#define GBL_TYPE_BUILTIN_INDEX_INT32

Index of the builtin int32_t type.

Definition at line 35 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_UINT32

#define GBL_TYPE_BUILTIN_INDEX_UINT32

Index of the builtin uint32_t type.

Definition at line 36 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_INT64

#define GBL_TYPE_BUILTIN_INDEX_INT64

Index of the builtin int64_t type.

Definition at line 37 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_UINT64

#define GBL_TYPE_BUILTIN_INDEX_UINT64

Index of the builtin uint64_t type.

Definition at line 38 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_FLOAT

#define GBL_TYPE_BUILTIN_INDEX_FLOAT

Index of the builtin float type.

Definition at line 39 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_DOUBLE

#define GBL_TYPE_BUILTIN_INDEX_DOUBLE

Index of the builtin double type.

Definition at line 40 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_STRING

#define GBL_TYPE_BUILTIN_INDEX_STRING

Index of the builtin string type.

Definition at line 41 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_INDEX_POINTER

#define GBL_TYPE_BUILTIN_INDEX_POINTER

Index of the builtin pointer type.

Definition at line 42 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_COUNT

#define GBL_TYPE_BUILTIN_COUNT

Number of builtin types.

Definition at line 45 of file gimbal_builtin_types.h.

◆ GBL_BUILTIN_TYPE

#define GBL_BUILTIN_TYPE (   prefix)

Returns a type from the macro prefix of a builtin type.

Definition at line 48 of file gimbal_builtin_types.h.

68 {
69 GBL_TYPE_ROOT_FLAG_DEPENDENT = (1 << 0), //!< Type is dependent upon other types in dependency list
70 GBL_TYPE_ROOT_FLAG_CLASSED = (1 << 1), //!< Type has an associated GblClass
71 GBL_TYPE_ROOT_FLAG_INTERFACED = (1 << 2), //!< Type has an associated GblInterface as its class (cannot be instantiable)
72 GBL_TYPE_ROOT_FLAG_INSTANTIABLE = (1 << 3), //!< Type has an associated GblInstance
73 GBL_TYPE_ROOT_FLAG_DERIVABLE = (1 << 4), //!< Type supports single-level inheritance
74 GBL_TYPE_ROOT_FLAG_DEEP_DERIVABLE = (1 << 5), //!< Type suppports multi-level inheritance
75 GBL_TYPE_ROOT_FLAGS_MASK = GBL_TYPE_ROOT_FLAG_DEPENDENT | //!< Mask of all GblRootTypeFlag values
82
83//! Retrieves the GblType UUID associated with the given \p index of a builtin type
84GBL_EXPORT uintptr_t GblType_fromBuiltinIndex (size_t index) GBL_NOEXCEPT;
85
86#endif // GIMBAL_BUILTIN_TYPES_H
GblTypeRootFlags
Flags controlling behavior of root or fundemental GblTypes. These can only be set on root types and a...
@ GBL_TYPE_ROOT_FLAGS_MASK
Mask of all GblRootTypeFlag values.
@ GBL_TYPE_ROOT_FLAG_DEEP_DERIVABLE
Type suppports multi-level inheritance.
@ GBL_TYPE_ROOT_FLAG_INSTANTIABLE
Type has an associated GblInstance.
@ GBL_TYPE_ROOT_FLAG_DERIVABLE
Type supports single-level inheritance.
@ GBL_TYPE_ROOT_FLAG_INTERFACED
Type has an associated GblInterface as its class (cannot be instantiable)
@ GBL_TYPE_ROOT_FLAG_CLASSED
Type has an associated GblClass.
@ GBL_TYPE_ROOT_FLAG_DEPENDENT
Type is dependent upon other types in dependency list.
uintptr_t GblType_fromBuiltinIndex(size_t index)
Retrieves the GblType UUID associated with the given index of a builtin type.

◆ GBL_TYPE_DEPENDENT_CHECK

#define GBL_TYPE_DEPENDENT_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_ROOT_FLAG_DEPENDENT flag.

Definition at line 56 of file gimbal_builtin_types.h.

◆ GBL_TYPE_CLASSED_CHECK

#define GBL_TYPE_CLASSED_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_ROOT_FLAG_CLASSED flag.

Definition at line 57 of file gimbal_builtin_types.h.

◆ GBL_TYPE_INTERFACED_CHECK

#define GBL_TYPE_INTERFACED_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_ROOT_FLAG_INTERFACED flag.

Definition at line 58 of file gimbal_builtin_types.h.

◆ GBL_TYPE_INSTANTIABLE_CHECK

#define GBL_TYPE_INSTANTIABLE_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_ROOT_FLAG_INSTANTIABLE flag.

Definition at line 59 of file gimbal_builtin_types.h.

◆ GBL_TYPE_DERIVABLE_CHECK

#define GBL_TYPE_DERIVABLE_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_ROOT_FLAG_DERIVABLE flag.

Definition at line 60 of file gimbal_builtin_types.h.

◆ GBL_TYPE_DEEP_DERIVABLE_CHECK

#define GBL_TYPE_DEEP_DERIVABLE_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_ROOT_FLAG_DEEP_DERIVABLE flag.

Definition at line 61 of file gimbal_builtin_types.h.

◆ GBL_TYPE_BUILTIN_CHECK

#define GBL_TYPE_BUILTIN_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_BUILTIN flag.

Definition at line 62 of file gimbal_builtin_types.h.

◆ GBL_TYPE_ABSTRACT_CHECK

#define GBL_TYPE_ABSTRACT_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_ABSTRACT flag.

Definition at line 63 of file gimbal_builtin_types.h.

◆ GBL_TYPE_FINAL_CHECK

#define GBL_TYPE_FINAL_CHECK (   type)

Convenience macro checking a GblType's GBL_TYPE_FINAL flag ///<.

Convenience macro for testing whether a given type is fundamental ///<

Convenience macro for testing whether a given type is valid ///<

Convenience macro for testing whether a given type can be stored within a GblVariant

Definition at line 64 of file gimbal_builtin_types.h.

◆ GBL_TYPE_ROOT_CHECK

#define GBL_TYPE_ROOT_CHECK (   type)

Definition at line 65 of file gimbal_builtin_types.h.

Enumeration Type Documentation

◆ GblTypeRootFlags

Flags controlling behavior of root or fundemental GblTypes. These can only be set on root types and are inherited.

Enumerator
GBL_TYPE_ROOT_FLAG_DEPENDENT 

Type is dependent upon other types in dependency list.

GBL_TYPE_ROOT_FLAG_CLASSED 

Type has an associated GblClass.

GBL_TYPE_ROOT_FLAG_INTERFACED 

Type has an associated GblInterface as its class (cannot be instantiable)

GBL_TYPE_ROOT_FLAG_INSTANTIABLE 

Type has an associated GblInstance.

GBL_TYPE_ROOT_FLAG_DERIVABLE 

Type supports single-level inheritance.

GBL_TYPE_ROOT_FLAG_DEEP_DERIVABLE 

Type suppports multi-level inheritance.

GBL_TYPE_ROOT_FLAGS_MASK 

Mask of all GblRootTypeFlag values.

Definition at line 69 of file gimbal_builtin_types.h.

69 {
70 GBL_TYPE_ROOT_FLAG_DEPENDENT = (1 << 0), //!< Type is dependent upon other types in dependency list
71 GBL_TYPE_ROOT_FLAG_CLASSED = (1 << 1), //!< Type has an associated GblClass
72 GBL_TYPE_ROOT_FLAG_INTERFACED = (1 << 2), //!< Type has an associated GblInterface as its class (cannot be instantiable)
73 GBL_TYPE_ROOT_FLAG_INSTANTIABLE = (1 << 3), //!< Type has an associated GblInstance
74 GBL_TYPE_ROOT_FLAG_DERIVABLE = (1 << 4), //!< Type supports single-level inheritance
75 GBL_TYPE_ROOT_FLAG_DEEP_DERIVABLE = (1 << 5), //!< Type suppports multi-level inheritance
76 GBL_TYPE_ROOT_FLAGS_MASK = GBL_TYPE_ROOT_FLAG_DEPENDENT | //!< Mask of all GblRootTypeFlag values

Function Documentation

◆ GblType_fromBuiltinIndex()

uintptr_t GblType_fromBuiltinIndex ( size_t  index)

Retrieves the GblType UUID associated with the given index of a builtin type.