theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - rb - jv - cc
Loading...
Searching...
No Matches
MkObjectC_CC_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_CC_API:

Topics

 MkObjectC_TOR_CC_API
 MkObjectC - create and destroy a managed-object
 
 MkObjectC_Obj_CC_API
 MkObjectC - managed-object details
 
 MkObjectC_Misc_CC_API
 MkObjectC - various functions related to the MkObjectS
 
 MkObjectC_Log_CC_API
 MkObjectC - log information to MkLogFileC (default: stderr) …
 
 MkObjectC_Dbg_CC_API
 MkObjectC - log a debugging-message to the MkLogFileC (default: stderr) …
 
 MkObjectC_Sys_CC_API
 MkObjectC - L)anguage A)bstraction L)ayer definition …
 
 MkObjectC_Introspection_CC_API
 
 MK_System_CC_API
 MkObjectC - L)anguage A)bstraction L)ayer definition …
 
 MkObjectC_Class_CC_API
 MkObjectC - define the class …
 

Classes

struct  ccmkkernel::MkObjectC_A
 object header … → C-API: libmkkernel::MkObjectS More...
 
class  ccmkkernel::MkObjectC
 object header … → C-API: libmkkernel::MkObjectS More...
 

Typedefs

typedef void(MkObjectC::*) ccmkkernel::MkObjectC::MkObjectDeleteICB(MkObjectC *)
 instance-callback
 
typedef void(*) ccmkkernel::MkObjectC::MkObjectDeleteCCB(MkObjectC *, MkObjectC *)
 class-callback
 

Functions

static MkObjectCccmkkernel::MkObjectC::MkObjectC_ObjNew (MK_RT mkrt, MK_OBJ hdl)
 return MkObjectC from LibMsgqueObject
 
MK_OBJ ccmkkernel::MkObjectC::getOBJ () const
 return the LibMsgqueObject from current MkObjectC instance
 
MK_OBJ ccmkkernel::MkObjectC::getOBJ__null_allow () const
 return the LibMsgqueObject from current MkObjectC instance
 
MK_OBJN ccmkkernel::MkObjectC::getOBJN () const
 (const) return the LibMsgqueObject from current MkObjectC instance
 
MK_OBJN ccmkkernel::MkObjectC::getOBJN__null_allow () const
 (const) return the LibMsgqueObject from current MkObjectC instance
 
static MK_OBJ ccmkkernel::MkObjectC::getOBJ (MkObjectC *clsHdl)
 return LibMsgqueObject from current MkObjectC pointer
 
static MK_OBJ ccmkkernel::MkObjectC::getOBJ__null_allow (MkObjectC *clsHdl)
 return LibMsgqueObject from current MkObjectC pointer
 
static MK_OBJN ccmkkernel::MkObjectC::getOBJN (const MkObjectC *clsHdl)
 (const) return LibMsgqueObject from current MkObjectC pointer
 
static MK_OBJN ccmkkernel::MkObjectC::getOBJN__null_allow (const MkObjectC *clsHdl)
 (const) return LibMsgqueObject from current MkObjectC pointer
 
static MK_OBJ ccmkkernel::MkObjectC::getOBJ (const MkObjectC &clsHdl)
 return LibMsgqueObject from current MkObjectC reference
 
static MK_OBJ ccmkkernel::MkObjectC::getOBJ__null_allow (const MkObjectC &clsHdl)
 return LibMsgqueObject from current MkObjectC reference
 
static MK_OBJN ccmkkernel::MkObjectC::getOBJN (const MkObjectC &clsHdl)
 (const) return LibMsgqueObject from current MkObjectC reference
 
static MK_OBJN ccmkkernel::MkObjectC::getOBJN__null_allow (const MkObjectC &clsHdl)
 (const) return LibMsgqueObject from current MkObjectC reference
 
bool ccmkkernel::MkObjectC::Check () const
 check if pointer is still valid
 
void ccmkkernel::MkObjectC::atomInit (MK_OBJ obj)
 
 ccmkkernel::MkObjectC::MkObjectC ()
 
 ccmkkernel::MkObjectC::MkObjectC (MK_OBJ obj)
 
void ccmkkernel::MkObjectC::ErrorCheck (enum MkErrorE err, MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE()) const
 
void ccmkkernel::MkObjectC::ErrorCheck (MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE()) const
 
static void ccmkkernel::MkObjectC::ErrorCheck (MK_MNGN mng, enum MkErrorE err, MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE())
 
static MK_PTR ccmkkernel::MkObjectC::atomObjNew (MK_RT mkrt, MK_OBJ obj)
 
static MK_PTR ccmkkernel::MkObjectC::atomObjCreate (MK_RT mkrt, MK_OBJ obj)
 
virtual ccmkkernel::MkObjectC::~MkObjectC ()
 
MK_MNG ccmkkernel::MkObjectC::getMNG () const
 
MK_STRN ccmkkernel::MkObjectC::ToNativeNameOfClass () const
 

Variables

static thread_local MkObjectC ccmkkernel::MkObjectC::MK_NULL_REF = {(MK_OBJ)0}
 
MK_OBJ ccmkkernel::MkObjectC::hdl = NULL
 

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

Typedef Documentation

◆ MkObjectDeleteCCB

void(*) ccmkkernel::MkObjectC::MkObjectDeleteCCB(MkObjectC *, MkObjectC *)

class-callback

Definition at line 209 of file MkObjectC_cc.hh.

◆ MkObjectDeleteICB

void(MkObjectC::*) ccmkkernel::MkObjectC::MkObjectDeleteICB(MkObjectC *)

instance-callback

Definition at line 208 of file MkObjectC_cc.hh.

Function Documentation

◆ atomInit()

void ccmkkernel::MkObjectC::atomInit ( MK_OBJ obj)
inlineprotected

Definition at line 160 of file MkObjectC_cc.hh.

160 {
161/*
162 if (obj == NULL) {
163 throw MkConstructorNullExceptionC("MkObjectC");
164 }
165*/
166 hdl = obj;
167 if (obj != NULL) MkRefIncrSelf(hdl,this,NULL);
168 }
void MkRefIncrSelf(MK_OBJ const obj, MK_PTR const self, MK_PTR const env)
ATOMIC operation -> link self with reference-count.
+ Here is the caller graph for this function:

◆ atomObjCreate()

static MK_PTR ccmkkernel::MkObjectC::atomObjCreate ( MK_RT mkrt,
MK_OBJ obj )
inlinestaticprotected

Definition at line 202 of file MkObjectC_cc.hh.

202 {
203 return MkSelfCreate(obj,NULL);
204 }
#define MkSelfCreate(...)

◆ atomObjNew()

static MK_PTR ccmkkernel::MkObjectC::atomObjNew ( MK_RT mkrt,
MK_OBJ obj )
inlinestaticprotected

Definition at line 197 of file MkObjectC_cc.hh.

197 {
198 MK_PTR self = NULL;
199 ErrorCheck(obj, MkSelfNew(obj,&self,NULL));
200 return self;
201 }
MK_PTRB * MK_PTR
generic pointer data-type
void ErrorCheck(enum MkErrorE err, MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE()) const
#define MkSelfNew(...)
+ Here is the caller graph for this function:

◆ Check()

bool ccmkkernel::MkObjectC::Check ( ) const
inline

check if pointer is still valid

Definition at line 149 of file MkObjectC_cc.hh.

149 {
150 return (hdl && MkObjCheck(hdl));
151 };
bool MkObjCheck(MK_MNGN mng)
check MkObjectS -> libmkkernel::MkObjectS::signature …

◆ ErrorCheck() [1/3]

void ccmkkernel::MkObjectC::ErrorCheck ( enum MkErrorE err,
MK_STRN const caller = __builtin_FUNCTION(),
MK_I32 const line = __builtin_LINE() ) const
inlineprotected

Definition at line 177 of file MkObjectC_cc.hh.

180 {
181 if (MkErrorCheckI(err)) MkExceptionC::Raise(hdl, caller, line);
182 }
#define MkErrorCheckI(err)
static void Raise(MK_MNGN const expobj, MK_STRN const callfunc=__builtin_FUNCTION(), MK_I32 const callline=__builtin_LINE())
convert an MkErrorC into a Target-Programming-Language (TPL) exception … → C-API: libmkkernel::MkE...
+ Here is the caller graph for this function:

◆ ErrorCheck() [2/3]

static void ccmkkernel::MkObjectC::ErrorCheck ( MK_MNGN mng,
enum MkErrorE err,
MK_STRN const caller = __builtin_FUNCTION(),
MK_I32 const line = __builtin_LINE() )
inlinestaticprotected

Definition at line 188 of file MkObjectC_cc.hh.

192 {
193 if (MkErrorCheckI(err)) MkExceptionC::Raise(mng, caller, line);
194 }

◆ ErrorCheck() [3/3]

void ccmkkernel::MkObjectC::ErrorCheck ( MK_STRN const caller = __builtin_FUNCTION(),
MK_I32 const line = __builtin_LINE() ) const
inlineprotected

Definition at line 183 of file MkObjectC_cc.hh.

185 {
186 if (MkErrorCheckE_NULL()) MkExceptionC::Raise(hdl, caller, line);
187 }
#define MkErrorCheckE_NULL()

◆ getMNG()

MK_MNG ccmkkernel::MkObjectC::getMNG ( ) const
inline

Definition at line 221 of file MkObjectC_cc.hh.

221 {
222 MK_MNG ret = reinterpret_cast<MK_MNG>(hdl);
223 if (unlikely(ret == NULL)) throw std::runtime_error("MkObjectC* is NULL");
224 return ret;
225 };
#define unlikely(x)
MK_PTRB * MK_MNG
managed object pointer, datatype will be checked at runtime

◆ getOBJ() [1/3]

MK_OBJ ccmkkernel::MkObjectC::getOBJ ( ) const
inline

return the LibMsgqueObject from current MkObjectC instance

Definition at line 81 of file MkObjectC_cc.hh.

81 {
82 MK_OBJ ret = reinterpret_cast<MK_OBJ>(hdl);
83 if (unlikely(ret == NULL)) InstHdlIsNullError();
84 return ret;
85 };
#define InstHdlIsNullError()
struct MkObjectS * MK_OBJ
class-shortcut for struct MkObjectS *, all shortcut using the XX_YYY syntax (only for public API) …
+ Here is the caller graph for this function:

◆ getOBJ() [2/3]

static MK_OBJ ccmkkernel::MkObjectC::getOBJ ( const MkObjectC & clsHdl)
inlinestatic

return LibMsgqueObject from current MkObjectC reference

Definition at line 129 of file MkObjectC_cc.hh.

129 {
130 return clsHdl.getOBJ();
131 };

◆ getOBJ() [3/3]

static MK_OBJ ccmkkernel::MkObjectC::getOBJ ( MkObjectC * clsHdl)
inlinestatic

return LibMsgqueObject from current MkObjectC pointer

Definition at line 105 of file MkObjectC_cc.hh.

105 {
106 MK_OBJ ret = clsHdl ? reinterpret_cast<MK_OBJ>(clsHdl->hdl) : NULL;
107 if (unlikely(ret == NULL)) ClassHdlIsNullError(MkObjectC);
108 return ret;
109 };
#define ClassHdlIsNullError(cls)

◆ getOBJ__null_allow() [1/3]

MK_OBJ ccmkkernel::MkObjectC::getOBJ__null_allow ( ) const
inline

return the LibMsgqueObject from current MkObjectC instance

Definition at line 88 of file MkObjectC_cc.hh.

88 {
89 return reinterpret_cast<MK_OBJ>(hdl);
90 };
+ Here is the caller graph for this function:

◆ getOBJ__null_allow() [2/3]

static MK_OBJ ccmkkernel::MkObjectC::getOBJ__null_allow ( const MkObjectC & clsHdl)
inlinestatic

return LibMsgqueObject from current MkObjectC reference

Definition at line 134 of file MkObjectC_cc.hh.

134 {
135 return clsHdl.getOBJ__null_allow();
136 };

◆ getOBJ__null_allow() [3/3]

static MK_OBJ ccmkkernel::MkObjectC::getOBJ__null_allow ( MkObjectC * clsHdl)
inlinestatic

return LibMsgqueObject from current MkObjectC pointer

Definition at line 112 of file MkObjectC_cc.hh.

112 {
113 return clsHdl ? reinterpret_cast<MK_OBJ>(clsHdl->hdl) : NULL;
114 };

◆ getOBJN() [1/3]

MK_OBJN ccmkkernel::MkObjectC::getOBJN ( ) const
inline

(const) return the LibMsgqueObject from current MkObjectC instance

Definition at line 93 of file MkObjectC_cc.hh.

93 {
94 MK_OBJN ret = reinterpret_cast<MK_OBJN>(hdl);
95 if (unlikely(ret == NULL)) InstHdlIsNullError();
96 return ret;
97 };
const struct MkObjectS * MK_OBJN
class-shortcut for const struct MkObjectS *, all const shortcut using the XX_YYYC syntax (only for pu...
+ Here is the caller graph for this function:

◆ getOBJN() [2/3]

static MK_OBJN ccmkkernel::MkObjectC::getOBJN ( const MkObjectC & clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MkObjectC reference

Definition at line 139 of file MkObjectC_cc.hh.

139 {
140 return clsHdl.getOBJN();
141 };

◆ getOBJN() [3/3]

static MK_OBJN ccmkkernel::MkObjectC::getOBJN ( const MkObjectC * clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MkObjectC pointer

Definition at line 117 of file MkObjectC_cc.hh.

117 {
118 MK_OBJN ret = clsHdl ? reinterpret_cast<MK_OBJN>(clsHdl->hdl) : NULL;
119 if (unlikely(ret == NULL)) ClassHdlIsNullError(MkObjectC);
120 return ret;
121 };

◆ getOBJN__null_allow() [1/3]

MK_OBJN ccmkkernel::MkObjectC::getOBJN__null_allow ( ) const
inline

(const) return the LibMsgqueObject from current MkObjectC instance

Definition at line 100 of file MkObjectC_cc.hh.

100 {
101 return reinterpret_cast<MK_OBJN>(hdl);
102 };
+ Here is the caller graph for this function:

◆ getOBJN__null_allow() [2/3]

static MK_OBJN ccmkkernel::MkObjectC::getOBJN__null_allow ( const MkObjectC & clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MkObjectC reference

Definition at line 144 of file MkObjectC_cc.hh.

144 {
145 return clsHdl.getOBJN__null_allow();
146 };

◆ getOBJN__null_allow() [3/3]

static MK_OBJN ccmkkernel::MkObjectC::getOBJN__null_allow ( const MkObjectC * clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MkObjectC pointer

Definition at line 124 of file MkObjectC_cc.hh.

124 {
125 return clsHdl ? reinterpret_cast<MK_OBJN>(clsHdl->hdl) : NULL;
126 };

◆ MkObjectC() [1/2]

ccmkkernel::MkObjectC::MkObjectC ( )
inlineprotected

Definition at line 170 of file MkObjectC_cc.hh.

170 {
171 atomInit(NULL);
172 };
void atomInit(MK_OBJ obj)

◆ MkObjectC() [2/2]

ccmkkernel::MkObjectC::MkObjectC ( MK_OBJ obj)
inlineprotected

Definition at line 173 of file MkObjectC_cc.hh.

173 {
174 atomInit(obj);
175 }

◆ MkObjectC_ObjNew()

static MkObjectC * ccmkkernel::MkObjectC::MkObjectC_ObjNew ( MK_RT mkrt,
MK_OBJ hdl )
inlinestatic

return MkObjectC from LibMsgqueObject

Definition at line 76 of file MkObjectC_cc.hh.

76 {
78 }
static thread_local MkObjectC MK_NULL_REF
static MK_PTR atomObjNew(MK_RT mkrt, MK_OBJ obj)
#define MkObjectC_X2obj(x)
#define MK_RT_CALL
+ Here is the caller graph for this function:

◆ ToNativeNameOfClass()

MK_STRN ccmkkernel::MkObjectC::ToNativeNameOfClass ( ) const
inline

Definition at line 227 of file MkObjectC_cc.hh.

227 {
228 const char * str = typeid(*this).name();
229 return str ? abi::__cxa_demangle(str,0,0,NULL) : "*unknown*";
230 }

◆ ~MkObjectC()

virtual ccmkkernel::MkObjectC::~MkObjectC ( )
inlinevirtual

Definition at line 211 of file MkObjectC_cc.hh.

211 {
212 if (hdl) {
214 // important: every item deleted with destructor… the "self" object
215 // is already destroyed… set NULL in MkObjectS
216//printTxt(MkObjectToName(hdl));
218 }
219 }
#define MkRefDecrWithoutSelf(...)
#define MkRtSetup_NULL

Variable Documentation

◆ hdl

MK_OBJ ccmkkernel::MkObjectC::hdl = NULL
protected

Definition at line 158 of file MkObjectC_cc.hh.

◆ MK_NULL_REF

thread_local MkObjectC ccmkkernel::MkObjectC::MK_NULL_REF = {(MK_OBJ)0}
static

Definition at line 44 of file MkObjectC_cc.hh.