theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - jv - cc
Loading...
Searching...
No Matches
MkObjectC_C_API

MkObjectC - class known as obj or object is used as base-class type for a Programming-Language-Micro-Kernel (PLMK) class … More...

+ Collaboration diagram for MkObjectC_C_API:

Topics

 MkObjectC_Class_C_API
 MkObjectC - define the class …
 
 MkObjectC_TOR_C_API
 MkObjectC - create and destroy a managed-object
 
 MkObjectC_Obj_C_API
 MkObjectC - managed-object details
 
 MkObjectC_Misc_C_API
 MkObjectC - various functions related to the MkObjectS
 
 MkObjectC_Log_C_API
 MkObjectC - log information to MkLogFileC (default: stderr) …
 
 MkObjectC_Dbg_C_API
 MkObjectC - log a debugging-message to the MkLogFileC (default: stderr) …
 
 MkObjectC_Sys_C_API
 MkObjectC - L)anguage A)bstraction L)ayer definition …
 

Classes

struct  libmkkernel::MkObjectProtectS
 the protect is used to "protect" data set by pAllocCreate if the new object is later initialized with a type specific object-initialization … More...
 
struct  libmkkernel::MkObjectS
 object header … More...
 
struct  libmkkernel::MkAllocDefS
 define the storage-allocator function More...
 

Macros

#define MK_NULL_SIGNATURE   0
 signature used to mark an invalid signature …
 
#define MkObjectHandleGetOfType_1X(x)
 

Functions

MK_I32 libmkkernel::MkObjectHandleGetOfType (MK_OBJ const obj)
 Export-Slot - returns typeHdl of the obj .
 

MkObjectC slot definition

typedef MK_OBJ(* libmkkernel::MkConstructorF) (MK_RT const mkrt, MK_TYP type, MK_PTR nat, MK_PTR lnk)
 
typedef void(* libmkkernel::MkDestructorF) (MK_RT const mkrt, MK_OBJ const obj)
 
typedef MK_OBJ(* libmkkernel::MkDupF) (MK_RT const mkrt, MK_OBJ const obj)
 
typedef MK_OBJ(* libmkkernel::MkDup2F) (MK_RT const mkrt, MK_OBJ const obj, MK_STRN const ident)
 
typedef MK_OBJ(* libmkkernel::MkMergeF) (MK_RT const mkrt, MK_OBJ const obj)
 
typedef MK_OBJ(* libmkkernel::MkCopyF) (MK_RT const mkrt, MK_OBJ const obj, MK_OBJN const src)
 
typedef void(* libmkkernel::MkResetF) (MK_RT const mkrt, MK_OBJ const obj)
 
typedef MK_PTR(* libmkkernel::MkSelfCreateF) (MK_RT const mkrt, MK_OBJ const obj, MK_PTR const env)
 
typedef void(* libmkkernel::MkSelfDeleteF) (MK_RT const mkrt, MK_PTR self, MK_PTR const env)
 
typedef void(* libmkkernel::MkSelfUnlinkF) (MK_RT const mkrt, MK_PTR self, MK_PTR const env)
 
typedef void(* libmkkernel::MkLogF) (MK_RT const mkrt, MK_OBJN const obj, MK_OBJ fmt, MK_I32 const debug, MK_STRN const prefix, MK_I32 const lvl)
 
typedef MK_STRN(* libmkkernel::MkToStringF) (MK_RT const mkrt, MK_OBJN const obj)
 
typedef MK_PTR(* libmkkernel::MkAllocCreateFLT) (MK_RT const mkrt, MK_TYP const type)
 
typedef void(* libmkkernel::MkAllocDeleteF) (MK_RT const mkrt, MK_TYP const type, MK_PTR ptr)
 
typedef void(* libmkkernel::MkTypeInitF) (MK_RT const mkrt, MK_TYP const type)
 
typedef bool(* libmkkernel::MkLogFormatF) (MK_RT const mkrt, char *header, MK_SIZE const headerSize, MK_OBJN const obj, MK_STRN const caller, MK_I32 const debug, MK_STRN const fmt)
 

MkObjectC type check

#define __MkCheckTO(t, o)
 
#define _MkCheckTO(t, o)
 
#define __MkCheckO(cls, o)
 
#define _MkCheckO(cls, o)
 
#define __MkCheckX(cls, x)
 
#define _MkCheckX(cls, x)
 
#define __MkCheckM(cls, m)
 
#define _MkCheckM(cls, m)
 
#define MkCheckNN(cls, x)
 
#define MkSanitizeCheck(_root, _m)
 
#define MkSanitizeCheckO(_root, _o)
 
#define toTT(_type)
 

Detailed Description

MkObjectC - class known as obj or object is used as base-class type for a Programming-Language-Micro-Kernel (PLMK) class …

ccmkkernel is also called as Programming-Language-Micro-Kernel (PLMK). ccmkkernel is like a programming-language without syntax but using the Target-Programming-Language (in our case C++) of the Micro-Kernel as runtime environment.

Integration
To operate as a Micro-Kernel a maximum integration into the Target-Programming-Language is available.

This integration is done using the managed-object-technology.

Managed-Object
A managed-object is a piece of C-Code able to act as a native datatype in all Target-Programming-Languages supported.

The managed object supports low level integration features descripted in MkObjectS :

In the implementation-layer of ccmkkernel only the public-features of the MkObjectC are visible to the programmer.

See also
For the full documentation read: Managed-Object

Macro Definition Documentation

◆ __MkCheckM

#define __MkCheckM ( cls,
m )
Value:
__MkCheckO(cls,((MK_OBJ)(m)))
#define __MkCheckO(cls, o)

Definition at line 3053 of file LibMkKernel_mk.h.

◆ __MkCheckO

#define __MkCheckO ( cls,
o )
Value:
(((*o).signature & cls##_MASK) == cls##_SIGNATURE)

Definition at line 3049 of file LibMkKernel_mk.h.

◆ __MkCheckTO

#define __MkCheckTO ( t,
o )
Value:
(((*o).signature & (*t).objmask) == (*t).objsig)

Definition at line 3047 of file LibMkKernel_mk.h.

◆ __MkCheckX

#define __MkCheckX ( cls,
x )
Value:
__MkCheckO(cls,(cls##_X2obj(x)))

Definition at line 3051 of file LibMkKernel_mk.h.

◆ _MkCheckM

#define _MkCheckM ( cls,
m )
Value:
((m) && __MkCheckM(cls,m))
#define __MkCheckM(cls, m)

Definition at line 3054 of file LibMkKernel_mk.h.

◆ _MkCheckO

#define _MkCheckO ( cls,
o )
Value:
((o) && __MkCheckO(cls,(o)))

Definition at line 3050 of file LibMkKernel_mk.h.

◆ _MkCheckTO

#define _MkCheckTO ( t,
o )
Value:
((o) && __MkCheckTO((t),(o)))
#define __MkCheckTO(t, o)

Definition at line 3048 of file LibMkKernel_mk.h.

◆ _MkCheckX

#define _MkCheckX ( cls,
x )
Value:
((x) && __MkCheckO(cls,(cls##_X2obj(x))))

Definition at line 3052 of file LibMkKernel_mk.h.

◆ MK_NULL_SIGNATURE

#define MK_NULL_SIGNATURE   0

signature used to mark an invalid signature …

Definition at line 3072 of file LibMkKernel_mk.h.

◆ MkCheckNN

#define MkCheckNN ( cls,
x )
Value:
__MkCheckO(cls,(cls##_X2obj(x)))

Definition at line 3056 of file LibMkKernel_mk.h.

◆ MkObjectHandleGetOfType_1X

#define MkObjectHandleGetOfType_1X ( x)
Value:
MkObjectHandleGetOfType(MkOBJ(x))
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer

Definition at line 3285 of file LibMkKernel_mk.h.

◆ MkSanitizeCheck

#define MkSanitizeCheck ( _root,
_m )
Value:
_MkCheckM(_root,_m)
#define _MkCheckM(cls, m)

Definition at line 3063 of file LibMkKernel_mk.h.

◆ MkSanitizeCheckO

#define MkSanitizeCheckO ( _root,
_o )
Value:
_MkCheckO(_root,_o)
#define _MkCheckO(cls, o)

Definition at line 3064 of file LibMkKernel_mk.h.

◆ toTT

#define toTT ( _type)
Value:
(MkTYP(_type))
#define MkTYP(x)
cast a known-managed-object into an MkTypeS pointer

Definition at line 3067 of file LibMkKernel_mk.h.

Typedef Documentation

◆ MkAllocCreateFLT

typedef MK_PTR(* libmkkernel::MkAllocCreateFLT) (MK_RT const mkrt, MK_TYP const type)

Definition at line 3405 of file LibMkKernel_mk.h.

◆ MkAllocDeleteF

typedef void(* libmkkernel::MkAllocDeleteF) (MK_RT const mkrt, MK_TYP const type, MK_PTR ptr)

Definition at line 3406 of file LibMkKernel_mk.h.

◆ MkConstructorF

typedef MK_OBJ(* libmkkernel::MkConstructorF) (MK_RT const mkrt, MK_TYP type, MK_PTR nat, MK_PTR lnk)

Definition at line 3389 of file LibMkKernel_mk.h.

◆ MkCopyF

typedef MK_OBJ(* libmkkernel::MkCopyF) (MK_RT const mkrt, MK_OBJ const obj, MK_OBJN const src)

Definition at line 3394 of file LibMkKernel_mk.h.

◆ MkDestructorF

typedef void(* libmkkernel::MkDestructorF) (MK_RT const mkrt, MK_OBJ const obj)

Definition at line 3390 of file LibMkKernel_mk.h.

◆ MkDup2F

typedef MK_OBJ(* libmkkernel::MkDup2F) (MK_RT const mkrt, MK_OBJ const obj, MK_STRN const ident)

Definition at line 3392 of file LibMkKernel_mk.h.

◆ MkDupF

typedef MK_OBJ(* libmkkernel::MkDupF) (MK_RT const mkrt, MK_OBJ const obj)

Definition at line 3391 of file LibMkKernel_mk.h.

◆ MkLogF

typedef void(* libmkkernel::MkLogF) (MK_RT const mkrt, MK_OBJN const obj, MK_OBJ fmt, MK_I32 const debug, MK_STRN const prefix, MK_I32 const lvl)

Definition at line 3402 of file LibMkKernel_mk.h.

◆ MkLogFormatF

typedef bool(* libmkkernel::MkLogFormatF) (MK_RT const mkrt, char *header, MK_SIZE const headerSize, MK_OBJN const obj, MK_STRN const caller, MK_I32 const debug, MK_STRN const fmt)

Definition at line 3408 of file LibMkKernel_mk.h.

◆ MkMergeF

typedef MK_OBJ(* libmkkernel::MkMergeF) (MK_RT const mkrt, MK_OBJ const obj)

Definition at line 3393 of file LibMkKernel_mk.h.

◆ MkResetF

typedef void(* libmkkernel::MkResetF) (MK_RT const mkrt, MK_OBJ const obj)

Definition at line 3395 of file LibMkKernel_mk.h.

◆ MkSelfCreateF

typedef MK_PTR(* libmkkernel::MkSelfCreateF) (MK_RT const mkrt, MK_OBJ const obj, MK_PTR const env)

Definition at line 3397 of file LibMkKernel_mk.h.

◆ MkSelfDeleteF

typedef void(* libmkkernel::MkSelfDeleteF) (MK_RT const mkrt, MK_PTR self, MK_PTR const env)

Definition at line 3399 of file LibMkKernel_mk.h.

◆ MkSelfUnlinkF

typedef void(* libmkkernel::MkSelfUnlinkF) (MK_RT const mkrt, MK_PTR self, MK_PTR const env)

Definition at line 3401 of file LibMkKernel_mk.h.

◆ MkToStringF

typedef MK_STRN(* libmkkernel::MkToStringF) (MK_RT const mkrt, MK_OBJN const obj)

Definition at line 3404 of file LibMkKernel_mk.h.

◆ MkTypeInitF

typedef void(* libmkkernel::MkTypeInitF) (MK_RT const mkrt, MK_TYP const type)

Definition at line 3407 of file LibMkKernel_mk.h.

Function Documentation

◆ MkObjectHandleGetOfType()

MK_I32 libmkkernel::MkObjectHandleGetOfType ( MK_OBJ const obj)
inline

Export-Slot - returns typeHdl of the obj .

A typeHdl identifies the type the obj belongs to. All instances of the same class share the same typeHdl.

Parameters
[in]objthe MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API
Returns
the required typeHdl

Definition at line 3281 of file LibMkKernel_mk.h.

3281 {
3282 return ((MK_I32)obj->signature);
#define MK_ATTR_HDL
+ Here is the caller graph for this function: