9 #ifndef TEMU_OBJSYS_C_H 10 #define TEMU_OBJSYS_C_H 24 #define TEMU_PLUGIN_INIT extern "C" TEMU_API void temu_pluginInit(void) 26 #define TEMU_PLUGIN_INIT TEMU_API void temu_pluginInit(void) 29 #if defined(__has_attribute) 30 #if __has_attribute(annotate) 31 #define TEMU_NO_WRAP __attribute__((annotate("temu-no-wrap"))) 36 #if (__cplusplus < 201103L) && !defined(nullptr) 41 #if !defined(TEMU_NO_WRAP) 45 #ifndef TEMU_BUFF_DEFINED 46 #define TEMU_BUFF_DEFINED 52 #endif // !TEMU_BUFF_DEFINED 54 #ifndef TEMU_COMPONENT_DEFINED 55 #define TEMU_COMPONENT_DEFINED 57 #endif // !TEMU_COMPONENT_DEFINED 180 #define TEMU_IFACE_REFERENCE_TYPE(N) \ 188 N##IfaceRef *Ifaces; \ 189 } N##IfaceRefArray; \ 190 static inline N##IfaceRefArray N##IfaceRefArrayAlloc(unsigned Reserve) \ 192 temu_IfaceRefArray Arr = temu_ifaceRefArrayAlloc(Reserve); \ 193 N##IfaceRefArray Res; \ 194 Res.Size = Arr.Size; \ 195 Res.Reserved = Arr.Reserved; \ 196 Res.Ifaces = (N##IfaceRef *)Arr.Ifaces; \ 199 static inline void N##IfaceRefArrayDispose(N##IfaceRefArray *Arr) \ 201 temu_ifaceRefArrayDispose((temu_IfaceRefArray *)Arr); \ 203 static inline void N##IfaceRefArrayPush2(N##IfaceRefArray *Arr, \ 204 temu_Object_ *Obj, void *Iface) \ 206 temu_ifaceRefArrayPush2((temu_IfaceRefArray *)Arr, Obj, Iface); \ 208 static inline void N##IfaceRefArrayPush(N##IfaceRefArray *Arr, \ 211 temu_IfaceRef Iface2; \ 212 Iface2.Obj = Iface.Obj; \ 213 Iface2.Iface = (void *)Iface.Iface; \ 215 temu_ifaceRefArrayPush((temu_IfaceRefArray *)Arr, Iface2); \ 217 static inline unsigned N##IfaceRefArraySize(N##IfaceRefArray *Arr) \ 221 static inline void N##IfaceRefArrayPop(N##IfaceRefArray *Arr) { Arr->Size--; } 223 #define TEMU_DYN_ARRAY_TYPE(T, P) \ 229 static inline temu_##P##Array TEMU_MAYBE_UNUSED temu_##P##ArrayAlloc( \ 232 assert(Reserve > 0); \ 233 temu_##P##Array Arr; \ 235 Arr.Reserved = Reserve; \ 236 Arr.Values = (T *)calloc(Reserve, sizeof(T)); \ 237 assert(Arr.Values); \ 240 static inline void TEMU_MAYBE_UNUSED temu_##P##ArrayPush( \ 241 temu_##P##Array *Arr, T Val) \ 243 if (Arr->Reserved >= Arr->Size) { \ 244 T *NewValues = (T *)realloc(Arr->Values, Arr->Reserved * 2); \ 246 Arr->Values = NewValues; \ 251 Arr->Values[Arr->Size++] = Val; \ 253 static inline unsigned TEMU_MAYBE_UNUSED temu_##P##ArraySize( \ 254 temu_##P##Array *Arr) \ 258 static inline void TEMU_MAYBE_UNUSED temu_##P##ArrayPop( \ 259 temu_##P##Array *Arr) \ 416 #define TEMU_NULL_ARG \ 418 NULL, { teTY_Invalid } \ 421 typedef void *(*temu_ObjectCreateFunc)(
const char *Name,
int Argc,
635 #ifdef PROP_ASSERTS_ENABLED 636 #define PROP_ASSERT(p, t) assert(p.Typ == t && "invalid property type") 638 #define PROP_ASSERT(p, t) 646 #define PROP_VAL_INITIALIZER(typ, suffix, typetag, valtag) \ 647 static inline temu_Propval temu_makeProp##suffix(typ val) \ 654 static inline typ temu_propValue##suffix(temu_Propval pv) \ 656 PROP_ASSERT(pv.Typ, typetag); \ 657 typ val = pv.valtag; \ 707 const
char *PropName);
775 const char *PropName);
798 const char *PropName);
808 const char *PropName);
828 const char *IfaceName);
1149 uint8_t Val,
int Idx);
1160 uint16_t Val,
int Idx);
1171 uint32_t Val,
int Idx);
1182 uint64_t Val,
int Idx);
1193 int8_t Val,
int Idx);
1204 int16_t Val,
int Idx);
1215 int32_t Val,
int Idx);
1226 int64_t Val,
int Idx);
1248 uint8_t Val,
int Idx);
1259 uint16_t Val,
int Idx);
1270 uint32_t Val,
int Idx);
1281 uint64_t Val,
int Idx);
1292 int8_t Val,
int Idx);
1303 int16_t Val,
int Idx);
1314 int32_t Val,
int Idx);
1325 int64_t Val,
int Idx);
1367 const char *Doc =
"");
1437 const char *Category);
1447 unsigned CategoryId);
1480 const char *IfaceType);
1501 int Offset,
const char *TypeName,
1502 int Count,
unsigned Flags,
1525 const char *TypeName,
int Count,
unsigned Flags,
1549 const char *IfaceName,
const char *Doc);
1574 const char *IfaceType,
void *Iface,
1575 int DeprecatedParam = 0,
const char *Doc =
"");
1592 const char *IfaceName,
const char *IfaceType,
1593 void *Iface,
int DeprecatedParam,
1610 const char *IfaceName,
int Idx);
1640 const char *IfaceType,
void *Iface,
1641 size_t Count,
size_t Size,
1693 #define TEMU_QUAL_NONE 0 1694 #define TEMU_QUAL_CPU 1 1695 #define TEMU_QUAL_MACHINE 2 1696 #define TEMU_QUAL_MEMORY 4 1697 #define TEMU_QUAL_COMPONENT 5 1698 #define TEMU_QUAL_CLOCK 6 1702 #define TEMU_QUAL_USER 65536 1803 const char *ObjName,
2097 int Count,
void *Data);
2197 void (*serialise)(
void *Obj,
const char *BaseName,
void *Ctxt);
2208 void (*deserialise)(
void *Obj,
const char *BaseName,
void *Ctxt);
2216 int (*checkSanity)(
void *Obj,
int Report);
2224 void (*timeSourceSet)(
void *Obj);
2232 void (*printObject)(
void *Obj);
2234 #define TEMU_OBJECT_IFACE_TYPE "ObjectIface" 2385 const char *PropName,
2408 uint64_t Val,
int Idx);
2431 uint64_t Val,
int Idx);
temu_ObjectDisposeFunc Dispose
Destructor / dispose function for disposing instances of the class.
Definition: Objsys.h:440
TEMU_API void temu_writeValueUnsigned(temu_Object_ *Obj, const char *PropName, uint64_t Val, int Idx)
TEMU_API temu_Propval temu_unsignedPropval(temu_Type T, uint64_t U)
TEMU_API void temu_writeValue(temu_Object_ *Obj, const char *PropName, temu_Propval Val, int Idx) TEMU_NO_WRAP
int8_t i8
Definition: Objsys.h:382
TEMU_API void temu_qualifyAsCpu(temu_Class *Cls)
void temu_MetaIface
Definition: Objsys.h:60
TEMU_API size_t temu_vecGetSize(temu_Vector *Vec)
temu_Type Typ
Type of vector data.
Definition: Objsys.h:346
16-bit fixed width unsigned integer
Definition: Objsys.h:295
struct temu_Propref temu_Propref
void(* temu_PropWriter)(void *Obj, temu_Propval Pv, int Idx)
Definition: Objsys.h:687
TEMU_API int temu_inlineDeserialiseJSON(const char *FileName)
TEMU_API temu_List temu_listCreate(temu_Type Typ)
TEMU_API int temu_getPropLength(const temu_Object_ *Obj, const char *PropName)
Definition: Objsys.h:1848
Single precision floating point value.
Definition: Objsys.h:290
const char * String
Definition: Objsys.h:390
#define TEMU_IFACE_REFERENCE_TYPE(N)
Definition: Objsys.h:180
TEMU_API uint8_t temu_getValueU8(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API void temu_writeValueU64(temu_Object_ *Obj, const char *PropName, uint64_t Val, int Idx)
TEMU_API temu_PropAccessor temu_getPropAccessor(temu_Object *Obj, const char *PropName, int PropIdx)
TEMU_API temu_IfaceRef temu_getInterfaceRef(temu_Object_ *Obj, const char *IfaceName, int Idx)
TEMU_API int8_t temu_readValueI8(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API int64_t temu_getValueSigned(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API int temu_getPropDynLength(const temu_Object_ *Obj, const char *PropName)
TEMU_API int temu_objectHasProp(const temu_Object_ *Obj, const char *PropName)
struct temu_PropAccessor temu_PropAccessor
TEMU_API int temu_propInfoForClass(temu_Class *Cls, unsigned PIIndex, unsigned PICount, temu_PropInfo *PI)
TEMU_API int32_t temu_readValueI32(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API int temu_deserialiseJSON(const char *FileName)
TEMU_API int temu_isSigned(temu_Propval Pv)
TEMU_API void temu_addPseudoInterfaceReference(temu_Class *Cls, const char *PropName, const char *TypeName, int Count, unsigned Flags, temu_PropWriter Wr, temu_PropReader Rd, temu_PropWriter Set, temu_PropReader Get, const char *Doc)
TEMU_API void temu_qualifyAsMachine(temu_Class *Cls)
temu_Type Typ
Element type in list.
Definition: Objsys.h:356
temu_PropReader Getter
Getter function if applicable.
Definition: Objsys.h:736
uint64_t IsClassObject
The object is a class object.
Definition: Objsys.h:95
TEMU_API int temu_objectHasCmd(const temu_Object_ *Obj, const char *CmdName)
temu_ListNode * Tail
Managed pointer, do not use directly.
Definition: Objsys.h:358
#define TEMU_NONNULL
Definition: Attributes.h:48
TEMU_API void temu_objsysClearObjects(void)
TEMU_API int temu_isReal(temu_Propval Pv)
temu_Type Typ
Type tag.
Definition: Objsys.h:1850
TEMU_API void temu_vecPush(temu_Vector *Vec, temu_Propval Val)
uint16_t u16
Definition: Objsys.h:378
TEMU_API temu_Propval temu_dictGetValue(temu_Dict *Dict, const char *Name)
void(* writeProp)(struct temu_PropAccessor *accessor, temu_Propval pv)
Write property via accessor.
Definition: Objsys.h:739
TEMU_API void temu_writeValueU32(temu_Object_ *Obj, const char *PropName, uint32_t Val, int Idx)
void * UserData
User data pointer. This is not saved in snapshots.
Definition: Objsys.h:93
Interface reference.
Definition: Objsys.h:311
TEMU_API temu_Propval temu_getValue(temu_Object_ *Obj, const char *PropName, int Idx) TEMU_NO_WRAP
TEMU_API int64_t temu_readValueSigned(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API int temu_writeProp(temu_Object_ *Obj, const char *Name, int idx, temu_Propval *PV)
uint64_t u64
Definition: Objsys.h:380
32-bit fixed width signed integer
Definition: Objsys.h:300
TEMU_API int temu_serialiseJSON(const char *FileName)
TEMU_API int temu_isComponent(const temu_Object_ *Obj)
TEMU_API int temu_loadPlugin(const char *PluginName)
TEMU_API void temu_addProperty(temu_Class *Cls, const char *PropName, int Offset, temu_Type Typ, int Count, temu_PropWriter Wr, temu_PropReader Rd, const char *Doc)
TEMU_API void temu_writeValueU8(temu_Object_ *Obj, const char *PropName, uint8_t Val, int Idx)
TEMU_API void temu_foreachClass(void(*Func)(temu_Class *, void *), void *Arg)
TEMU_API void temu_disposeObject(temu_Object_ *Obj)
TEMU_API void temu_setValueU64(temu_Object_ *Obj, const char *PropName, uint64_t Val, int Idx)
TEMU_API void temu_vecDispose(temu_Vector *Vec)
TEMU_API int temu_isCpu(const temu_Object_ *Obj)
TEMU_API double temu_getValueDouble(temu_Object_ *Obj, const char *PropName, int Idx)
const char * Name
Property name.
Definition: Objsys.h:337
TEMU_API const char * temu_getInterfaceName(temu_Object *Obj, void *Iface)
64-bit fixed width unsigned integer
Definition: Objsys.h:297
TEMU_API void temu_setValueDouble(temu_Object_ *Obj, const char *PropName, double Val, int Idx)
TEMU_API void temu_qualifyAsMemory(temu_Class *Cls)
TEMU_API temu_IfaceRef temu_ifaceRefArrayGet(temu_IfaceRefArray *Arr, unsigned idx)
int16_t i16
Definition: Objsys.h:383
TEMU_API int64_t temu_readValueI64(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API int temu_indexForInterface(const temu_Object_ *Obj, const void *Iface)
const char * Key
Name of argument.
Definition: Objsys.h:412
TEMU_API int temu_snapshotGetLength(void *Ctxt, const char *Name)
intptr_t IntPtr
Definition: Objsys.h:371
TEMU_API void temu_setValue(temu_Object_ *Obj, const char *PropName, temu_Propval Val, int Idx) TEMU_NO_WRAP
TEMU_API temu_Propval temu_floatingPointPropval(temu_Type T, double V)
#define TEMU_NO_WRAP
Definition: Objsys.h:42
TEMU_API temu_ListNode * temu_listGetTail(temu_List *List)
temu_IfaceRef IfaceRef
Definition: Objsys.h:388
temu_PropWriter Writer
Writer function if applicable.
Definition: Objsys.h:733
TEMU_API void temu_listPrepend(temu_List *List, temu_Propval Val)
TEMU_API temu_Propval temu_listNodeGetVal(temu_ListNode *Node)
char * Name
Object name.
Definition: Objsys.h:84
int64_t WillDisposeNotification
Definition: Objsys.h:88
TEMU_API int temu_isUnsigned(temu_Propval Pv)
int32_t i32
Definition: Objsys.h:384
16-bit fixed width signed integer
Definition: Objsys.h:299
TEMU_API const char * temu_typeToName(temu_Type Typ)
TEMU_API void temu_pluginPathRemove(const char *Path)
TEMU_API void temu_writeValueI32(temu_Object_ *Obj, const char *PropName, int32_t Val, int Idx)
TEMU_API int temu_isValidPropertyName(const char *Name)
TEMU_API uint8_t temu_readValueU8(temu_Object_ *Obj, const char *PropName, int Idx)
void *(* temu_ObjectCreateFunc)(const char *Name, int Argc, const temu_CreateArg *Argv)
Definition: Objsys.h:421
temu_Object_ * Obj
Definition: Objsys.h:387
TEMU_API void * temu_getInterfaceType(const char *Name)
void * Impl
Internal pointer, do not touch.
Definition: Objsys.h:437
uint8_t u8
Definition: Objsys.h:377
TEMU_API temu_Propval temu_signedPropval(temu_Type T, int64_t I)
TEMU_API void temu_addInterface(temu_Class *Cls, const char *IfaceName, const char *IfaceType, void *Iface, int DeprecatedParam, const char *Doc)
uint32_t Size
Number of used items in array.
Definition: Objsys.h:126
temu_Propval(* temu_PropReader)(void *Obj, int Idx)
Definition: Objsys.h:695
TEMU_API temu_Class * temu_classForObject(const temu_Object_ *Obj)
TEMU_API int temu_dictInsertValue(temu_Dict *Dict, const char *Name, temu_Propval Val)
void(* setProp)(struct temu_PropAccessor *accessor, temu_Propval pv)
Set property via accessor.
Definition: Objsys.h:741
Invalid value 0.
Definition: Objsys.h:283
TEMU_API void temu_listDispose(temu_List *List)
TEMU_API uint64_t temu_getValueUnsigned(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API int16_t temu_readValueI16(temu_Object_ *Obj, const char *PropName, int Idx)
temu_Type
Definition: Objsys.h:282
temu_Vector Vector
Definition: Objsys.h:393
struct temu_Component temu_Component
Definition: Component.h:27
double d
Definition: Objsys.h:375
TEMU_API void temu_setValueI64(temu_Object_ *Obj, const char *PropName, int64_t Val, int Idx)
TEMU_API const char * temu_typenameForInterface(const temu_Object_ *Obj, const void *Iface)
TEMU_API void temu_addPseudoProperty(temu_Class *Cls, const char *PropName, temu_Type Typ, int Count, temu_PropWriter Wr, temu_PropReader Rd, temu_PropWriter Set, temu_PropReader Get, const char *Doc)
void temu_Dict
Definition: Objsys.h:340
uint64_t LoggingFlags
Log category enabled/disabled.
Definition: Objsys.h:87
TEMU_API int temu_classHasCommand(const temu_Class *Cls, const char *CmdName)
struct temu_CreateArg temu_CreateArg
TEMU_API int temu_addPort(temu_Class *C, const char *IfaceRefName, const char *IfaceName, const char *Doc)
TEMU_API temu_Object_ ** temu_getProcessors(void)
Dictionary.
Definition: Objsys.h:316
void * Iface
Type erased interface pointer.
Definition: Objsys.h:113
TEMU_API int temu_isMemory(const temu_Object_ *Obj)
#define TEMU_API
Definition: Attributes.h:53
float f
Definition: Objsys.h:374
#define PROP_VAL_INITIALIZER(typ, suffix, typetag, valtag)
Definition: Objsys.h:646
TEMU_API void temu_deserialiseProp(void *Ctxt, temu_Object_ *Obj, const char *Name)
temu_PropReader Reader
Reader function if applicable.
Definition: Objsys.h:734
TEMU_API void temu_setValueSigned(temu_Object_ *Obj, const char *PropName, int64_t Val, int Idx)
temu_Propval(* getProp)(struct temu_PropAccessor *accessor)
Get property via accessor.
Definition: Objsys.h:740
TEMU_API temu_Propref temu_getPropref(const temu_Object_ *Obj, const char *PropName)
TEMU_API void temu_requireInterface(temu_Class *Cls, const char *PropName, const char *IfaceType)
TEMU_API temu_Class * temu_classForName(const char *ClsName)
TEMU_API temu_ListNode * temu_listGetPrev(temu_ListNode *Node)
TEMU_API uint64_t temu_getValueU64(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API void * temu_getVTableForClass(temu_Class *Cls)
TEMU_API const char * temu_nameForInterface(const temu_Object_ *Obj, const void *Iface)
TEMU_API void temu_objsysClear(void)
temu_Object_ * Obj
Object pointer.
Definition: Objsys.h:336
TEMU_API int temu_addScalarProperty(temu_Class *Cls, const char *Name, int offset, temu_Type T, const char *Doc)
TEMU_API int temu_setVTable(temu_Class *Cls, void *VTable)
TEMU_API unsigned temu_ifaceRefArraySize(temu_IfaceRefArray *Arr)
const char * LoggingCategories[32]
Definition: Objsys.h:441
TEMU_API temu_Type temu_getPropType(const temu_Object_ *Obj, const char *PropName)
TEMU_API temu_Dict * temu_dictCreate(void)
TEMU_API const char * temu_nameForObject(const temu_Object_ *Obj)
TEMU_API void temu_writeValueDouble(temu_Object_ *Obj, const char *PropName, double Val, int Idx)
TEMU_API const char * temu_getLoggingCategory(temu_Class *Cls, unsigned CategoryId)
TEMU_API uint16_t temu_readValueU16(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API temu_Object_ * temu_objectForName(const char *Name)
void * Ptr
Pointer to property.
Definition: Objsys.h:329
TEMU_API temu_Vector temu_vecCreate(temu_Type Typ)
TEMU_API temu_Object_ * temu_createObject(const char *ClsName, const char *ObjName, const temu_CreateArg *Args)
temu_IfaceRefArray IfaceRefArray
Definition: Objsys.h:389
Double precision floating point value.
Definition: Objsys.h:291
TEMU_API void * temu_vecGetData(temu_Vector *Vec)
TEMU_API int temu_isValidClassName(const char *Name)
size_t Count
Number of elements in property.
Definition: Objsys.h:1851
TEMU_API uint64_t temu_asUnsigned(temu_Propval Pv)
TEMU_API temu_Propval temu_listRemoveTail(temu_List *List)
TEMU_API void temu_setValueU32(temu_Object_ *Obj, const char *PropName, uint32_t Val, int Idx)
struct temu_Object temu_Object
TEMU_API void temu_writeValueU16(temu_Object_ *Obj, const char *PropName, uint16_t Val, int Idx)
void * Data
Pointer to value if applicable.
Definition: Objsys.h:732
temu_TypeObject * TypeObj
Definition: Objsys.h:1853
TEMU_API void temu_foreachObject(void(*Func)(temu_Object_ *, void *), void *Arg)
#define TEMU_DYN_ARRAY_TYPE(T, P)
Definition: Objsys.h:223
temu_IfaceRef * Ifaces
Interface references.
Definition: Objsys.h:128
8-bit fixed width unsigned integer
Definition: Objsys.h:294
TEMU_API void temu_setValueUnsigned(temu_Object_ *Obj, const char *PropName, uint64_t Val, int Idx)
TEMU_API temu_Propval temu_readValue(temu_Object_ *Obj, const char *PropName, int Idx) TEMU_NO_WRAP
struct temu_Propval temu_Propval
TEMU_API uint64_t temu_readValueU64(temu_Object_ *Obj, const char *PropName, int Idx)
#define temu_Object_
Definition: Temu2Compat.h:13
int Index
Index used in access, can be modified by user.
Definition: Objsys.h:730
TEMU_API int temu_checkpointGetLength(void *Ctxt, const char *Name)
TEMU_API int temu_isQualifiedAs(const temu_Object_ *Obj, unsigned Qualifier)
TEMU_API void * temu_getVTable(const temu_Object_ *Obj)
List.
Definition: Objsys.h:318
TEMU_API void temu_writeValueI16(temu_Object_ *Obj, const char *PropName, int16_t Val, int Idx)
Pointer to temu_Object.
Definition: Objsys.h:304
TEMU_API int temu_checkSanity(int Report)
TEMU_API int temu_isNormalProperty(temu_Object_ *Obj, const char *PropName)
Internal pointer.
Definition: Objsys.h:308
temu_Object Super
Super class of the class instance.
Definition: Objsys.h:436
uint32_t u32
Definition: Objsys.h:379
TEMU_API void temu_setValueI32(temu_Object_ *Obj, const char *PropName, int32_t Val, int Idx)
TEMU_API int temu_isValidObjectName(const char *Name)
C-string, useful for serialization.
Definition: Objsys.h:314
uint64_t IsCheckpointable
The object is snapshottable.
Definition: Objsys.h:96
TEMU_API int temu_objectHasIface(const temu_Object_ *Obj, const char *IfaceName)
TEMU_API int16_t temu_getValueI16(temu_Object_ *Obj, const char *PropName, int Idx)
int64_t DisposedNotification
Definition: Objsys.h:90
TEMU_API void temu_foreachProperty(temu_Class *C, void(*Func)(temu_Class *, const char *, void *), void *Arg)
TEMU_API temu_Propval temu_readProp(temu_Object_ *Obj, const char *Name, int idx)
TEMU_API void temu_qualifyAs(temu_Class *Cls, unsigned Qualifier)
TEMU_API size_t temu_getComponentCount(void)
struct temu_IfaceRefArray temu_IfaceRefArray
32-bit fixed width unsigned integer
Definition: Objsys.h:296
TEMU_API int temu_dictRemoveValue(temu_Dict *Dict, const char *Name)
8-bit fixed width signed integer
Definition: Objsys.h:298
TEMU_API int temu_isValidInterfaceName(const char *Name)
TEMU_API void temu_setValueI8(temu_Object_ *Obj, const char *PropName, int8_t Val, int Idx)
void temu_ListNode
Definition: Objsys.h:350
TEMU_API int temu_isMachine(const temu_Object_ *Obj)
const char * Name
Name of property.
Definition: Objsys.h:1849
temu_Type Typ
Type of property.
Definition: Objsys.h:328
TEMU_API void temu_dictDispose(temu_Dict *Dict)
TEMU_API int temu_isString(temu_Propval Pv)
TEMU_API int temu_addArrayPseudoProperty(temu_Class *Cls, const char *Name, temu_Type T, int NumElems, const char *Doc)
TEMU_API void temu_listAppend(temu_List *List, temu_Propval Val)
TEMU_API const char * temu_dictGetNextKey(temu_Dict *Dict, const char *Key)
TEMU_API void temu_addInterfaceArray(temu_Class *Cls, const char *IfaceName, const char *IfaceType, void *Iface, size_t Count, size_t Size, const char *Doc)
TEMU_API double temu_readValueDouble(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API void * temu_getInterface(temu_Object_ *Obj, const char *IfaceName, int Idx)
TEMU_API temu_Component ** temu_getComponents(void)
TEMU_API int8_t temu_getValueI8(temu_Object_ *Obj, const char *PropName, int Idx)
temu_Type Typ
Type of property.
Definition: Objsys.h:728
Pointer sized unsigned integer (uintptr_t)
Definition: Objsys.h:287
TEMU_API temu_Propval temu_checkpointGetValue(void *Ctxt, const char *Name, int Idx)
TEMU_API uint32_t temu_readValueU32(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API void temu_foreachProcessor(void(*Func)(temu_Object_ *, void *), void *Arg)
temu_ObjectS_ * TimeSource
Timesource object.
Definition: Objsys.h:85
TEMU_API int temu_addLoggingCategory(temu_Class *Cls, unsigned CategoryId, const char *Category)
TEMU_API temu_PropName temu_getPropName(const temu_Object_ *Obj, const char *PropName)
int64_t i64
Definition: Objsys.h:385
temu_Object * Obj
Pointer to object containing property.
Definition: Objsys.h:729
TEMU_API int temu_isDiscrete(temu_Propval Pv)
struct temu_IfaceRef temu_IfaceRef
uintptr_t Offset
Offset from struct start.
Definition: Objsys.h:1852
#define temu_ObjectS_
Definition: Temu2Compat.h:14
temu_Propval Val
Value of argument.
Definition: Objsys.h:413
TEMU_API size_t temu_getProcessorCount(void)
TEMU_API uint64_t temu_readValueUnsigned(temu_Object_ *Obj, const char *PropName, int Idx)
temu_Type Typ
Value type.
Definition: Objsys.h:369
TEMU_API void temu_ifaceRefArrayPush(temu_IfaceRefArray *Arr TEMU_NONNULL, temu_IfaceRef Iface)
TEMU_API void temu_setValueU8(temu_Object_ *Obj, const char *PropName, uint8_t Val, int Idx)
TEMU_API temu_Propval temu_listRemoveHead(temu_List *List)
TEMU_API int64_t temu_asInteger(temu_Propval Pv)
temu_PropWriter Setter
Setter function if applicable.
Definition: Objsys.h:735
TEMU_API void temu_pluginPathAppend(const char *Path)
temu_Class * Class
Class pointer.
Definition: Objsys.h:83
Pointer sized signed integer (intptr_t)
Definition: Objsys.h:286
TEMU_API temu_Propval temu_snapshotGetValue(void *Ctxt, const char *Name, int Idx)
TEMU_API void temu_writeValueSigned(temu_Object_ *Obj, const char *PropName, int64_t Val, int Idx)
TEMU_API void temu_pluginPathPrint(void)
uint32_t Reserved
Number of slots allocated for array.
Definition: Objsys.h:127
uintptr_t UIntPtr
Definition: Objsys.h:372
temu_Dict * Dict
Definition: Objsys.h:392
Definition: Objsys.h:2188
TEMU_API temu_Class * temu_registerClass(const char *ClsName, temu_ObjectCreateFunc Create, temu_ObjectDisposeFunc Dispose)
temu_Object_ * Obj
Object pointer (first field of interface reference)
Definition: Objsys.h:112
TEMU_API int temu_isNumber(temu_Propval Pv)
TEMU_API temu_ListNode * temu_listGetHead(temu_List *List)
temu_Component * Component
Parent component (null for root comp)
Definition: Objsys.h:86
TEMU_API void temu_setValueU16(temu_Object_ *Obj, const char *PropName, uint16_t Val, int Idx)
Vector (i.e. dynamic array)
Definition: Objsys.h:317
TEMU_API temu_IfaceRefArray temu_ifaceRefArrayAlloc(unsigned Reserve)
void * VecData
Managed pointer, do not use directly.
Definition: Objsys.h:347
TEMU_API void temu_writeValueI64(temu_Object_ *Obj, const char *PropName, int64_t Val, int Idx)
temu_ListNode * Head
Managed pointer, do not use directly.
Definition: Objsys.h:357
TEMU_API void temu_serialiseProp(void *Ctxt, const char *Name, temu_Type Typ, int Count, void *Data)
TEMU_API temu_ListNode * temu_listGetNext(temu_ListNode *Node)
void temu_TypeObject
Definition: Objsys.h:1846
TEMU_API void temu_writeValueI8(temu_Object_ *Obj, const char *PropName, int8_t Val, int Idx)
TEMU_API const char * temu_nameForClass(temu_Class *Cls)
TEMU_API void temu_addInterfaceReference(temu_Class *Cls, const char *PropName, int Offset, const char *TypeName, int Count, unsigned Flags, temu_PropWriter Wr, temu_PropReader Rd, const char *Doc)
TEMU_API uint32_t temu_getValueU32(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API void temu_setTimeSource(temu_Object_ *Obj, temu_Object_ *TS)
TEMU_API int temu_addArrayProperty(temu_Class *Cls, const char *Name, int offset, temu_Type T, int NumElems, const char *Doc)
temu_Buff Buffer
Definition: Objsys.h:391
TEMU_API void * temu_registerInterfaceType(const char *Name)
void(* temu_ObjectDisposeFunc)(void *)
Definition: Objsys.h:423
TEMU_API uint16_t temu_getValueU16(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API double temu_asDouble(temu_Propval Pv)
TEMU_API void temu_ifaceRefArrayDispose(temu_IfaceRefArray *Arr)
TEMU_API void temu_ifaceRefArrayPush2(temu_IfaceRefArray *Arr TEMU_NONNULL, temu_Object_ *Obj TEMU_NONNULL, void *Iface TEMU_NONNULL)
Buffer (see Buffer.h)
Definition: Objsys.h:315
TEMU_API void temu_setValueI16(temu_Object_ *Obj, const char *PropName, int16_t Val, int Idx)
TEMU_API int temu_isPseudoProperty(temu_Object_ *Obj, const char *PropName)
TEMU_API int64_t temu_getValueI64(temu_Object_ *Obj, const char *PropName, int Idx)
temu_ObjectCreateFunc Create
Constructor / create function for creating instances of the class.
Definition: Objsys.h:439
TEMU_API int temu_generateObjectGraph(const char *Path, int Display)
TEMU_API int temu_addScalarPseudoProperty(temu_Class *Cls, const char *Name, temu_Type T, const char *Doc)
temu_List List
Definition: Objsys.h:394
void * VTable
Internal pointer, do not touch.
Definition: Objsys.h:438
TEMU_API void temu_foreachInterface(temu_Class *C, void(*Func)(temu_Class *, const char *, void *), void *Arg)
TEMU_API int32_t temu_getValueI32(temu_Object_ *Obj, const char *PropName, int Idx)
TEMU_API int temu_connect(temu_Object_ *A, const char *PropName, temu_Object_ *B, const char *IfaceName)
Dynamic object/interface array.
Definition: Objsys.h:312
64-bit fixed width signed integer
Definition: Objsys.h:301