MkTypeS - various functions to create, initialize and destroy a type … More...
Collaboration diagram for MkTypeC_TOR_C_API:Macros | |
| #define | MkTypeCreate(clsV, basicV, identV) |
| #define | MkTypeForeachInstancesSave(typ) |
Functions | |
| MK_TYP | MkTypeCreate (MK_MACRO_TYP const clsV, MK_MACRO_TYP const basicV, MK_STRN const identV) |
| create a new type … | |
| MK_TYP | MkTypeDup2_RT (MK_RT mkrt, MK_TYPN const typ, MK_STRN const ident) |
| duplicate typ to create a lightweight-type … | |
| MK_OBJ | MkTypeAlloc_RT (MK_RT mkrt, MK_TYPN const typ) |
| alloc instance-memory for MkTypeS … | |
| MK_TYP | MkTypeResolve_RT (MK_RT mkrt, MK_TYPN const typ) |
| resolve a new type | |
| void | MkTypeDelete_RT (MK_RT mkrt, MK_TYP const typ) |
| delete a type object | |
| static MK_OBJ | MkTypeInstances (MK_TYP const typ) |
| access the instance attribute of the type… | |
| static MK_TYPN | MkTypeNextN (MK_TYPN const typ) |
| get next instance from linked-list of MkObjectS type | |
MkTypeC - MkTypeC_TOR_C_API - overload | |
| #define | MkTypeAlloc_NULL(...) |
| #define | MkTypeAlloc(...) |
| #define | MkTypeDup2_NULL(...) |
| #define | MkTypeDup2(...) |
| #define | MkTypeResolve_NULL(...) |
| #define | MkTypeResolve(...) |
| #define | MkTypeDelete_NULL(...) |
| #define | MkTypeDelete(...) |
MkTypeS - various functions to create, initialize and destroy a type …
| #define MkTypeAlloc | ( | ... | ) |
Definition at line 1915 of file kernel_overload_mk.h.
| #define MkTypeAlloc_NULL | ( | ... | ) |
Definition at line 1914 of file kernel_overload_mk.h.
| #define MkTypeCreate | ( | clsV, | |
| basicV, | |||
| identV ) |
Definition at line 5042 of file LibMkKernel_mk.h.
| #define MkTypeDelete | ( | ... | ) |
Definition at line 1923 of file kernel_overload_mk.h.
| #define MkTypeDelete_NULL | ( | ... | ) |
Definition at line 1922 of file kernel_overload_mk.h.
| #define MkTypeDup2 | ( | ... | ) |
Definition at line 1917 of file kernel_overload_mk.h.
| #define MkTypeDup2_NULL | ( | ... | ) |
Definition at line 1916 of file kernel_overload_mk.h.
| #define MkTypeForeachInstancesSave | ( | typ | ) |
iterate over instances of a class with the intention of deleting the instance
Definition at line 5131 of file LibMkKernel_mk.h.
| #define MkTypeResolve | ( | ... | ) |
Definition at line 1919 of file kernel_overload_mk.h.
| #define MkTypeResolve_NULL | ( | ... | ) |
Definition at line 1918 of file kernel_overload_mk.h.
alloc instance-memory for MkTypeS …
The following steps are done:
| [in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
| [in] | typ | the MkTypeS instance to work on (nonnull) |
| MK_TYP MkTypeCreate | ( | MK_MACRO_TYP const | clsV, |
| MK_MACRO_TYP const | basicV, | ||
| MK_STRN const | identV ) |
create a new type …
Ther are three scenarios in which a new type is created:
The shadow-type is used to link a Target-Programming-Language (TPL) with a meta-code-library (META-LIBRARY). The goal is not to create a new-type but to map an already-existing-type into the Target-Programming-Language (TPL).
The shadow-type has not its own memory and all changes to the shadow-type will change the already-existing-type.
The light-weight-type is created from an already-existing-type and a specific-instance-struct but without an own MkTypeS::objsig and MkTypeS::objmask. This type reuse all features of the already-existing-type without replaceing the already-existing-type.
The light-weight-type has its own memory and all changes to the light-weight-type will not change the already-existing-type.
The full-weight-type is created using the MkTypeCreate with a type-class, class-base, type-name.
The type is created as MkTypeDup2 from the basic type followed by an update of the type specific fields objsig, objmask and objsize.
This kind of type is called a full-weight-type, because this type does provide a new signature and mask. In difference to MkTypeCreate the MkTypeDup2 create a lightweight-type.
The fullweight-type is defined by the tool c_Class.tcl and is able to operate independent from any other type.
| [in] | clsV | the real type-name in "C" (usually the same as identV), the type-name who was registerd with the c_CLS.tcl tool. (syntax: NsClassC, Ns=namespace) |
| [in] | basicV | the basic-type, have to be MkObjectC or a decend of this |
| [in] | identV | set the display-name (MkTypeS::type_name), have to be NON null |
example - create a NEW type
definition - of the macro
delete a type object
| [in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
| [in] | typ | the MkTypeS instance to work on - (nonnull) |
duplicate typ to create a lightweight-type …
The lightweight-type has the following features:
MK_NULL.The fullweight-type is created with MkTypeCreate.
| [in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
| [in] | typ | the MkTypeS instance to work on |
| [in] | ident | set the display-name (MkTypeS::type_name) |
access the instance attribute of the type…
Definition at line 5114 of file LibMkKernel_mk.h.
Here is the caller graph for this function:get next instance from linked-list of MkObjectS type
Definition at line 5135 of file LibMkKernel_mk.h.
resolve a new type
Every NEW runtime require a new Type, This code is called in a callback registered with MkRuntimeCallbackAdd TODO: htmlcode{mqsetting,resolve_example,create a new type and resolve}
| [in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
| [in] | typ | the MkTypeS instance to work on - (nonnull) |