golcconfig 9.0
Loading...
Searching...
No Matches
Functions
LcConfigC_Misc_C_API

various functions to perform misc operations on a LcConfigC More...

+ Collaboration diagram for LcConfigC_Misc_C_API:

Functions

LC_EXTERN LC_CFS LcConfigRootSettingP (LC_CFGN config)
 Non-inline replacement for LcConfigRootSetting
 
LC_EXTERN void LcConfigClearP (LC_CFG config)
 Non-inline replacement for LcConfigClear
 
LC_EXTERN enum MkErrorE LcConfigReadFileP (LC_CFG config, MK_STRN filename)
 Non-inline replacement for LcConfigReadFile
 
LC_EXTERN enum MkErrorE LcConfigReadStringP (LC_CFG config, MK_STRN str)
 Non-inline replacement for LcConfigReadString
 
LC_EXTERN enum MkErrorE LcConfigWriteFileP (LC_CFG config, MK_STRN filename)
 Non-inline replacement for LcConfigWriteFile
 
enum MkErrorE LcConfigWriteString_RT (MK_RT const mkrt, LC_CFGN const cfg, MK_STRN *val_out)
 read the entire configuration cfg into the string val_out
 
void LcConfigLog_RT (MK_RT const mkrt, LC_CFGN const cfg, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the config
 
LC_CFS LcConfigRootSetting (LC_CFGN config)
 This function, which is implemented as a macro, returns the root setting for the configuration config
 
void LcConfigClear (LC_CFG config)
 Since v1.7 This function clears the configuration config
 
enum MkErrorE LcConfigReadFile (LC_CFG config, MK_STRN filename)
 This function reads and parses a configuration from the file named filename into the configuration object config
 
enum MkErrorE LcConfigReadString (LC_CFG config, MK_STRN str)
 This function reads and parses a configuration from the string str into the configuration object config
 
enum MkErrorE LcConfigWriteFile (LC_CFG config, MK_STRN filename)
 This function writes the configuration config to the file named filename
 

Overload

#define LcConfigLog(...)   LcConfigLog_RT(MK_RT_CALL __VA_ARGS__)
 
#define LcConfigLog_4(cfg, fmtobj, debug, callfunc)   LcConfigLog(cfg,fmtobj,debug,callfunc,0)
 
#define LcConfigLog_3(cfg, fmtobj, debug)   LcConfigLog(cfg,fmtobj,debug,__func__,0)
 
#define LcConfigLog_2(cfg, fmtobj)   LcConfigLog(cfg,fmtobj,0,__func__,0)
 
#define LcConfigLog_1(cfg)   LcConfigLog(cfg,NULL,0,__func__,0)
 
#define LcConfigRead_E(...)   MkErrorCheck(LcConfigRead(__VA_ARGS__))
 
#define LcConfigRead_C(...)   if (MkErrorCheckI(LcConfigRead(__VA_ARGS__)))
 
#define LcConfigReadFile_E(...)   MkErrorCheck(LcConfigReadFile(__VA_ARGS__))
 
#define LcConfigReadFile_C(...)   if (MkErrorCheckI(LcConfigReadFile(__VA_ARGS__)))
 
#define LcConfigReadString_E(...)   MkErrorCheck(LcConfigReadString(__VA_ARGS__))
 
#define LcConfigReadString_C(...)   if (MkErrorCheckI(LcConfigReadString(__VA_ARGS__)))
 
#define LcConfigWrite_E(...)   MkErrorCheck(LcConfigWrite(__VA_ARGS__))
 
#define LcConfigWrite_C(...)   if (MkErrorCheckI(LcConfigWrite(__VA_ARGS__)))
 
#define LcConfigWriteFile_E(...)   MkErrorCheck(LcConfigWriteFile(__VA_ARGS__))
 
#define LcConfigWriteFile_C(...)   if (MkErrorCheckI(LcConfigWriteFile(__VA_ARGS__)))
 
#define LcConfigWriteString(...)   LcConfigWriteString_RT(MK_RT_CALL __VA_ARGS__)
 
#define LcConfigWriteString_E(...)   MkErrorCheck(LcConfigWriteString(__VA_ARGS__))
 
#define LcConfigWriteString_C(...)   if (MkErrorCheckI(LcConfigWriteString(__VA_ARGS__)))
 
#define LcConfigWriteString_e(...)   MK_EMBEDDED(MK_STRN,LcConfigWriteString,__VA_ARGS__)
 

Detailed Description

various functions to perform misc operations on a LcConfigC

Macro Definition Documentation

◆ LcConfigLog

#define LcConfigLog (   ...)    LcConfigLog_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 45 of file config_overload_lc.h.

◆ LcConfigLog_1

#define LcConfigLog_1 (   cfg)    LcConfigLog(cfg,NULL,0,__func__,0)

Definition at line 49 of file config_overload_lc.h.

◆ LcConfigLog_2

#define LcConfigLog_2 (   cfg,
  fmtobj 
)    LcConfigLog(cfg,fmtobj,0,__func__,0)

Definition at line 48 of file config_overload_lc.h.

◆ LcConfigLog_3

#define LcConfigLog_3 (   cfg,
  fmtobj,
  debug 
)    LcConfigLog(cfg,fmtobj,debug,__func__,0)

Definition at line 47 of file config_overload_lc.h.

◆ LcConfigLog_4

#define LcConfigLog_4 (   cfg,
  fmtobj,
  debug,
  callfunc 
)    LcConfigLog(cfg,fmtobj,debug,callfunc,0)

Definition at line 46 of file config_overload_lc.h.

◆ LcConfigRead_C

#define LcConfigRead_C (   ...)    if (MkErrorCheckI(LcConfigRead(__VA_ARGS__)))

Definition at line 51 of file config_overload_lc.h.

◆ LcConfigRead_E

#define LcConfigRead_E (   ...)    MkErrorCheck(LcConfigRead(__VA_ARGS__))

Definition at line 50 of file config_overload_lc.h.

◆ LcConfigReadFile_C

#define LcConfigReadFile_C (   ...)    if (MkErrorCheckI(LcConfigReadFile(__VA_ARGS__)))

Definition at line 53 of file config_overload_lc.h.

◆ LcConfigReadFile_E

#define LcConfigReadFile_E (   ...)    MkErrorCheck(LcConfigReadFile(__VA_ARGS__))

Definition at line 52 of file config_overload_lc.h.

◆ LcConfigReadString_C

#define LcConfigReadString_C (   ...)    if (MkErrorCheckI(LcConfigReadString(__VA_ARGS__)))

Definition at line 55 of file config_overload_lc.h.

◆ LcConfigReadString_E

#define LcConfigReadString_E (   ...)    MkErrorCheck(LcConfigReadString(__VA_ARGS__))

Definition at line 54 of file config_overload_lc.h.

◆ LcConfigWrite_C

#define LcConfigWrite_C (   ...)    if (MkErrorCheckI(LcConfigWrite(__VA_ARGS__)))

Definition at line 57 of file config_overload_lc.h.

◆ LcConfigWrite_E

#define LcConfigWrite_E (   ...)    MkErrorCheck(LcConfigWrite(__VA_ARGS__))

Definition at line 56 of file config_overload_lc.h.

◆ LcConfigWriteFile_C

#define LcConfigWriteFile_C (   ...)    if (MkErrorCheckI(LcConfigWriteFile(__VA_ARGS__)))

Definition at line 59 of file config_overload_lc.h.

◆ LcConfigWriteFile_E

#define LcConfigWriteFile_E (   ...)    MkErrorCheck(LcConfigWriteFile(__VA_ARGS__))

Definition at line 58 of file config_overload_lc.h.

◆ LcConfigWriteString

#define LcConfigWriteString (   ...)    LcConfigWriteString_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 63 of file config_overload_lc.h.

◆ LcConfigWriteString_C

#define LcConfigWriteString_C (   ...)    if (MkErrorCheckI(LcConfigWriteString(__VA_ARGS__)))

Definition at line 65 of file config_overload_lc.h.

◆ LcConfigWriteString_E

#define LcConfigWriteString_E (   ...)    MkErrorCheck(LcConfigWriteString(__VA_ARGS__))

Definition at line 64 of file config_overload_lc.h.

◆ LcConfigWriteString_e

#define LcConfigWriteString_e (   ...)    MK_EMBEDDED(MK_STRN,LcConfigWriteString,__VA_ARGS__)

Definition at line 66 of file config_overload_lc.h.

Function Documentation

◆ LcConfigClear()

mk_inline void LcConfigClear ( LC_CFG  config)
inline

Since v1.7 This function clears the configuration config

All child settings of the root setting are recursively destroyed. All other attributes of the configuration are left unchanged.

Definition at line 513 of file LcConfigC_lc.h.

◆ LcConfigClearP()

LC_EXTERN void LcConfigClearP ( LC_CFG  config)

Non-inline replacement for LcConfigClear

◆ LcConfigLog_RT()

void LcConfigLog_RT ( MK_RT const  mkrt,
LC_CFGN const  cfg,
MK_OBJN  fmtobj,
MK_DBG const  debug,
MK_STRN const  callfunc,
MK_INT const  lvl 
)
extern

log the config

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]cfgProgramming-Language-Micro-Kernel instance from config_t
[in]fmtobjmanaged object used to format the log-message (default=NULL = use default format)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]lvla user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0)

◆ LcConfigReadFile()

mk_inline enum MkErrorE LcConfigReadFile ( LC_CFG  config,
MK_STRN  filename 
)
inline

This function reads and parses a configuration from the file named filename into the configuration object config

It returns CONFIG_TRUE on success, or CONFIG_FALSE on failure; the config_error_text and config_error_line functions, described below, can be used to obtain information about the error.

Definition at line 518 of file LcConfigC_lc.h.

◆ LcConfigReadFileP()

LC_EXTERN enum MkErrorE LcConfigReadFileP ( LC_CFG  config,
MK_STRN  filename 
)

Non-inline replacement for LcConfigReadFile

◆ LcConfigReadString()

mk_inline enum MkErrorE LcConfigReadString ( LC_CFG  config,
MK_STRN  str 
)
inline

This function reads and parses a configuration from the string str into the configuration object config

It returns CONFIG_TRUE on success, or CONFIG_FALSE on failure; the config_error_text and config_error_line functions, described below, can be used to obtain information about the error.

Definition at line 527 of file LcConfigC_lc.h.

◆ LcConfigReadStringP()

LC_EXTERN enum MkErrorE LcConfigReadStringP ( LC_CFG  config,
MK_STRN  str 
)

Non-inline replacement for LcConfigReadString

◆ LcConfigRootSetting()

mk_inline LC_CFS LcConfigRootSetting ( LC_CFGN  config)
inline

This function, which is implemented as a macro, returns the root setting for the configuration config

The root setting is a group.

Definition at line 505 of file LcConfigC_lc.h.

◆ LcConfigRootSettingP()

LC_EXTERN LC_CFS LcConfigRootSettingP ( LC_CFGN  config)

Non-inline replacement for LcConfigRootSetting

◆ LcConfigWriteFile()

mk_inline enum MkErrorE LcConfigWriteFile ( LC_CFG  config,
MK_STRN  filename 
)
inline

This function writes the configuration config to the file named filename

It returns CONFIG_TRUE on success, or CONFIG_FALSE on failure.

Definition at line 536 of file LcConfigC_lc.h.

◆ LcConfigWriteFileP()

LC_EXTERN enum MkErrorE LcConfigWriteFileP ( LC_CFG  config,
MK_STRN  filename 
)

Non-inline replacement for LcConfigWriteFile

◆ LcConfigWriteString_RT()

enum MkErrorE LcConfigWriteString_RT ( MK_RT const  mkrt,
LC_CFGN const  cfg,
MK_STRN val_out 
)
extern

read the entire configuration cfg into the string val_out

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]cfgProgramming-Language-Micro-Kernel instance from config_t
[out]val_outthe entire configuration as string - value owed by cfg.WriteString() string .
Returns
set the MkErrorC to the status MK_OK, MK_CONTINUE or MK_ERROR