theConfig 10.0
Loading...
Searching...
No Matches
cclcconfig::LcConfigIncludeCallbackC Struct Reference

infrastructur to use the cclcconfig specific callbackMore...

#include <LcCall_cc.hh>

+ Collaboration diagram for cclcconfig::LcConfigIncludeCallbackC:

Classes

union  LcConfigIncludeCallbackU
 storage to hold the callback More...
 

Public Types

enum  LcConfigIncludeCallbackE { PC_LcConfigIncludeCB , PC_LcConfigIncludeIF }
 

Static Public Member Functions

static MK_CBP Create (MK_RT mkrt, LcConfigIncludeSCB const callback, LcConfigC *self=NULL)
 
static MK_CBP Create (MK_RT mkrt, LcConfigIncludeIF *callback, LcConfigC *self=NULL)
 
static enum MkErrorE Call (LcConfigIncludeCallF_ARGS)
 
static void Free (LcConfigIncludeFreeF_ARGS)
 

Public Attributes

enum cclcconfig::LcConfigIncludeCallbackC::LcConfigIncludeCallbackE type
 
union cclcconfig::LcConfigIncludeCallbackC::LcConfigIncludeCallbackU call
 
LcConfigCself
 

Detailed Description

infrastructur to use the cclcconfig specific callback

Definition at line 18 of file LcCall_cc.hh.

Member Enumeration Documentation

◆ LcConfigIncludeCallbackE

Enumerator
PC_LcConfigIncludeCB 
PC_LcConfigIncludeIF 

Definition at line 19 of file LcCall_cc.hh.

19 {
22 } type;
enum cclcconfig::LcConfigIncludeCallbackC::LcConfigIncludeCallbackE type

Member Function Documentation

◆ Call()

enum MkErrorE cclcconfig::LcConfigIncludeCallbackC::Call ( LcConfigIncludeCallF_ARGS )
static

Definition at line 34 of file LcCall_cc.cc.

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 }
#define LcConfigIncludeCallF_CHECK
MkBufferListC(MK_BFL hdl)
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())
MkExceptionC(MK_ERR err, MK_STRN const caller, MK_I32 const line)
#define MK_RT_CALL
+ Here is the caller graph for this function:

◆ Create() [1/2]

static MK_CBP cclcconfig::LcConfigIncludeCallbackC::Create ( MK_RT mkrt,
LcConfigIncludeIF * callback,
LcConfigC * self = NULL )
inlinestatic

Definition at line 46 of file LcCall_cc.hh.

46 {
47 return callback ? new LcConfigIncludeCallbackC(PC_LcConfigIncludeIF,callback,self) : NULL;
48 }

◆ Create() [2/2]

static MK_CBP cclcconfig::LcConfigIncludeCallbackC::Create ( MK_RT mkrt,
LcConfigIncludeSCB const callback,
LcConfigC * self = NULL )
inlinestatic

Definition at line 42 of file LcCall_cc.hh.

42 {
43 return callback ? new LcConfigIncludeCallbackC(PC_LcConfigIncludeCB,callback,self) : NULL;
44 }
+ Here is the caller graph for this function:

◆ Free()

void cclcconfig::LcConfigIncludeCallbackC::Free ( LcConfigIncludeFreeF_ARGS )
static

Definition at line 25 of file LcCall_cc.cc.

26 {
27 delete static_cast<LcConfigIncludeCallbackC*>(cfg->fConfigIncludeData);
28
29 cfg->fConfigIncludeData = NULL;
30 cfg->fConfigIncludeCall = NULL;
31 cfg->fConfigIncludeFree = NULL;
32 }
+ Here is the caller graph for this function:

Member Data Documentation

◆ call

union cclcconfig::LcConfigIncludeCallbackC::LcConfigIncludeCallbackU cclcconfig::LcConfigIncludeCallbackC::call

◆ self

LcConfigC* cclcconfig::LcConfigIncludeCallbackC::self

Definition at line 32 of file LcCall_cc.hh.

◆ type

enum cclcconfig::LcConfigIncludeCallbackC::LcConfigIncludeCallbackE cclcconfig::LcConfigIncludeCallbackC::type

The documentation for this struct was generated from the following files: