theConfig 10.0
Loading...
Searching...
No Matches
LcCall_cc.cc
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11#define META_FILE_NAME "LcCall_cc.cc"
12
13/*****************************************************************************/
14/* */
15/* context */
16/* */
17/*****************************************************************************/
18
19#include "private_cc.hh"
20
21namespace cclcconfig {
22
23 using namespace std;
24
26 {
27 delete static_cast<LcConfigIncludeCallbackC*>(cfg->fConfigIncludeData);
28
29 cfg->fConfigIncludeData = NULL;
30 cfg->fConfigIncludeCall = NULL;
31 cfg->fConfigIncludeFree = NULL;
32 }
33
35 {
37
38 auto pdata = static_cast<LcConfigIncludeCallbackC* const> (cfg->fConfigIncludeData);
39
40 if (pdata->call.ConfigIncludeCB == NULL)
41 return MkErrorSetC_2M(cfg,"internal error: callback is NULL");
42
43 try {
44 std::string incS = incDir?incDir:".";
45 std::string pathS = path?path:"";
47
48 switch (pdata->type) {
50 (*pdata->call.ConfigIncludeCB)(incS, pathS, ret);
51 break;
52 default:
53 MkErrorSetC_2M(cfg,"LcConfigIncludeCB: callback-data-type-error");
54 goto error;
55 }
56 } catch (const MkExceptionC& ex) {
57 MkExceptionC::Catch(cfg,ex);
58 goto error;
59 } catch (const exception& ex) {
60 MkExceptionC::Catch(cfg,ex);
61 goto error;
62 } catch (...) {
63 // http://groups.google.com/group/comp.programming.threads/browse_thread/thread/652bcf186fbbf697/f63757846514e5e5
64 throw;
65 }
66
67 // everything is OK
68error:
69 return MkErrorStack_0E_Check();
70 }
71
72// ==============================================================================================================
73
75 {
76 delete static_cast<LcSettingDeleteCallbackC*>(cfg->fSettingDeleteData);
77
78 cfg->fSettingDeleteData = NULL;
79 cfg->fSettingDeleteCall = NULL;
80 cfg->fSettingDeleteFree = NULL;
81 }
82
84 {
86
87 auto pdata = static_cast<LcSettingDeleteCallbackC* const> (cfg->fSettingDeleteData);
88 auto hdl = MkObjectHandleGet_1X(cfs);
89
90 try {
91 switch (pdata->type) {
93 (pdata->call.SettingDeleteIF->LcSettingDelete)(hdl);
94 break;
95 default:
96 MkErrorSetC_2M(cfg,"LcSettingDeleteCB: callback-data-type-error");
97 goto error;
98 }
99 } catch (const MkExceptionC& ex) {
100 MkExceptionC::Catch(cfg,ex);
101 goto error;
102 } catch (const exception& ex) {
103 MkExceptionC::Catch(cfg,ex);
104 goto error;
105 } catch (...) {
106 // http://groups.google.com/group/comp.programming.threads/browse_thread/thread/652bcf186fbbf697/f63757846514e5e5
107 throw;
108 }
109
110 // everything is OK
111error:
112 return MkErrorStack_0E_Check();
113 }
114
115} // END - namespace "ccmqmsgque"
116
117
#define LcSettingDeleteFreeF_ARGS
#define LcSettingDeleteCallF_CHECK
#define LcConfigIncludeCallF_CHECK
#define LcConfigIncludeFreeF_ARGS
#define LcConfigIncludeCallF_ARGS
#define LcSettingDeleteCallF_ARGS
static MkBufferListC * MkBufferListC_ObjNew(MK_RT_ARGS MK_BFL hdl)
#define MkErrorStack_0E_Check()
#define MkErrorSetC_2M(err, message)
static MK_ERR Catch(MK_MNGN const expobj, std::exception const *exception, MK_STRN const callfunc=__builtin_FUNCTION())
#define MkObjectHandleGet_1X(x)
#define MK_RT_CALL
namespace for the CcLcConfig "C++"-API
Definition LcCall_cc.cc:21
infrastructur to use the cclcconfig specific callback …
Definition LcCall_cc.hh:18
static enum MkErrorE Call(LcConfigIncludeCallF_ARGS)
Definition LcCall_cc.cc:34
static void Free(LcConfigIncludeFreeF_ARGS)
Definition LcCall_cc.cc:25
infrastructur to use the cclcconfig specific callback …
Definition LcCall_cc.hh:55
static void Free(LcSettingDeleteFreeF_ARGS)
Definition LcCall_cc.cc:74
static enum MkErrorE Call(LcSettingDeleteCallF_ARGS)
Definition LcCall_cc.cc:83