2
3
4
5
6
7
8
9
10
11
12
13#ifndef GIMBAL_MODULE_H
14#define GIMBAL_MODULE_H
16#include "../meta/instances/gimbal_context.h"
17#include "../meta/ifaces/gimbal_iplugin.h"
18#include "../strings/gimbal_string_ref.h"
19#include "../utils/gimbal_version.h"
22
23
24
26#define GBL_MODULE(self) (GBL_CAST(GblModule, self))
28#define GBL_MODULE_GET_CLASS(self) (GBL_CLASSOF(GblModule, self))
31#define GBL_REQUIRE(...) GBL_REQUIRE_
(__VA_ARGS__)
33#define GBL_SELF_TYPE GblModule
41typedef GblBool (*GblModuleIterFn)(GblModule* pIt,
void* pClosure);
44
45
46
47
48
49
50
51
52
53
54
61
62
63
64
65
66
67
68
69
70
71
72
73
74
104GBL_EXPORT GblModule* GblModule_require (
const char* pName,
105 const char* pVersion,
111 const char* pVersion,
122 const char* pDescription,
142 const GblTypeInfo* pInfo,
156#define GBL_REQUIRE_(...)
159#define GBL_REQUIRE__1(type)
163#define GBL_REQUIRE__2(type, name)
167#define GBL_REQUIRE__3(type, name, version)
168 GBL_CAST(type, GblModule_require(name, version, __FILE__, __func__,
#define GBL_CLASS_CAST(cType, klass)
#define GBL_FORWARD_DECLARE_STRUCT(S)
#define GBL_TYPEID(instanceStruct)
#define GBL_INSTANCE_DERIVE(derivedInstance, baseInstance)
#define GBL_CLASS_DERIVE(...)
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)
#define GBL_VA_OVERLOAD_CALL(BASE, SUFFIXER,...)
#define GBL_VA_OVERLOAD_SUFFIXER_ARGC(...)
#define GBL_INT16_TYPE
Builtin ID for int16_t GblVariant type.
#define GBL_STRING_TYPE
Builtin ID for string GblVariant type.
#define GBL_UINT32_TYPE
Builtin ID for uint32_t GblVariant type.
#define GBL_PROPERTIES(object,...)
Declares a list of properties for the given object/instance structure.
uint32_t GblFlags
Standard-sized flags type, 32-bits across platforms.
uint8_t GblBool
Basic boolean type, standardized to sizeof(char)
uint16_t GblRefCount
Type able to hold a reference counter across the codebase.
uintptr_t GblQuark
Uniquely identifiable interned string type.
const char GblStringRef
Reference-counted, const char*-compatible string type.
uint32_t GblVersion
32-bit unsigned integer representing a packed version in the form (MAJOR.MINOR.PATCH)
Dynamically loadable service and associated meta types.
GblStringRef * pDescription
Description of a module.
GblStringRef * pAuthor
Author(s) of a module.
GblStringRef * pPrefix
Namespace prefix of a module.
GblOptionGroup * pOptionGroup
Command-line option handler of a module.
GblVersion version
Version of a module.