2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20#ifndef EVMU_EMULATOR_H
21#define EVMU_EMULATOR_H
23#include <gimbal/core/gimbal_module.h>
27
28
29
30#define EVMU_EMULATOR_TYPE (GBL_TYPEID
(EvmuEmulator))
31#define EVMU_EMULATOR(self) (GBL_CAST(EvmuEmulator, self))
33#define EVMU_EMULATOR_GET_CLASS(self) (GBL_CLASSOF(EvmuEmulator, self))
36#define GBL_SELF_TYPE EvmuEmulator
40GBL_FORWARD_DECLARE_STRUCT(EvmuDevice);
43
44
45
46
47typedef GblBool (*EvmuEmulatorIterFn)(GBL_CSELF, EvmuDevice* pDevice,
void* pClosure);
50
51
52
53
54
55
56
57
58GBL_CLASS_DERIVE_EMPTY(EvmuEmulator, GblModule, EvmuIBehavior)
60
61
62
63
64
65
66
67
68
69
78
79
80
88
89
90
91
102 EvmuEmulatorIterFn pFnIt,
103 void* pClosure) GBL_NOEXCEPT;
#define EVMU_EXPORT
Define used for adding attributes to export public symbols.
EvmuEmulator * EvmuEmulator_create(void)
Creates THE (only one) top-level EvmuEmulator instance, returning a pointer to it.
GblRefCount EvmuEmulator_unref(EvmuEmulator *pSelf)
Decrements the reference counter the gievn EvmuEmulator instance, destroying it when it hits 0.
GblVersion EvmuEmulator_version(void)
Returns the runtime version of the libElysianVMU library.
GblType EvmuEmulator_type(void)
Returns the GblType UUID associated with EvmuEmulator.
Top-level module for emulator.
EvmuDevice * EvmuEmulator_device(const EvmuEmulator *pSelf, size_t index)
Returns the device managed by the given EvmuEmulator instance at the given index.
GblBool EvmuEmulator_foreachDevice(const EvmuEmulator *pSelf, EvmuEmulatorIterFn pFnIt, void *pClosure)
Iterates over each managed EvmuDevice, passing it to pFnIt, along with pClosure.
EVMU_RESULT EvmuEmulator_addDevice(EvmuEmulator *pSelf, EvmuDevice *pDevice)
Adds the device given by pDevice to the top-level EvmuEmulator instance, taking ownership of it.
size_t EvmuEmulator_deviceCount(const EvmuEmulator *pSelf)
Returns the total number of devices owned and managed by the EvmuEmulator instance.
EVMU_RESULT EvmuEmulator_removeDevice(EvmuEmulator *pSelf, EvmuDevice *pDevice)
Removes the device given by pDevice from the top-level EvmuEmulator instance, relinquishing ownership...
#define GBL_CLASS_CAST(cType, klass)
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)