Component Interface functions are non-contract; that is, they may fail and return an error code, so the caller must check the return code. More succinct code is achieved in C++ by offering "contract" functions, that either succeed or raise an exception. Contract wrapper functions are provided for some Component Interface functions in the binding.


These are "contract" functions; that is, they either succeed or raise an exception.

void assertClass(Symbol hData, const char* cls, UINT16 release = 0)
Contract wrapper for brahms_getComponentInfo. This function does nothing if hData is of the specified class, and of at least the specified release. In any other case, it raises an exception.
Symbol getProcessState(GetProcessState* data)
Contract wrapper for brahms_getProcessState.
const char* getSymbolString(Symbol symbol)
Contract wrapper for brahms_getSymbolString (which, as it happens, can't fail anyway).
const char* getElementTypeString(TYPE type)
Contract wrapper for brahms_getElementTypeString (which, as it happens, can't fail anyway).
VUINT32 getRandomSeed(Symbol hCaller, UINT32 count = 0)
Contract wrapper for ENGINE_EVENT_GET_RANDOM_SEED; pass hComponent as hCaller. If count is zero, a seed of unspecified length is returned (at least one element). If count is non-zero, a seed of the specified length is returned.
Symbol createUtility(Symbol hCaller, const char* cls, UINT16 release, const char* name = NULL)
Contract wrapper for ENGINE_EVENT_CREATE_UTILITY; pass hComponent as hCaller. A utility, as specified, is returned. If name is non-NULL, the new utility is named accordingly.