The Method Dictionary describes the methods of a class visible to InstantView®. C++ code is generated from a formalised description by means of the ClassiX® program CXDGEN. The description contains:
Return value | generalised data type |
Function name | |
Parameter 1 | generalised data type |
parameter2 | generalised data type |
. . . | |
Parameter n | generalised data type |
where the following (generalised) data types exist:
Type | C++ - spelling | Comment | Footnote |
---|---|---|---|
VOID | void | ||
STRING | char * | ||
MULTIPLE_STRING | CXB_MULTIPLE_STRING * or CXB_MULTIPLE_STRING & | ||
OBJECT | CX_CLASS * or CX_CLASS & | ||
VOLATILE_OBJECT | CX_CLASS * or CX_CLASS & | only as return value | 1. |
VECTOR<OBJECT> | CX_CLASS ** | last element NULL | |
VECTOR<INTEGER> | int * | last element INT_MAX | |
VECTOR<STRING> | char ** | last element NULL | |
COLLECTION | os_collection * or os_collection & | ||
MA | CXS_VIEW_DESCRIPTOR * | only as first parameter | 2. |
ANY | void * | only as return value | 3. |
- If a function creates a transient object, you can request that the garbage collection of the ClassiX® system automatically removes this object as soon as it is no longer needed. This is done by entering VOLATILE_OBJECT as return value for the function.
- for one access function; other 'normal' parameters may follow.
- Functions that return data of different types for different calls can be entered with signature ANY. The function must make the type of the return value known to the ClassiX® system with CX_CLASS::SetTypeOfReturnValue(); tables for implicit transformation of enumerations can be registered by the function with CX_CLASS::RegisterEnumTransTbl(). This feature is used e.g. for attributes (objects of classes derived from CX_ATTRIBUTE).
Example:
MDI(CX_CONDITIONED_BAG)
OBJECT Pick(VOID)
OBJECT Pick(VOID) EXTERN(Evaluate) // similar to CX_FORMULA
COLLECTION Query(VOID)
COLLECTION FindAll(VOID)
OBJECT Amount(VOID)
VECTOR<STRING> ColVarNames(VOID)
VECTOR<INTEGER> ColVarNumbers(VOID)
VECTOR<INTEGER> ColVarTypes(VOID)
INTEGER NColumnVars(VOID)
VOID AddColVar(STRING)
VOID RemoveColVar(STRING)
VOID Delete(OBJECT)
VECTOR<STRING> GetInputVarNames(OBJECT)