theKernel 10.0
Loading...
Searching...
No Matches
MkCall_cc.cc
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11/*****************************************************************************/
12/* */
13/* context */
14/* */
15/*****************************************************************************/
16
17//#include <iostream>
18//#include <exception>
19//#include <typeinfo>
20
21#include "private_cc.hh"
22
23namespace ccmkkernel {
24
26 {
27 delete static_cast<MkObjectDeleteCallbackC*>(*dataP);
28 *dataP = NULL;
29 }
30
32 {
34
35 // if NO self object is available than NO callback is called
36 if (!MkSelfExists(obj)) return MK_OK;
37
38 MkObjectDeleteCallbackC * const pdata = static_cast<struct MkObjectDeleteCallbackC * const> (__data__);
39 if (pdata->self && pdata->self->hdl == NULL) return MK_OK;
40 try {
41 switch (pdata->type) {
43 assert(pdata->self != NULL);
44 (pdata->self->*pdata->call.MkObjectDeleteCallbackICB)(typeName,typeHdl,objHdl);
45 break;
47 assert(pdata->self != NULL);
48 (*pdata->call.MkObjectDeleteCallbackCCB)(pdata->self,typeName,typeHdl,objHdl);
49 break;
51 (*pdata->call.MkObjectDeleteCallbackSCB)(typeName,typeHdl,objHdl);
52 break;
53 }
54
55 } catch (const MkExceptionC& ex) {
57 } catch (const std::exception& ex) {
59 } catch (...) {
60 // http://groups.google.com/group/comp.programming.threads/browse_thread/thread/652bcf186fbbf697/f63757846514e5e5
61 throw;
62 }
63
64 // everything is OK
65 return MkErrorStack_0E_Check();
66 }
67
68} // END - namespace "ccmqmsgque"
69
70
MkExceptionC - The default-exception of the Programming-Language-Micro-Kernel (PLMK) …
#define MkErrorStack_0E_Check()
static MK_ERR Catch(MK_MNGN const expobj, std::exception const *exception, MK_STRN const callfunc=__builtin_FUNCTION())
convert an Target-Programming-Language (TPL) exception into an MkErrorC … → C-API: libmkkernel::Mk...
MkErrorE
collection for the different error-codes …
@ MK_OK
(persistent) everything is OK.
#define MkObjectC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static bool MkSelfExists(MK_OBJN obj)
Check if the MkObjectS::self exists …
#define MkObjectDeleteCallF_CHECK
validate call to libmkkernel::MkObjectDeleteCallF
#define MkObjectDeleteCallF_ARGS
the libmkkernel::MkObjectDeleteCallF arguments with default names
#define MkObjectDeleteFreeF_ARGS
the libmkkernel::MkObjectDeleteFreeF arguments with default names
namespace for the CcMkKernel "C++"-API
infrastructur to use the ccmkkernel specific callback …
Definition MkCall_cc.hh:16
static enum MkErrorE Call(MkObjectDeleteCallF_ARGS)
Definition MkCall_cc.cc:31
enum ccmkkernel::MkObjectDeleteCallbackC::MkObjectDeleteCallbackE type
static void Free(MkObjectDeleteFreeF_ARGS)
Definition MkCall_cc.cc:25
union ccmkkernel::MkObjectDeleteCallbackC::MkObjectDeleteCallbackU call