liblcconfig 9.0
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
LcSettingC_lc.h File Reference

LcSettingC_lc.h - 25 May 2023 - aotto1968. More...

Go to the source code of this file.

Data Structures

struct  LcSettingS
 Class to represent a configuration-setting of the of the libconfig library … More...
 

Macros

#define BEGIN_LC_C_DECLS   /* empty */
 
#define END_LC_C_DECLS   /* empty */
 
#define LcCfsRaise(_cfs)
 raise an error if class-instance is not valid
 
#define LcCFS_R(x)   (*(x)).super.cfs
 cast a known-object into an LcSettingS reference
 
#define LcCFS(x)   (&LcCFS_R(x))
 cast a known-object into an LcSettingS pointer
 
#define LcGetCfsFromNat(_nat)   LC_SET_T(LcSettingC,config_setting_get_hook,_nat)
 helper for LcSettingC_ObjNew
 
LcSettingC signature define
#define LcSettingC_SIGNATURE   (MkObjectC_SIGNATURE ^ (12u<<10))
 
#define LcSettingC_MASK   (((1u<<22)-1)<<10)
 
LcSettingC cast to superclass
#define LcSettingC_X2cfs(x)   (x)
 
#define LcSettingC_X2obj(x)   MkOBJ(x)
 

Functions

LC_CFS LcCfs (MK_MNG mng)
 cast a unknown-object into an LcSettingS pointer or NULL if not possible
 
LC_CFSN LcCfsN (MK_MNGN mng)
 (const) cast a unknown-object into an LcSettingS pointer or NULL if not possible
 
MK_BFL LcSettingLookupAll (LC_CFSN setting)
 addon - read an entire configuration below setting into MkBufferListC
 
void LcSettingLog_RT (MK_RT const mkrt, LC_CFSN const setting, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the setting
 
LC_CFG LcConfigC_ObjNew (config_t *hdl)
 return Programming-Language-Micro-Kernel instance from hdl
 
LC_CFS LcSettingC_ObjNew (config_setting_t *hdl)
 return Programming-Language-Micro-Kernel instance from hdl
 
LC_CFS LcSettingC_ObjCreate (config_setting_t *hdl)
 return Programming-Language-Micro-Kernel instance from hdl
 
LC_CFS LcSettingFromHandle (MK_LONG const exporthdl)
 return a LcSettingC from exporthdl
 
LC_CFS LcSettingInstances (void)
 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
 
LC_CFS LcSettingGetElem (LC_CFSN setting, MK_INT idx)
 This function fetches the element at the given index index in the setting setting, which must be an array, list, or group …
 
LC_CFS LcSettingGetMember (LC_CFSN setting, MK_STRN name)
 This function fetches the child setting named name from the group setting
 
MK_BOOL LcSettingGetBool (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_BOOL LcSettingGetBoolElem (LC_CFSN setting, MK_INT idx)
 These functions return the value at the specified index index in the setting setting
 
MK_DBL LcSettingGetFloat (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_DBL LcSettingGetFloatElem (LC_CFSN setting, MK_INT idx)
 These functions return the value at the specified index index in the setting setting
 
enum LcConfigFormatE LcSettingGetFormat (LC_CFSN setting)
 These functions get and set the external format for the setting setting
 
MK_INT LcSettingGetInt (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_WID LcSettingGetInt64 (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_WID LcSettingGetInt64Elem (LC_CFSN setting, MK_INT idx)
 These functions return the value at the specified index index in the setting setting
 
MK_INT LcSettingGetIntElem (LC_CFSN setting, MK_INT idx)
 These functions return the value at the specified index index in the setting setting
 
MK_STRN LcSettingGetString (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_STRN LcSettingGetStringElem (LC_CFSN setting, MK_INT idx)
 These functions return the value at the specified index index in the setting setting
 
MK_BOOL LcSettingIsAggregate (LC_CFSN setting)
 These convenience functions, some of which are implemented as macros, test if the setting setting is of an aggregate type (a group, array, or list), of a scalar type (integer, 64-bit integer, floating point, boolean, or string), and of a number (integer, 64-bit integer, or floating point), respectively …
 
MK_BOOL LcSettingIsArray (LC_CFSN setting)
 These convenience functions, which are implemented as macros, test if the setting setting is of a given type …
 
MK_BOOL LcSettingIsGroup (LC_CFSN setting)
 These convenience functions, which are implemented as macros, test if the setting setting is of a given type …
 
MK_BOOL LcSettingIsList (LC_CFSN setting)
 These convenience functions, which are implemented as macros, test if the setting setting is of a given type …
 
MK_BOOL LcSettingIsNumber (LC_CFSN setting)
 These convenience functions, some of which are implemented as macros, test if the setting setting is of an aggregate type (a group, array, or list), of a scalar type (integer, 64-bit integer, floating point, boolean, or string), and of a number (integer, 64-bit integer, or floating point), respectively …
 
MK_BOOL LcSettingIsRoot (LC_CFSN setting)
 This function returns CONFIG_TRUE if the given setting is the root setting, and CONFIG_FALSE otherwise …
 
MK_BOOL LcSettingIsScalar (LC_CFSN setting)
 These convenience functions, some of which are implemented as macros, test if the setting setting is of an aggregate type (a group, array, or list), of a scalar type (integer, 64-bit integer, floating point, boolean, or string), and of a number (integer, 64-bit integer, or floating point), respectively …
 
LC_CFS LcSettingLookup (LC_CFS setting, MK_STRN path)
 This function locates a setting by a path path relative to the setting setting
 
enum MkErrorE LcSettingLookupBool (LC_CFSN setting, MK_STRN name, MK_BOOL *value_out)
 These functions look up the value of the child setting named name of the setting setting
 
enum MkErrorE LcSettingLookupFloat (LC_CFSN setting, MK_STRN name, MK_DBL *value_out)
 These functions look up the value of the child setting named name of the setting setting
 
enum MkErrorE LcSettingLookupInt (LC_CFSN setting, MK_STRN name, MK_INT *value_out)
 These functions look up the value of the child setting named name of the setting setting
 
enum MkErrorE LcSettingLookupInt64 (LC_CFSN setting, MK_STRN name, MK_WID *value_out)
 These functions look up the value of the child setting named name of the setting setting
 
enum MkErrorE LcSettingLookupString (LC_CFSN setting, MK_STRN name, MK_STRN *value_out)
 These functions look up the value of the child setting named name of the setting setting
 
LC_CFS LcSettingParent (LC_CFSN setting)
 This function returns the parent setting of the given setting, or NULL if setting is the root setting …
 
MK_INT LcSettingIndex (LC_CFSN setting)
 This function returns the index of the given setting within its parent setting …
 
MK_INT LcSettingLength (LC_CFSN setting)
 This function returns the number of settings in a group, or the number of elements in a list or array …
 
MK_STRN LcSettingName (LC_CFSN setting)
 This function returns the name of the given setting, or NULL if the setting has no name …
 
enum MkErrorE LcSettingRemove (LC_CFS parent, MK_STRN name)
 This function removes and destroys the setting named name from the parent setting parent, which must be a group …
 
enum MkErrorE LcSettingRemoveElem (LC_CFS parent, MK_INT idx)
 This function removes the child setting at the given index index from the setting parent, which must be a group, list, or array …
 
MK_STRN LcSettingSourceFile (LC_CFSN setting)
 This function returns the name of the file from which the setting setting was read, or NULL if the setting was not read from a file …
 
MK_INT LcSettingSourceLine (LC_CFSN setting)
 This function returns the line number of the configuration file or stream at which the setting setting was read, or 0 if no line number is available …
 
enum LcConfigTypeE LcSettingType (LC_CFSN setting)
 This function returns the type of the given setting
 
LC_CFS LcSettingSetBoolElem (LC_CFS setting, MK_INT idx, MK_INT value)
 These functions set the value at the specified index index in the setting setting to value
 
LC_CFS LcSettingSetFloatElem (LC_CFS setting, MK_INT idx, MK_DBL value)
 These functions set the value at the specified index index in the setting setting to value
 
LC_CFS LcSettingSetInt64Elem (LC_CFS setting, MK_INT idx, MK_WID value)
 These functions set the value at the specified index index in the setting setting to value
 
LC_CFS LcSettingSetIntElem (LC_CFS setting, MK_INT idx, MK_INT value)
 These functions set the value at the specified index index in the setting setting to value
 
LC_CFS LcSettingSetStringElem (LC_CFS setting, MK_INT idx, MK_STRN value)
 These functions set the value at the specified index index in the setting setting to value
 
enum MkErrorE LcSettingSetBool (LC_CFS setting, MK_BOOL value)
 These functions set the value of the given setting to value
 
enum MkErrorE LcSettingSetFloat (LC_CFS setting, MK_DBL value)
 These functions set the value of the given setting to value
 
enum MkErrorE LcSettingSetFormat (LC_CFS setting, enum LcConfigFormatE format)
 These functions get and set the external format for the setting setting
 
enum MkErrorE LcSettingSetInt (LC_CFS setting, MK_INT value)
 These functions set the value of the given setting to value
 
enum MkErrorE LcSettingSetInt64 (LC_CFS setting, MK_WID value)
 These functions set the value of the given setting to value
 
enum MkErrorE LcSettingSetString (LC_CFS setting, MK_STRN value)
 These functions set the value of the given setting to value
 
LC_CFS LcSettingAdd (LC_CFS parent, MK_STRN name, enum LcConfigTypeE __type)
 This function adds a new child setting or element to the setting parent, which must be a group, array, or list …
 
LC_CFS LcSettingAddIfNotExists (LC_CFS setting, MK_STRN name, enum LcConfigTypeE cfgtype)
 addon - add name with type only if not exists in the setting
 
LC_CFG LcSettingGetConfig (LC_CFS setting)
 addon - return the LcConfigC from the LcSettingC
 
bool LcSettingExists (const LC_CFS setting, MK_STRN name)
 addon - return true if name exists in the setting otherwise false
 

LcSettingC type definition

#define LcSettingC_T   ( (struct MkDefTypeS *) (LcSettingC_TT) )
 instance-type as specific-instance-type (cast from LcSettingC_TT into MkTypeS) …
 
#define LcSettingST   LcSettingC_T
 instance-type as specific-instance-type
 
#define LcSettingSTT   (MkTYP(LcSettingST))
 instance-type as common-instance-type (cast from LcSettingST into MkTypeS) …
 
#define LcSettingC_type   LC_CFS
 same as LcSettingS but useable in a class-macro as: class##_type
 
#define LcSettingCT_X(instance)   ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
 cast from an instance into the specific-instance-type
 
#define LcSettingCTT_X(instance)   (MkOBJ_R(instance).type)
 cast from an instance into the common-instance-type
 
#define LcSettingCT_TT(typ)   ( (struct MkDefTypeS *) (typ) )
 cast from an common-instance-type into an specific-instance-type
 
#define LcSettingC_NS   LC
 map class to namespace …
 
#define LcSettingCTT   LcSettingCTT
 instance-type as common-instance-type for LcSettingC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
#define LcSettingCT   ( (struct MkDefTypeS *) LcSettingCTT )
 instance-type as specific-instance-type for LcSettingC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
typedef struct LcSettingS LcSettingCR
 instance-struct-reference same as struct LcSettingS, useable in a class-macro as: class##R
 
typedef const struct LcSettingS LcSettingCNR
 const instance-struct-reference same as const struct LcSettingS, useable in a class-macro as: class##R
 
MkThreadLocal MK_TYP LcSettingC_TT
 instance-type as specific-instance-type
 

LcSettingC signature check

#define LcSettingC_Check(mng)   LcCfsCheck(mng)
 
bool LcCfsCheck (MK_MNGN mng)
 check LcSettingS%->Mk{ObjectS::signature} …
 

Detailed Description

LcSettingC_lc.h - 25 May 2023 - aotto1968.

Version
d0c6a32258ed70874c8bd12bab8e298e4d7c9760
Date
Thu May 25 14:41:42 2023 +0200
Author
aotto1968 aotto.nosp@m.1968.nosp@m.@t-on.nosp@m.line.nosp@m..de

Definition in file LcSettingC_lc.h.

Macro Definition Documentation

◆ BEGIN_LC_C_DECLS

#define BEGIN_LC_C_DECLS   /* empty */

Definition at line 24 of file LcSettingC_lc.h.

◆ END_LC_C_DECLS

#define END_LC_C_DECLS   /* empty */

Definition at line 25 of file LcSettingC_lc.h.