theConfig 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - rb - jv - cc
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 LcSettingC_ObjNew
 

Typedefs

typedef struct LcSettingSLC_CFS
 class-shortcut for struct LcSettingS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct LcSettingSLC_CFSN
 class-shortcut for const struct LcSettingS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct LcSettingS 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

MK_ARTIFICIAL LC_CFS LcSettingC_ObjNew (config_setting_t *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
LC_CFS LcSettingC_ObjCreate (config_setting_t *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
MK_HDL LcSettingHandleGet_RT (MK_RT mkrt, LC_CFS const cfs)
 Handle-Get-Slot - returns a export-hdl to the LcSettingC useable for external storage
 
LC_CFS 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

LC_CFS 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

LC_CFS LcSettingInstances_RT (MK_PARSER_RT_ONLY)
 get head-instance from linked-list of LcSettingS type …
 
LC_CFS LcSettingNext (LC_CFS const cfs)
 get next instance from linked-list of LcSettingS type
 
LC_CFS LcSettingPrev (LC_CFS const cfs)
 get previous instance from linked-list of LcSettingS type
 

LcSettingC - Export - function

LC_EXTERN LC_CFS LcSettingHandleResolveP (MK_RT mkrt, MK_HDL const netHdl)
 Non-inline replacement for LcSettingHandleResolve
 
LC_EXTERN MK_HDL LcSettingHandleGetP (MK_RT mkrt, LC_CFS const cfs)
 Non-inline replacement for LcSettingHandleGet
 

LcSettingC - Introspection - function

LC_EXTERN LC_CFS LcSettingNextP (LC_CFS const cfs)
 Non-inline replacement for LcSettingNext
 
LC_EXTERN LC_CFS LcSettingPrevP (LC_CFS const cfs)
 Non-inline replacement for LcSettingPrev
 
LC_EXTERN LC_CFS LcSettingInstancesP (MK_PARSER_RT_ONLY)
 Non-inline replacement for LcSettingInstances
 

LcSettingC - Misc - function

LC_EXTERN LC_CFS LcSettingGetNullP (void)
 Non-inline replacement for LcSettingGetNull
 

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 LcSettingC_ObjNew

Definition at line 204 of file LcSettingC_def_lc.h.

◆ LcSettingHandleGet

#define LcSettingHandleGet ( ...)
Value:
MK_HDL LcSettingHandleGet_RT(MK_RT mkrt, LC_CFS const cfs)
Handle-Get-Slot - returns a export-hdl to the LcSettingC useable for external storage
#define MK_RT_CALL

Definition at line 168 of file config_overload_lc.h.

◆ LcSettingHandleGet_NULL

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

Definition at line 167 of file config_overload_lc.h.

◆ LcSettingHandleResolve

#define LcSettingHandleResolve ( ...)
Value:
LC_CFS LcSettingHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a LcSettingC from netHdl or MK_NULL if invalid…

Definition at line 164 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(...)
int32_t MK_HDL
Struct to represent the data from the LcSettingC …

wrapper for LcSettingHandleResolve with error-handline

Parameters
[in]netHdlThe handle previously returned by MkObjectHandleGet.
Returns
Return an valid 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 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 LC_CFS is returned than the netHdl is valid.

Definition at line 279 of file LcSettingC_def_lc.h.

279#define LcSettingHandleResolve_e(netHdl) ({ \
280 MK_HDL tmpHdl=netHdl; \
281 LC_CFS tmp; \
282 if (tmpHdl==0) { \
283 tmp=NULL; \
284 } else { \
285 tmp=LcSettingHandleResolve(tmpHdl); \
286 if (tmp==NULL) { \
287 MkErrorSetC_1_NULL("ERROR: 'LcSettingC' handle is 'NULL'"); \
288 goto error; \
289 }; \
290 }; \
291 tmp; \
292})

◆ LcSettingHandleResolve_NULL

#define LcSettingHandleResolve_NULL ( ...)
Value:

Definition at line 163 of file config_overload_lc.h.

◆ LcSettingInstances

#define LcSettingInstances ( )
Value:
LC_CFS LcSettingInstances_RT(MK_PARSER_RT_ONLY)
get head-instance from linked-list of LcSettingS type …
#define MK_RT_CALL_ONLY

Definition at line 179 of file config_overload_lc.h.

◆ LcSettingInstances_NULL

#define LcSettingInstances_NULL ( )
Value:

Definition at line 178 of file config_overload_lc.h.

Typedef Documentation

◆ LC_CFS

typedef struct LcSettingS* LC_CFS

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

Definition at line 335 of file LibLcConfig_lc.h.

◆ LC_CFSN

typedef const struct LcSettingS* LC_CFSN

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

Definition at line 338 of file LibLcConfig_lc.h.

◆ LC_CFSR

typedef struct LcSettingS LC_CFSR

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

Definition at line 341 of file LibLcConfig_lc.h.

Function Documentation

◆ LcSettingC_ObjCreate()

LC_CFS LcSettingC_ObjCreate ( config_setting_t * hdl)
inline

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

Definition at line 227 of file LcSettingC_def_lc.h.

227 {
229 return LcGetCfsFromNat(hdl);
230}
#define LcGetCfsFromNat(_nat)
helper for LcSettingC_ObjNew …
#define MkRtSetup_NULL
+ Here is the caller graph for this function:

◆ LcSettingC_ObjNew()

MK_ARTIFICIAL LC_CFS LcSettingC_ObjNew ( config_setting_t * hdl)
inline

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

Definition at line 220 of file LcSettingC_def_lc.h.

220 {
222 return LcGetCfsFromNat(hdl);
223}
+ Here is the caller graph for this function:

◆ LcSettingGetNull()

LC_CFS LcSettingGetNull ( void )
inline

Null-Slot - return a LcSettingC typed NULL instance …

Definition at line 304 of file LcSettingC_def_lc.h.

304 {
305 return (LC_CFS)MK_NULL;
306 }
#define MK_NULL

◆ LcSettingGetNullP()

LC_EXTERN LC_CFS LcSettingGetNullP ( void )

Non-inline replacement for LcSettingGetNull

◆ LcSettingHandleGet_RT()

MK_HDL LcSettingHandleGet_RT ( MK_RT mkrt,
LC_CFS const cfs )
inline

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.

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 246 of file LcSettingC_def_lc.h.

249 {
250 return MkObjectHandleGet(cfs?MkOBJ(cfs):NULL);
251}
#define MkObjectHandleGet(...)
#define MkOBJ(x)

◆ LcSettingHandleGetP()

LC_EXTERN MK_HDL LcSettingHandleGetP ( MK_RT mkrt,
LC_CFS const cfs )

Non-inline replacement for LcSettingHandleGet

◆ LcSettingHandleResolve_RT()

LC_CFS LcSettingHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inline

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 263 of file LcSettingC_def_lc.h.

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

◆ LcSettingHandleResolveP()

LC_EXTERN LC_CFS LcSettingHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for LcSettingHandleResolve

◆ LcSettingInstances_RT()

LC_CFS LcSettingInstances_RT ( MK_PARSER_RT_ONLY )
inline

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

The head-instance is the last instance created.

Definition at line 328 of file LcSettingC_def_lc.h.

328 {
331}
#define LC_STATIC_RT
MkThreadLocal MK_TYP LcSettingC_TT
class as MkSuperTypeS-class-type …
MK_OBJ instances

◆ LcSettingInstancesP()

LC_EXTERN LC_CFS LcSettingInstancesP ( MK_PARSER_RT_ONLY )

Non-inline replacement for LcSettingInstances

◆ LcSettingNext()

LC_CFS LcSettingNext ( LC_CFS const cfs)
inline

get next instance from linked-list of LcSettingS type

Definition at line 335 of file LcSettingC_def_lc.h.

335 {
336 MK_INSTANCE_HDL(cfs);
337 return (LC_CFS)LcSettingC_X2obj(cfs)->obj_protect.next;
338}
#define LcSettingC_X2obj(x)
#define MK_INSTANCE_HDL(x)

◆ LcSettingNextP()

LC_EXTERN LC_CFS LcSettingNextP ( LC_CFS const cfs)

Non-inline replacement for LcSettingNext

◆ LcSettingPrev()

LC_CFS LcSettingPrev ( LC_CFS const cfs)
inline

get previous instance from linked-list of LcSettingS type

Definition at line 342 of file LcSettingC_def_lc.h.

342 {
343 MK_INSTANCE_HDL(cfs);
344 return (LC_CFS)LcSettingC_X2obj(cfs)->obj_protect.prev;
345}

◆ LcSettingPrevP()

LC_EXTERN LC_CFS LcSettingPrevP ( LC_CFS const cfs)

Non-inline replacement for LcSettingPrev