liblcconfig 9.0
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
LibLcConfig_lc.h File Reference

LibLcConfig_lc.h - 27 May 2023 - aotto1968. More...

#include "kernel_mk.h"
#include <string.h>
#include "debug_mk.h"
#include "config_overload_lc.h"
+ Include dependency graph for LibLcConfig_lc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BEGIN_LC_C_DECLS   /* empty */
 
#define END_LC_C_DECLS   /* empty */
 
#define LC_RT_ARGS_ONLY   MK_RT_ARGS_ONLY
 
#define LC_RT_ARGS   MK_RT_ARGS
 
#define LC_RT_CALL_ONLY   MK_RT_CALL_ONLY
 
#define LC_RT_CALL   MK_RT_CALL
 
#define LC_RT_CALL_NULL_ONLY   MK_RT_CALL_NULL_ONLY
 
#define LC_RT_CALL_NULL   MK_RT_CALL_NULL
 
#define LC_RT_REF   MK_RT_REF
 
#define LC_RT_PARSER_ONLY   MK_RT_PARSER_ONLY
 
#define LC_RT_PARSER   MK_RT_PARSER
 
#define LC_RT_PTR   MK_RT_PTR
 
#define LcRtSetup_O(o)   MkRtSetup_O(o)
 
#define LcRtSetup_X(x)   MkRtSetup_X(x)
 
#define LcRtSetup_XN(x)   MkRtSetup_XN(x)
 
#define LcRtSetup_ON(o)   MkRtSetup_ON(o)
 
#define LcRtSetup_NULL   MkRtSetup_NULL
 
#define LcERROR_R(r)   MkERROR_R(r)
 
#define LcERROR_RT   MkERROR
 
#define LcERROR_O(o)   MkERROR_O(o)
 
#define LcERROR_X(x)   MkERROR_X(x)
 
#define LcERROR_XN(x)   MkERROR_XN(x)
 
#define LcERROR   MkERROR
 
#define LC_EXTERN
 static library
 
#define LC_EXTERN_DATA   extern
 
#define LC_SET_T(_cls, _hook, _nat)
 
#define LcReturnCheckI(ret)   ((ret) == CONFIG_FALSE)
 check if ret signal an error
 
#define LcErrorE_Check(lc_hdl, PROC)
 check on a liblcconfig error and convert into a liblcconfig error …
 
#define LcErrorCheckI(err)   ((err) == CONFIG_FALSE)
 
#define LcErrorC_Check(hdl, PROC)
 
#define OT_ERROR_LC_2_MQ(hdl)   LcConfigErrorToMQ(MkOBJ(hdl), __func__,__FILE__,__LINE__);
 

Typedefs

typedef enum LcErrorE LcErrorE
 define the return-code of a method-call
 
typedef enum LcErrorTypeE LcErrorTypeE
 define the error-source of a LcConfigC
 
typedef void(* LcSetupThreadF) (MK_RT_ARGS_ONLY)
 
LcConfigC


typedef struct LcConfigSLC_CFG
 class-shortcut for struct LcConfigS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct LcConfigSLC_CFGN
 class-shortcut for const struct LcConfigS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct LcConfigS LC_CFGR
 reference-shortcut for struct LcConfigS, all shortcut using the XX_YYYR syntax (only for public API) …
 
LcSettingC


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) …
 

Functions

LC_EXTERN void LcSetup (void)
 setup liblcconfig internal memory …
 
LC_EXTERN void LcCleanup (void)
 cleanup liblcconfig internal memory …
 
LC_EXTERN enum MkErrorE LcConfigErrorToMQ (MK_OBJN const obj, MK_STRN const func, MK_STRN const file, MK_INT const line) MK_ATTR_HDL
 if a libconfig funtion return LcErrorE use this function to create a libmsgque error
 
LC_EXTERN void LcSetupThreadCallback (LcSetupThreadF call)
 

LcConfigFormatE

enum  LcConfigFormatE { CONFIG_FORMAT_DEFAULT =0 , CONFIG_FORMAT_HEX =1 }
 set the format of a LcSettingCMore...
 
typedef enum LcConfigFormatE LcConfigFormatE
 define the number-format of a LcSettingC
 
LC_EXTERN MK_STRN LcConfigFormatE_ToString (enum LcConfigFormatE value)
 return the LcConfigFormatE as string …
 
MK_INT LcConfigFormatE_ToInt (enum LcConfigFormatE value)
 return the LcConfigFormatE as integer …
 
LC_EXTERN enum MkErrorE LcConfigFormatE_FromInt (MK_INT const value, enum LcConfigFormatE *value_out)
 return the LcConfigFormatE from integer …
 

LcConfigTypeE

enum  LcConfigTypeE {
  CONFIG_TYPE_NONE =0 , CONFIG_TYPE_GROUP =1 , CONFIG_TYPE_INT =2 , CONFIG_TYPE_INT64 =3 ,
  CONFIG_TYPE_FLOAT =4 , CONFIG_TYPE_STRING =5 , CONFIG_TYPE_BOOL =6 , CONFIG_TYPE_ARRAY =7 ,
  CONFIG_TYPE_LIST =8
}
 
typedef enum LcConfigTypeE LcConfigTypeE
 define the data-type of a LcSettingC
 
LC_EXTERN MK_STRN LcConfigTypeE_ToString (enum LcConfigTypeE value)
 return the LcConfigTypeE as string …
 
MK_INT LcConfigTypeE_ToInt (enum LcConfigTypeE value)
 return the LcConfigTypeE as integer …
 
LC_EXTERN enum MkErrorE LcConfigTypeE_FromInt (MK_INT const value, enum LcConfigTypeE *value_out)
 return the LcConfigTypeE from integer …
 

LcConfigOptionsEF

enum  LcConfigOptionsEF {
  CONFIG_OPTION_NONE =0x0 , CONFIG_OPTION_AUTOCONVERT =0x01 , CONFIG_OPTION_SEMICOLON_SEPARATORS =0x02 , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS =0x04 ,
  CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS =0x08 , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE =0x10 , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION =0x20 , CONFIG_OPTION_FSYNC =0x40 ,
  CONFIG_OPTION_ALLOW_OVERRIDES =0x80
}
 configuration options for config-file-layout More...
 
typedef enum LcConfigOptionsEF LcConfigOptionsEF
 define the configuration-option of a LcConfigC
 
LC_EXTERN MK_STRN LcConfigOptionsEF_ToString (enum LcConfigOptionsEF value)
 BEGIN-LcConfigOptionsEF - created by 'c_MqS.tcl -i NHI1_HOME/theConfig/liblcconfig/.liblcconfig.meta' - DO NOT change.
 
MK_INT LcConfigOptionsEF_ToInt (enum LcConfigOptionsEF value)
 return the LcConfigOptionsEF as integer …
 
LC_EXTERN enum MkErrorE LcConfigOptionsEF_FromInt (MK_INT const value, enum LcConfigOptionsEF *value_out)
 return the LcConfigOptionsEF from integer …
 

LcErrorE

END-LcConfigOptionsEF - created by 'c_MqS.tcl -i NHI1_HOME/theConfig/liblcconfig/.liblcconfig.meta' - DO NOT change

enum  LcErrorE { CONFIG_FALSE =0 , CONFIG_TRUE =1 }
 Signals an error and is used as the return value of a function … More...
 
LC_EXTERN MK_STRN LcErrorE_ToString (enum LcErrorE value)
 return the LcErrorE as string …
 
MK_INT LcErrorE_ToInt (enum LcErrorE value)
 return the LcErrorE as integer …
 
LC_EXTERN enum MkErrorE LcErrorE_FromInt (MK_INT const value, enum LcErrorE *value_out)
 return the LcErrorE from integer …
 

LcErrorTypeE

enum  LcErrorTypeE { CONFIG_ERRROR_NONE = 0 , CONFIG_ERRROR_FILE_IO = 1 , CONFIG_ERRROR_PARSE = 2 }
 
LC_EXTERN MK_STRN LcErrorTypeE_ToString (enum LcErrorTypeE value)
 return the LcErrorTypeE as string …
 
MK_INT LcErrorTypeE_ToInt (enum LcErrorTypeE value)
 return the LcErrorTypeE as integer …
 
LC_EXTERN enum MkErrorE LcErrorTypeE_FromInt (MK_INT const value, enum LcErrorTypeE *value_out)
 return the LcErrorTypeE from integer …
 

Detailed Description

LibLcConfig_lc.h - 27 May 2023 - aotto1968.

Version
9220f56ae9df672d911c9d7255ea7e76516b4d65
Date
Sat May 27 15:18:36 2023 +0200
Author
aotto1968 aotto.nosp@m.1968.nosp@m.@t-on.nosp@m.line.nosp@m..de

Definition in file LibLcConfig_lc.h.

Macro Definition Documentation

◆ BEGIN_LC_C_DECLS

#define BEGIN_LC_C_DECLS   /* empty */

Definition at line 104 of file LibLcConfig_lc.h.

◆ END_LC_C_DECLS

#define END_LC_C_DECLS   /* empty */

Definition at line 105 of file LibLcConfig_lc.h.

◆ LcErrorC_Check

#define LcErrorC_Check (   hdl,
  PROC 
)
Value:
if (unlikely(LcErrorCheckI(PROC))) { \
OT_ERROR_LC_2_MQ(hdl); \
OT_ERROR_MQ_2_LNG(hdl); \
goto error; \
}
#define LcErrorCheckI(err)
#define unlikely(x)

Definition at line 680 of file LibLcConfig_lc.h.

◆ LcErrorCheckI

#define LcErrorCheckI (   err)    ((err) == CONFIG_FALSE)

Definition at line 678 of file LibLcConfig_lc.h.

◆ OT_ERROR_LC_2_MQ

#define OT_ERROR_LC_2_MQ (   hdl)    LcConfigErrorToMQ(MkOBJ(hdl), __func__,__FILE__,__LINE__);

Definition at line 687 of file LibLcConfig_lc.h.

Typedef Documentation

◆ LcSetupThreadF

typedef void( * LcSetupThreadF) (MK_RT_ARGS_ONLY)

Definition at line 667 of file LibLcConfig_lc.h.

Function Documentation

◆ LcSetupThreadCallback()

LC_EXTERN void LcSetupThreadCallback ( LcSetupThreadF  call)