2
3
4
5
6
7
8
9
10
11
12
14#include "../../core/gimbal_typedefs.h"
15#include "../../core/gimbal_decls.h"
17#ifndef GIMBAL_BUILTIN_TYPES_H
18#define GIMBAL_BUILTIN_TYPES_H
21
22
23
24#define GBL_TYPE_BUILTIN_INDEX_PROTOCOL 0
25#define GBL_TYPE_BUILTIN_INDEX_STATIC_CLASS 1
26#define GBL_TYPE_BUILTIN_INDEX_INTERFACE 2
27#define GBL_TYPE_BUILTIN_INDEX_INSTANCE 3
28#define GBL_TYPE_BUILTIN_INDEX_IVARIANT 4
29#define GBL_TYPE_BUILTIN_INDEX_NIL 5
30#define GBL_TYPE_BUILTIN_INDEX_BOOL 6
31#define GBL_TYPE_BUILTIN_INDEX_CHAR 7
32#define GBL_TYPE_BUILTIN_INDEX_UINT8 8
33#define GBL_TYPE_BUILTIN_INDEX_INT16 9
34#define GBL_TYPE_BUILTIN_INDEX_UINT16 10
35#define GBL_TYPE_BUILTIN_INDEX_INT32 11
36#define GBL_TYPE_BUILTIN_INDEX_UINT32 12
37#define GBL_TYPE_BUILTIN_INDEX_INT64 13
38#define GBL_TYPE_BUILTIN_INDEX_UINT64 14
39#define GBL_TYPE_BUILTIN_INDEX_FLOAT 15
40#define GBL_TYPE_BUILTIN_INDEX_DOUBLE 16
41#define GBL_TYPE_BUILTIN_INDEX_STRING 17
42#define GBL_TYPE_BUILTIN_INDEX_POINTER 18
45#define GBL_TYPE_BUILTIN_COUNT 19
48#define GBL_BUILTIN_TYPE(prefix)
49 (GblType_fromBuiltinIndex(GBL_TYPE_BUILTIN_INDEX_##prefix))
53
54
56#define GBL_TYPE_DEPENDENT_CHECK(type) (GblType_flags(type) & GBL_TYPE_ROOT_FLAG_DEPENDENT)
57#define GBL_TYPE_CLASSED_CHECK(type) (GblType_flags(type) & GBL_TYPE_ROOT_FLAG_CLASSED)
58#define GBL_TYPE_INTERFACED_CHECK(type) (GblType_flags(type) & GBL_TYPE_ROOT_FLAG_INTERFACED)
59#define GBL_TYPE_INSTANTIABLE_CHECK(type) (GblType_flags(type) & GBL_TYPE_ROOT_FLAG_INSTANTIABLE)
60#define GBL_TYPE_DERIVABLE_CHECK(type) (GblType_flags(type) & GBL_TYPE_ROOT_FLAG_DERIVABLE)
61#define GBL_TYPE_DEEP_DERIVABLE_CHECK(type) (GblType_flags(type) & GBL_TYPE_ROOT_FLAG_DEEP_DERIVABLE)
62#define GBL_TYPE_BUILTIN_CHECK(type) (GblType_flags(type) & GBL_TYPE_FLAG_BUILTIN)
63#define GBL_TYPE_ABSTRACT_CHECK(type) (GblType_flags(type) & GBL_TYPE_FLAG_ABSTRACT)
64#define GBL_TYPE_FINAL_CHECK(type) (GblType_flags(type) & GBL_TYPE_FLAG_FINAL)
65#define GBL_TYPE_ROOT_CHECK(type) (GblType_root(type) == type)
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.