T-EMU  2
The Terma Emulator
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Typedefs | Enumerations | Functions
Objsys.h File Reference
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
Include dependency graph for Objsys.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  temu_Object
 
struct  temu_IfaceRef
 
struct  temu_IfaceRefArray
 
struct  temu_Propref
 
struct  temu_Propval
 
struct  temu_CreateArg
 
struct  temu_ObjectIface
 

Macros

#define TEMU_PLUGIN_INIT   void temu_pluginInit(void)
 
#define TEMU_NO_WRAP
 
#define TEMU_IFACE_REFERENCE_TYPE(N)
 
#define TEMU_DYN_ARRAY_TYPE(T, P)
 
#define PROP_ASSERT(p, t)
 
#define PROP_VAL_INITIALIZER(typ, suffix, typetag, valtag)
 
#define TEMU_NULL_ARG   { NULL, {teTY_Invalid} }
 

Typedefs

typedef void temu_Class
 
typedef void temu_MetaIface
 
typedef struct temu_IfaceRef temu_IfaceRef
 
typedef struct temu_IfaceRefArray temu_IfaceRefArray
 
typedef enum temu_Type temu_Type
 
typedef struct temu_Propref temu_Propref
 
typedef struct temu_Propval temu_Propval
 
typedef void(* temu_PropWriter )(void *Obj, temu_Propval Pv, int Idx)
 
typedef temu_Propval(* temu_PropReader )(void *Obj, int Idx)
 
typedef struct temu_CreateArg temu_CreateArg
 
typedef void *(* temu_ObjectCreateFunc )(const char *Name, int Argc, const temu_CreateArg *Argv)
 
typedef void(* temu_ObjectDisposeFunc )(void *)
 

Enumerations

enum  temu_Type {
  teTY_Invalid, teTY_Intptr, teTY_Uintptr, teTY_Float,
  teTY_Double, teTY_U8, teTY_U16, teTY_U32,
  teTY_U64, teTY_I8, teTY_I16, teTY_I32,
  teTY_I64, teTY_Obj, teTY_InternalPtr, teTY_IfaceRef,
  teTY_IfaceRefArray, teTY_String
}
 

Functions

temu_IfaceRefArray temu_ifaceRefArrayAlloc (unsigned Reserve)
 
void temu_ifaceRefArrayPush2 (temu_IfaceRefArray *Arr, void *Obj, void *Iface)
 
void temu_ifaceRefArrayPush (temu_IfaceRefArray *Arr, temu_IfaceRef Iface)
 
unsigned temu_ifaceRefArraySize (temu_IfaceRefArray *Arr)
 
void temu_ifaceRefArrayDispose (temu_IfaceRefArray *Arr)
 
temu_Propref temu_getPropref (const void *Obj, const char *PropName)
 
int temu_getPropLength (const void *Obj, const char *PropName)
 
int temu_getPropDynLength (const void *Obj, const char *PropName)
 
int temu_isNumber (temu_Propval Pv)
 
int temu_isReal (temu_Propval Pv)
 
int temu_isDiscrete (temu_Propval Pv)
 
int temu_isString (temu_Propval Pv)
 
int64_t temu_asInteger (temu_Propval Pv)
 
uint64_t temu_asUnsigned (temu_Propval Pv)
 
double temu_asDouble (temu_Propval Pv)
 
temu_Propval temu_getValue (void *Obj, const char *PropName, int Idx) TEMU_NO_WRAP
 
uint8_t temu_getValueU8 (void *Obj, const char *PropName, int Idx)
 
uint16_t temu_getValueU16 (void *Obj, const char *PropName, int Idx)
 
uint32_t temu_getValueU32 (void *Obj, const char *PropName, int Idx)
 
uint64_t temu_getValueU64 (void *Obj, const char *PropName, int Idx)
 
int8_t temu_getValueI8 (void *Obj, const char *PropName, int Idx)
 
int16_t temu_getValueI16 (void *Obj, const char *PropName, int Idx)
 
int32_t temu_getValueI32 (void *Obj, const char *PropName, int Idx)
 
int64_t temu_getValueI64 (void *Obj, const char *PropName, int Idx)
 
temu_Propval temu_readValue (void *Obj, const char *PropName, int Idx) TEMU_NO_WRAP
 
uint8_t temu_readValueU8 (void *Obj, const char *PropName, int Idx)
 
uint16_t temu_readValueU16 (void *Obj, const char *PropName, int Idx)
 
uint32_t temu_readValueU32 (void *Obj, const char *PropName, int Idx)
 
uint64_t temu_readValueU64 (void *Obj, const char *PropName, int Idx)
 
int8_t temu_readValueI8 (void *Obj, const char *PropName, int Idx)
 
int16_t temu_readValueI16 (void *Obj, const char *PropName, int Idx)
 
int32_t temu_readValueI32 (void *Obj, const char *PropName, int Idx)
 
int64_t temu_readValueI64 (void *Obj, const char *PropName, int Idx)
 
void temu_setValue (void *Obj, const char *PropName, temu_Propval Val, int Idx) TEMU_NO_WRAP
 
void temu_setValueU8 (void *Obj, const char *PropName, uint8_t Val, int Idx)
 
void temu_setValueU16 (void *Obj, const char *PropName, uint16_t Val, int Idx)
 
void temu_setValueU32 (void *Obj, const char *PropName, uint32_t Val, int Idx)
 
void temu_setValueU64 (void *Obj, const char *PropName, uint64_t Val, int Idx)
 
void temu_setValueI8 (void *Obj, const char *PropName, int8_t Val, int Idx)
 
void temu_setValueI16 (void *Obj, const char *PropName, int16_t Val, int Idx)
 
void temu_setValueI32 (void *Obj, const char *PropName, int32_t Val, int Idx)
 
void temu_setValueI64 (void *Obj, const char *PropName, int64_t Val, int Idx)
 
void temu_writeValue (void *Obj, const char *PropName, temu_Propval Val, int Idx) TEMU_NO_WRAP
 
void temu_writeValueU8 (void *Obj, const char *PropName, uint8_t Val, int Idx)
 
void temu_writeValueU16 (void *Obj, const char *PropName, uint16_t Val, int Idx)
 
void temu_writeValueU32 (void *Obj, const char *PropName, uint32_t Val, int Idx)
 
void temu_writeValueU64 (void *Obj, const char *PropName, uint64_t Val, int Idx)
 
void temu_writeValueI8 (void *Obj, const char *PropName, int8_t Val, int Idx)
 
void temu_writeValueI16 (void *Obj, const char *PropName, int16_t Val, int Idx)
 
void temu_writeValueI32 (void *Obj, const char *PropName, int32_t Val, int Idx)
 
void temu_writeValueI64 (void *Obj, const char *PropName, int64_t Val, int Idx)
 
temu_Propval temu_getNamedObjectProp (const char *Obj, const char *PropName, int Idx) TEMU_NO_WRAP
 
temu_Propval temu_readNamedObjectProp (const char *Obj, const char *PropName, int Idx) TEMU_NO_WRAP
 
void temu_setNamedObjectProp (const char *Obj, const char *PropName, temu_Propval Val, int Idx) TEMU_NO_WRAP
 
void temu_writeNamedObjectProp (const char *Obj, const char *PropName, temu_Propval Val, int Idx) TEMU_NO_WRAP
 
temu_Classtemu_registerClass (const char *ClsName, temu_ObjectCreateFunc Create, temu_ObjectDisposeFunc Dispose)
 
temu_Classtemu_registerExternalClass (const char *ClsName)
 
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)
 
void temu_requireInterface (temu_Class *Cls, const char *PropName, const char *IfaceType)
 
void temu_addInterface (temu_Class *Cls, const char *IfaceName, const char *IfaceType, void *Iface, int Count, const char *Doc)
 
void * temu_getInterface (void *Obj, const char *IfaceName, int Idx)
 
int temu_setVTable (temu_Class *Cls, void *VTable)
 
void * temu_getVTableForClass (temu_Class *Cls)
 
void * temu_getVTable (void *Obj)
 
int temu_isExternal (void *Obj)
 
int temu_isCpu (void *Obj)
 
int temu_isMachine (void *Obj)
 
void temu_qualifyAsCpu (void *Cls)
 
void temu_qualifyAsMachine (void *Cls)
 
void temu_objsysClear (void)
 
void temu_objsysClearObjects (void)
 
void * temu_addObject (const char *ClsName, const char *ObjName, void *Obj)
 
void * temu_createObject (const char *ClsName, const char *ObjName, const temu_CreateArg *Args)
 
void temu_disposeObject (void *Obj)
 
temu_Classtemu_classForName (const char *ClsName)
 
const char * temu_nameForClass (temu_Class *Cls)
 
temu_Classtemu_classForObject (void *Obj)
 
temu_Classtemu_classForObjectName (const char *Obj)
 
void * temu_objectForName (const char *Name)
 
const char * temu_nameForObject (const void *Obj)
 
int temu_loadPlugin (const char *Path)
 
const char * temu_typeToName (temu_Type Typ)
 
int temu_connect (void *A, const char *PropName, void *B, const char *IfaceName)
 
int temu_serialiseJSON (const char *FileName)
 
int temu_deserialiseJSON (const char *FileName)
 
void temu_serialiseProp (void *Ctxt, const char *Name, temu_Type Typ, int Count, void *Data)
 
void temu_deserialiseProp (void *Ctxt, void *Obj, const char *Name)
 
int temu_checkpointGetLength (void *Ctxt, const char *Name)
 
temu_Propval temu_checkpointGetValue (void *Ctxt, const char *Name, int Idx)
 
int temu_checkSanity (int Report)
 
int temu_generateObjectGraph (const char *Path, int Display)
 
 TEMU_IFACE_REFERENCE_TYPE (temu_Object)
 

Macro Definition Documentation

#define PROP_ASSERT (   p,
 
)

Definition at line 270 of file Objsys.h.

#define PROP_VAL_INITIALIZER (   typ,
  suffix,
  typetag,
  valtag 
)
Value:
static inline temu_Propval \
temu_makeProp ## suffix (typ val) \
{ \
pv.Typ = typetag; \
pv.valtag = val; \
return pv; \
} \
static inline typ \
temu_propValue ## suffix (temu_Propval pv) \
{ \
PROP_ASSERT(pv.Typ, typetag); \
typ val = pv.valtag; \
return val; \
}
temu_Type Typ
Definition: Objsys.h:241
#define PROP_ASSERT(p, t)
Definition: Objsys.h:270
struct temu_Propval temu_Propval

Definition at line 277 of file Objsys.h.

#define TEMU_DYN_ARRAY_TYPE (   T,
 
)

Definition at line 141 of file Objsys.h.

#define TEMU_IFACE_REFERENCE_TYPE (   N)

Definition at line 95 of file Objsys.h.

#define TEMU_NO_WRAP

Definition at line 34 of file Objsys.h.

#define TEMU_NULL_ARG   { NULL, {teTY_Invalid} }

Definition at line 455 of file Objsys.h.

#define TEMU_PLUGIN_INIT   void temu_pluginInit(void)

Definition at line 24 of file Objsys.h.

Typedef Documentation

typedef void temu_Class

Definition at line 37 of file Objsys.h.

typedef struct temu_IfaceRef temu_IfaceRef
typedef void temu_MetaIface

Definition at line 38 of file Objsys.h.

typedef void*(* temu_ObjectCreateFunc)(const char *Name, int Argc, const temu_CreateArg *Argv)

Definition at line 457 of file Objsys.h.

typedef void(* temu_ObjectDisposeFunc)(void *)

Definition at line 459 of file Objsys.h.

typedef temu_Propval(* temu_PropReader)(void *Obj, int Idx)

A prop reader function is provided when properties are registered, it is responsible for reading the property when temu_readValue is called. The function can be used to introduce side-effects on reads unlike the getValue which will never have side-effects and only returns the raw value.

Definition at line 327 of file Objsys.h.

typedef struct temu_Propref temu_Propref

Typed property reference.

The property reference contains a type tag and a raw pointer to the property.

typedef struct temu_Propval temu_Propval

Generic property value.

As properties can be of any normal type, the propval struct provides a sum type/tagged union which contain both the type tag and the property value.

typedef void(* temu_PropWriter)(void *Obj, temu_Propval Pv, int Idx)

A prop writer function is provided when properties are registered, it is responsible for writing the property when temu_writeValue is called. The function can be used to introduce side-effects on writes unlike the setValue which will never have side-effects and only sets the raw value.

Definition at line 319 of file Objsys.h.

typedef enum temu_Type temu_Type

Enumeration Type Documentation

enum temu_Type
Enumerator
teTY_Invalid 
teTY_Intptr 
teTY_Uintptr 
teTY_Float 
teTY_Double 
teTY_U8 
teTY_U16 
teTY_U32 
teTY_U64 
teTY_I8 
teTY_I16 
teTY_I32 
teTY_I64 
teTY_Obj 
teTY_InternalPtr 
teTY_IfaceRef 
teTY_IfaceRefArray 
teTY_String 

Definition at line 186 of file Objsys.h.

Function Documentation

void temu_addInterface ( temu_Class Cls,
const char *  IfaceName,
const char *  IfaceType,
void *  Iface,
int  Count,
const char *  Doc 
)

Register interface with the named class.

Parameters
Cls_nameName of class to add interface to
IfacenameInterface name
IfaceTypeInterface type
IfacePointer to the interface structure.
CountReserved for future use. Set this to 0 or 1.
void* temu_addObject ( const char *  ClsName,
const char *  ObjName,
void *  Obj 
)

Add object with external class.

Parameters
ClsNameName of class used for instantiation
ObjNameName of object in object system
ObjThe object to add.
Returns
Obj if success, otherwise NULL.
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 
)
double temu_asDouble ( temu_Propval  Pv)
int64_t temu_asInteger ( temu_Propval  Pv)
uint64_t temu_asUnsigned ( temu_Propval  Pv)
int temu_checkpointGetLength ( void *  Ctxt,
const char *  Name 
)
temu_Propval temu_checkpointGetValue ( void *  Ctxt,
const char *  Name,
int  Idx 
)
int temu_checkSanity ( int  Report)

Check object system sanity.

The function traverses all objects and their properties and ensures that all (scalar) interface properties are connected. An object can override the default check by implementing the checkSanity function in the ObjectIface.

Parameters
Reportset to 1 to have the function report connectivity issues on stdout, 2 to report on stderr, and 0 to not report at all.
Returns
Returns 0 if the object system is connected. Returns non-zero if the object system is not properly connected.
temu_Class* temu_classForName ( const char *  ClsName)

Get the class pointer for the named class

temu_Class* temu_classForObject ( void *  Obj)

Get the class for the given object.

temu_Class* temu_classForObjectName ( const char *  Obj)

Get class for named object

int temu_connect ( void *  A,
const char *  PropName,
void *  B,
const char *  IfaceName 
)

Connect an interface property in object A to the interface in object B. If A.PropName is an interface array, B,B:IfaceName will be appended to it. For dynamic arrays, it is pushed to the end, for static arrays, it is placed in the first null slot.

Parameters
AThe object to connect.
PropNameThe name of the property in object A
BThe object to connect to.
IfaceNameThe name of the interface in object B
void* temu_createObject ( const char *  ClsName,
const char *  ObjName,
const temu_CreateArg Args 
)

Create object with class and name.

Parameters
ClsNameName of class used for instantiation
ObjNameName of object in object system
ArgsNamed argument pairs to pass into constructor. The list of args should be terminated by a TEMU_NULL_ARG. In case no arguments are passed, pass in NULL.
Returns
Allocated object. Result is NULL in case of: class does not exist, object already allocated with the given name, out of memory.
int temu_deserialiseJSON ( const char *  FileName)

De-serialise the simulation state.

The function clears the whole internal object system, reads the JSON file FileName and creates all the objects.

If a class implements the ObjectIface, the (optional) deserialise procedure will be called.

void temu_deserialiseProp ( void *  Ctxt,
void *  Obj,
const char *  Name 
)
void temu_disposeObject ( void *  Obj)

Dispose object. The function will call the Objects dispose function.

Parameters
ObjThe object to delete.
int temu_generateObjectGraph ( const char *  Path,
int  Display 
)

Print the current object graph as a dot file

Pass NULL (or nullptr) to generate to stdout. And set Display to non-zero to automatically display the generated dot-file.

Parameters
PathDestination file to write the graph to. NULL indicates stdout.
DisplayIf non-zero, the function will attempt to display the graph by running it through dot and .
Returns
0 if the generation was successful. Non-zero in case of failure.
void* temu_getInterface ( void *  Obj,
const char *  IfaceName,
int  Idx 
)
temu_Propval temu_getNamedObjectProp ( const char *  Obj,
const char *  PropName,
int  Idx 
)
int temu_getPropDynLength ( const void *  Obj,
const char *  PropName 
)
int temu_getPropLength ( const void *  Obj,
const char *  PropName 
)
temu_Propref temu_getPropref ( const void *  Obj,
const char *  PropName 
)

Get a reference to the named property.

Parameters
ObjAn object of a class with the relevant property registered.
PropNameThe name of the property to be queried.
temu_Propval temu_getValue ( void *  Obj,
const char *  PropName,
int  Idx 
)
int16_t temu_getValueI16 ( void *  Obj,
const char *  PropName,
int  Idx 
)
int32_t temu_getValueI32 ( void *  Obj,
const char *  PropName,
int  Idx 
)
int64_t temu_getValueI64 ( void *  Obj,
const char *  PropName,
int  Idx 
)
int8_t temu_getValueI8 ( void *  Obj,
const char *  PropName,
int  Idx 
)
uint16_t temu_getValueU16 ( void *  Obj,
const char *  PropName,
int  Idx 
)
uint32_t temu_getValueU32 ( void *  Obj,
const char *  PropName,
int  Idx 
)
uint64_t temu_getValueU64 ( void *  Obj,
const char *  PropName,
int  Idx 
)
uint8_t temu_getValueU8 ( void *  Obj,
const char *  PropName,
int  Idx 
)
void* temu_getVTable ( void *  Obj)
void* temu_getVTableForClass ( temu_Class Cls)
TEMU_IFACE_REFERENCE_TYPE ( temu_Object  )
temu_IfaceRefArray temu_ifaceRefArrayAlloc ( unsigned  Reserve)

Allocate interface array.

Parameters
Numberof entries to reserve initially.
Returns
The allocated interface array.
void temu_ifaceRefArrayDispose ( temu_IfaceRefArray Arr)
void temu_ifaceRefArrayPush ( temu_IfaceRefArray Arr,
temu_IfaceRef  Iface 
)

Push an interface reference to the interface array.

Parameters
ArrThe interface reference array
IfaceThe interface reference (object-interface pointer pair)
void temu_ifaceRefArrayPush2 ( temu_IfaceRefArray Arr,
void *  Obj,
void *  Iface 
)

Push an object and raw interface pointer to an interface array.

Parameters
ArrThe interface reference array.
ObjThe object implementing the relevant interface
IfacePointer to the interface struct.
unsigned temu_ifaceRefArraySize ( temu_IfaceRefArray Arr)

Get the length of a dynamically allocated interface array.

Parameters
ArrThe interface array to get the size from.
Returns
The length in number of entries.
int temu_isCpu ( void *  Obj)
int temu_isDiscrete ( temu_Propval  Pv)
int temu_isExternal ( void *  Obj)
int temu_isMachine ( void *  Obj)
int temu_isNumber ( temu_Propval  Pv)
int temu_isReal ( temu_Propval  Pv)
int temu_isString ( temu_Propval  Pv)
int temu_loadPlugin ( const char *  Path)

Load a plugin. When a plugin is loaded the temu_pluginInit function will be called. This function should create and define any classes that the plugin provides.

The function loads plugins following the operating system's loading rules. This means in particular that first, the plugin will be found in the RPATH location of libTEMUSupport (which refers to the TEMU lib directory). Secondly, it will look in the LD_LIBRARY_PATH and other standard load directories.

Returns
0 on success, non-zero otherwise.
const char* temu_nameForClass ( temu_Class Cls)
const char* temu_nameForObject ( const void *  Obj)

Get the name of an object

void* temu_objectForName ( const char *  Name)

Get object for name

void temu_objsysClear ( void  )

Erase all classes, interfaces, properties and objects registered in the object system. Not that objects of an external class will not be de-allocated. The responsibility of that lies with the programmer.

void temu_objsysClearObjects ( void  )

Erase all objects, but do not delete classes.

void temu_qualifyAsCpu ( void *  Cls)
void temu_qualifyAsMachine ( void *  Cls)
temu_Propval temu_readNamedObjectProp ( const char *  Obj,
const char *  PropName,
int  Idx 
)
temu_Propval temu_readValue ( void *  Obj,
const char *  PropName,
int  Idx 
)

Read a property value with side-effects

Parameters
ObjObject pointer
PropNameName of property to read.
IdxIndex of property, set to 0 if it is not an array.
Returns
The property value corresponding to the name. In case of the property not being found, the Typ field of the returned property will be teTY_Invalid.
int16_t temu_readValueI16 ( void *  Obj,
const char *  PropName,
int  Idx 
)
int32_t temu_readValueI32 ( void *  Obj,
const char *  PropName,
int  Idx 
)
int64_t temu_readValueI64 ( void *  Obj,
const char *  PropName,
int  Idx 
)
int8_t temu_readValueI8 ( void *  Obj,
const char *  PropName,
int  Idx 
)
uint16_t temu_readValueU16 ( void *  Obj,
const char *  PropName,
int  Idx 
)
uint32_t temu_readValueU32 ( void *  Obj,
const char *  PropName,
int  Idx 
)
uint64_t temu_readValueU64 ( void *  Obj,
const char *  PropName,
int  Idx 
)
uint8_t temu_readValueU8 ( void *  Obj,
const char *  PropName,
int  Idx 
)
temu_Class* temu_registerClass ( const char *  ClsName,
temu_ObjectCreateFunc  Create,
temu_ObjectDisposeFunc  Dispose 
)

Register a class in the TEMU object system. With these classes, the TEMU object system is responsible for allocation and de-allocation.

Parameters
ClsNameThe name of the class that is to be created.
CreateA constructor, the constructor is responsible for allocation and initialisation of the object.
DisposeA destructor, this function is responsible for deleting the objects of the class.
Returns
A pointer to the class object that can be further used to register properties and interfaces.
temu_Class* temu_registerExternalClass ( const char *  ClsName)

Register an external class in the TEMU object system. An external class described objects that are managed outside the object system. Such classes can for example be used to bridge between two different object systems (e.g. TEMU and SMP2).

Parameters
ClsNameThe name of the class that is to be created.
Returns
A pointer to the class object that can be further used to register properties and interfaces.
void temu_requireInterface ( temu_Class Cls,
const char *  PropName,
const char *  IfaceType 
)
int temu_serialiseJSON ( const char *  FileName)

Serialise the simulation state to the given file name.

The serialisation writes a JSON formatted file and calls the serialise procedure in the (optional) ObjectIface if it is implemented.

The serialisation interface can for example be used to write out memory buffers to separate files as such data should not be written to a JSON file.

void temu_serialiseProp ( void *  Ctxt,
const char *  Name,
temu_Type  Typ,
int  Count,
void *  Data 
)
void temu_setNamedObjectProp ( const char *  Obj,
const char *  PropName,
temu_Propval  Val,
int  Idx 
)
void temu_setValue ( void *  Obj,
const char *  PropName,
temu_Propval  Val,
int  Idx 
)

Set a raw property value without side-effects

Parameters
ObjObject pointer
PropNameName of property to read.
ValThe value to set. It must be of the correct type.
IdxIndex of property, set to 0 if it is not an array.
void temu_setValueI16 ( void *  Obj,
const char *  PropName,
int16_t  Val,
int  Idx 
)
void temu_setValueI32 ( void *  Obj,
const char *  PropName,
int32_t  Val,
int  Idx 
)
void temu_setValueI64 ( void *  Obj,
const char *  PropName,
int64_t  Val,
int  Idx 
)
void temu_setValueI8 ( void *  Obj,
const char *  PropName,
int8_t  Val,
int  Idx 
)
void temu_setValueU16 ( void *  Obj,
const char *  PropName,
uint16_t  Val,
int  Idx 
)
void temu_setValueU32 ( void *  Obj,
const char *  PropName,
uint32_t  Val,
int  Idx 
)
void temu_setValueU64 ( void *  Obj,
const char *  PropName,
uint64_t  Val,
int  Idx 
)
void temu_setValueU8 ( void *  Obj,
const char *  PropName,
uint8_t  Val,
int  Idx 
)
int temu_setVTable ( temu_Class Cls,
void *  VTable 
)
const char* temu_typeToName ( temu_Type  Typ)

Get a string representing the type tag.

void temu_writeNamedObjectProp ( const char *  Obj,
const char *  PropName,
temu_Propval  Val,
int  Idx 
)
void temu_writeValue ( void *  Obj,
const char *  PropName,
temu_Propval  Val,
int  Idx 
)

Write a property value with side-effects

Parameters
ObjObject pointer
PropNameName of property to read.
ValThe value to set. It must be of the correct type.
IdxIndex of property, set to 0 if it is not an array.
void temu_writeValueI16 ( void *  Obj,
const char *  PropName,
int16_t  Val,
int  Idx 
)
void temu_writeValueI32 ( void *  Obj,
const char *  PropName,
int32_t  Val,
int  Idx 
)
void temu_writeValueI64 ( void *  Obj,
const char *  PropName,
int64_t  Val,
int  Idx 
)
void temu_writeValueI8 ( void *  Obj,
const char *  PropName,
int8_t  Val,
int  Idx 
)
void temu_writeValueU16 ( void *  Obj,
const char *  PropName,
uint16_t  Val,
int  Idx 
)
void temu_writeValueU32 ( void *  Obj,
const char *  PropName,
uint32_t  Val,
int  Idx 
)
void temu_writeValueU64 ( void *  Obj,
const char *  PropName,
uint64_t  Val,
int  Idx 
)
void temu_writeValueU8 ( void *  Obj,
const char *  PropName,
uint8_t  Val,
int  Idx 
)