theConfig 10.0
Loading...
Searching...
No Matches
LcSettingC_Class_C_API

LcSettingC - define the class … More...

+ Collaboration diagram for LcSettingC_Class_C_API:

Topics

 LcSettingC_Class_Define_C_API
 LcSettingC - low level definition, access and cast …
 

Macros

#define LcGetCfsFromNat(_nat)
 helper for liblcconfig::LcSettingC_ObjNew
 

Typedefs

typedef struct LcSettingSliblcconfig::LC_CFS
 class-shortcut for struct LcSettingS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct LcSettingSliblcconfig::LC_CFSN
 class-shortcut for const struct LcSettingS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct LcSettingS liblcconfig::LC_CFSR
 reference-shortcut for struct LcSettingS, all shortcut using the XX_YYYR syntax (only for public API) …
 

LcSettingC - Export - inline - interact with an external software

static MK_ARTIFICIAL LC_CFS liblcconfig::LcSettingC_ObjNew (config_setting_t *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static LC_CFS liblcconfig::LcSettingC_ObjCreate (config_setting_t *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static MK_HDL liblcconfig::LcSettingHandleGet_RT (MK_RT mkrt, LC_CFS const cfs)
 Handle-Get-Slot - returns a export-hdl to the LcSettingC useable for external storage
 
static LC_CFS liblcconfig::LcSettingHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a LcSettingC from netHdl or MK_NULL if invalid…
 
#define LcSettingHandleResolve_e(netHdl)
 wrapper for LcSettingHandleResolve with error-handline
 

LcSettingC - Misc - function - unspecified functions to perform different tasks

static LC_CFS liblcconfig::LcSettingGetNull (void)
 Null-Slot - return a LcSettingC typed NULL instance …
 

LcSettingC - Introspection - inline - access to all instances created by class starting with the last one

static LC_CFS liblcconfig::LcSettingInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of LcSettingS type …
 
static LC_CFS liblcconfig::LcSettingNext (LC_CFS const cfs)
 get next instance from linked-list of LcSettingS type
 
static LC_CFS liblcconfig::LcSettingPrev (LC_CFS const cfs)
 get previous instance from linked-list of LcSettingS type
 

LcSettingC - Export - overload

#define LcSettingHandleResolve_NULL(...)
 
#define LcSettingHandleResolve(...)
 
#define LcSettingHandleGet_NULL(...)
 
#define LcSettingHandleGet(...)
 

LcSettingC - Introspection - overload

#define LcSettingInstances_NULL()
 
#define LcSettingInstances()
 

Detailed Description

LcSettingC - define the class …

Macro Definition Documentation

◆ LcGetCfsFromNat

#define LcGetCfsFromNat ( _nat)
Value:
#define LC_SET_T(_cls, _hook, _nat)
#define config_setting_get_hook(S)

helper for liblcconfig::LcSettingC_ObjNew

Definition at line 183 of file LcSettingC_def_lc.h.

◆ LcSettingHandleGet

#define LcSettingHandleGet ( ...)
Value:
LcSettingHandleGet_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 165 of file config_overload_lc.h.

◆ LcSettingHandleGet_NULL

#define LcSettingHandleGet_NULL ( ...)
Value:
LcSettingHandleGet_RT(MK_RT_CALL_NULL __VA_ARGS__)
#define MK_RT_CALL_NULL

Definition at line 164 of file config_overload_lc.h.

◆ LcSettingHandleResolve

#define LcSettingHandleResolve ( ...)
Value:
LcSettingHandleResolve_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 161 of file config_overload_lc.h.

◆ LcSettingHandleResolve_e

#define LcSettingHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
LC_CFS tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
tmp=LcSettingHandleResolve(tmpHdl); \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'LcSettingC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
#define LcSettingHandleResolve(...)

wrapper for LcSettingHandleResolve with error-handline

Parameters
[in]netHdlThe handle previously returned by MkObjectHandleGet.
Returns
Return an valid liblcconfig::LC_CFS or MK_NULL with an error set.
  • If netHdl is 0 than MK_NULL is returned and the upper-code decide how to deal with it.
  • LcSettingHandleResolve return an valid liblcconfig::LC_CFS or MK_NULL if the netHdl is invalid or the underlying object has already been deleted.
    • If a MK_NULL is returned than an error-message is created and a jump to the label error is done.
    • If a liblcconfig::LC_CFS is returned than the netHdl is valid.

Definition at line 261 of file LcSettingC_def_lc.h.

261#define LcSettingHandleResolve_e(netHdl) ({ \
262 MK_HDL tmpHdl=netHdl; \
263 LC_CFS tmp; \
264 if (tmpHdl==0) { \
265 tmp=NULL; \
266 } else { \
267 tmp=LcSettingHandleResolve(tmpHdl); \
268 if (tmp==NULL) { \
269 MkErrorSetC_1_NULL("ERROR: 'LcSettingC' handle is 'NULL'"); \
270 goto error; \
271 }; \
272 }; \
273 tmp; \
274})

◆ LcSettingHandleResolve_NULL

#define LcSettingHandleResolve_NULL ( ...)
Value:
LcSettingHandleResolve_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 160 of file config_overload_lc.h.

◆ LcSettingInstances

#define LcSettingInstances ( )
Value:
LcSettingInstances_RT(MK_RT_CALL_ONLY)
#define MK_RT_CALL_ONLY

Definition at line 176 of file config_overload_lc.h.

◆ LcSettingInstances_NULL

#define LcSettingInstances_NULL ( )
Value:
LcSettingInstances_RT(MK_RT_CALL_NULL_ONLY)
#define MK_RT_CALL_NULL_ONLY

Definition at line 175 of file config_overload_lc.h.

Typedef Documentation

◆ LC_CFS

class-shortcut for struct LcSettingS *, all shortcut using the XX_YYY syntax (only for public API) …

Definition at line 309 of file LibLcConfig_lc.h.

◆ LC_CFSN

typedef const struct LcSettingS* liblcconfig::LC_CFSN

class-shortcut for const struct LcSettingS *, all const shortcut using the XX_YYYC syntax (only for public API) …

Definition at line 312 of file LibLcConfig_lc.h.

◆ LC_CFSR

reference-shortcut for struct LcSettingS, all shortcut using the XX_YYYR syntax (only for public API) …

Definition at line 315 of file LibLcConfig_lc.h.

Function Documentation

◆ LcSettingC_ObjCreate()

static LC_CFS liblcconfig::LcSettingC_ObjCreate ( config_setting_t * hdl)
inlinestatic

return Programming-Language-Micro-Kernel (PLMK) instance from native hdl

Definition at line 206 of file LcSettingC_def_lc.h.

206 {
208 return LcGetCfsFromNat(hdl);
209}
#define LcGetCfsFromNat(_nat)
helper for liblcconfig::LcSettingC_ObjNew …
#define MkRtSetup_NULL

◆ LcSettingC_ObjNew()

static MK_ARTIFICIAL LC_CFS liblcconfig::LcSettingC_ObjNew ( config_setting_t * hdl)
inlinestatic

return Programming-Language-Micro-Kernel (PLMK) instance from native hdl

Definition at line 199 of file LcSettingC_def_lc.h.

199 {
201 return LcGetCfsFromNat(hdl);
202}

◆ LcSettingGetNull()

static LC_CFS liblcconfig::LcSettingGetNull ( void )
inlinestatic

Null-Slot - return a LcSettingC typed NULL instance …

Definition at line 286 of file LcSettingC_def_lc.h.

286 {
287 return (LC_CFS)MK_NULL;
288 }
#define MK_NULL
+ Here is the caller graph for this function:

◆ LcSettingHandleGet_RT()

static MK_HDL liblcconfig::LcSettingHandleGet_RT ( MK_RT mkrt,
LC_CFS const cfs )
inlinestatic

Handle-Get-Slot - returns a export-hdl to the LcSettingC useable for external storage

The export-hdl is a reference to an instance that can be stored in software and converted back into an instance using the LcSettingHandleResolve.

By default, the export-hdl is initialized to "0", which is equivalent to does not exist. This function returns a non-zero and unique export-hdl that is recreated if necessary.

The export-hdl is only valid until the Programming-Language-Micro-Kernel (PLMK) ends.

example: The export-hdl is used in rpc to identify an object across the network.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]cfsProgramming-Language-Micro-Kernel (PLMK) instance from config_setting_t
Returns
the required export-hdl

Definition at line 228 of file LcSettingC_def_lc.h.

231 {
232 return MkObjectHandleGet(cfs?MkOBJ(cfs):NULL);
233}
#define MkObjectHandleGet(...)
#define MkOBJ(x)
+ Here is the caller graph for this function:

◆ LcSettingHandleResolve_RT()

static LC_CFS liblcconfig::LcSettingHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inlinestatic

Handle-Resolve-Slot - return a LcSettingC from netHdl or MK_NULL if invalid…

The LcSettingHandleResolve undo the LcSettingHandleGet and is intended to export a unique identifer into external code not belonging to the Programming-Language-Micro-Kernel (PLMK).

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]netHdlhandle former exported with LcSettingHandleGet
Returns
the required handle or MK_NULL if netHdl is invalid

Definition at line 245 of file LcSettingC_def_lc.h.

248 {
249 return LcCfs(MkObjectHandleResolve(netHdl));
250}
static LC_CFS LcCfs(MK_MNG mng)
cast a unknown-object into an LcSettingS pointer or NULL if not possible
#define MkObjectHandleResolve(...)

◆ LcSettingInstances_RT()

static LC_CFS liblcconfig::LcSettingInstances_RT ( MK_RT mkrt)
inlinestatic

get head-instance from linked-list of LcSettingS type …

The head-instance is the last instance created.

Definition at line 310 of file LcSettingC_def_lc.h.

310 {
312 return (LC_CFS)MkTypeInstances(LcSettingC_TT);
313}
#define LC_STATIC_RT
+ Here is the caller graph for this function:

◆ LcSettingNext()

static LC_CFS liblcconfig::LcSettingNext ( LC_CFS const cfs)
inlinestatic

get next instance from linked-list of LcSettingS type

Definition at line 317 of file LcSettingC_def_lc.h.

317 {
318 MK_INSTANCE_HDL(cfs);
319 return (LC_CFS)LcSettingC_X2obj(cfs)->obj_protect.next;
320}
#define LcSettingC_X2obj(x)
#define MK_INSTANCE_HDL(x)
+ Here is the caller graph for this function:

◆ LcSettingPrev()

static LC_CFS liblcconfig::LcSettingPrev ( LC_CFS const cfs)
inlinestatic

get previous instance from linked-list of LcSettingS type

Definition at line 324 of file LcSettingC_def_lc.h.

324 {
325 MK_INSTANCE_HDL(cfs);
326 return (LC_CFS)LcSettingC_X2obj(cfs)->obj_protect.prev;
327}
+ Here is the caller graph for this function: