theConfig 10.0
Loading...
Searching...
No Matches
LcConfigC_Lookup_C_API

LcConfigC - various functions to lookup config-dataMore...

+ Collaboration diagram for LcConfigC_Lookup_C_API:

Functions

static LC_CFS LcConfigLookup (LC_CFGN config, MK_STRN path)
 This function locates the setting in the configuration config specified by the path path
 
static enum MkErrorE LcConfigLookupBool (LC_CFGN config, MK_STRN path, MK_BOOL *value_out)
 These functions look up the value of the setting in the configuration config specified by the path path
 
static enum MkErrorE LcConfigLookupFloat (LC_CFGN config, MK_STRN path, MK_DBL *value_out)
 These functions look up the value of the setting in the configuration config specified by the path path
 
static enum MkErrorE LcConfigLookupInt (LC_CFGN config, MK_STRN path, MK_I32 *value_out)
 These functions look up the value of the setting in the configuration config specified by the path path
 
static enum MkErrorE LcConfigLookupInt64 (LC_CFGN config, MK_STRN path, MK_I64 *value_out)
 These functions look up the value of the setting in the configuration config specified by the path path
 
static enum MkErrorE LcConfigLookupString (LC_CFGN config, MK_STRN path, MK_STRN *value_out)
 These functions look up the value of the setting in the configuration config specified by the path path
 

LcConfigC - LcConfigC_Lookup_C_API - function

LC_CFS LcConfigLookupP (LC_CFGN config, MK_STRN path)
 Non-inline replacement for LcConfigLookup
 
enum MkErrorE LcConfigLookupBoolP (LC_CFGN config, MK_STRN path, MK_BOOL *value_out)
 Non-inline replacement for LcConfigLookupBool
 
enum MkErrorE LcConfigLookupFloatP (LC_CFGN config, MK_STRN path, MK_DBL *value_out)
 Non-inline replacement for LcConfigLookupFloat
 
enum MkErrorE LcConfigLookupIntP (LC_CFGN config, MK_STRN path, MK_I32 *value_out)
 Non-inline replacement for LcConfigLookupInt
 
enum MkErrorE LcConfigLookupInt64P (LC_CFGN config, MK_STRN path, MK_I64 *value_out)
 Non-inline replacement for LcConfigLookupInt64
 
enum MkErrorE LcConfigLookupStringP (LC_CFGN config, MK_STRN path, MK_STRN *value_out)
 Non-inline replacement for LcConfigLookupString
 

LcConfigC - LcConfigC_Lookup_C_API - overload

#define LcConfigLookupBool_E(...)
 
#define LcConfigLookupBool_C(...)
 
#define LcConfigLookupBool_e(...)
 
#define LcConfigLookupFloat_E(...)
 
#define LcConfigLookupFloat_C(...)
 
#define LcConfigLookupFloat_e(...)
 
#define LcConfigLookupInt_E(...)
 
#define LcConfigLookupInt_C(...)
 
#define LcConfigLookupInt_e(...)
 
#define LcConfigLookupInt64_E(...)
 
#define LcConfigLookupInt64_C(...)
 
#define LcConfigLookupInt64_e(...)
 
#define LcConfigLookupString_E(...)
 
#define LcConfigLookupString_C(...)
 
#define LcConfigLookupString_e(...)
 

Detailed Description

LcConfigC - various functions to lookup config-data

Macro Definition Documentation

◆ LcConfigLookupBool_C

#define LcConfigLookupBool_C ( ...)
Value:
if (MkErrorCheckI(LcConfigLookupBool(__VA_ARGS__)))
static enum MkErrorE LcConfigLookupBool(LC_CFGN config, MK_STRN path, MK_BOOL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...

Definition at line 75 of file config_overload_lc.h.

◆ LcConfigLookupBool_E

#define LcConfigLookupBool_E ( ...)
Value:
MkErrorCheck(LcConfigLookupBool(__VA_ARGS__))

Definition at line 74 of file config_overload_lc.h.

◆ LcConfigLookupBool_e

#define LcConfigLookupBool_e ( ...)
Value:
MK_EMBEDDED(MK_BOOL,LcConfigLookupBool,__VA_ARGS__)
bool MK_BOOL

Definition at line 76 of file config_overload_lc.h.

◆ LcConfigLookupFloat_C

#define LcConfigLookupFloat_C ( ...)
Value:
if (MkErrorCheckI(LcConfigLookupFloat(__VA_ARGS__)))
static enum MkErrorE LcConfigLookupFloat(LC_CFGN config, MK_STRN path, MK_DBL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...

Definition at line 78 of file config_overload_lc.h.

◆ LcConfigLookupFloat_E

#define LcConfigLookupFloat_E ( ...)
Value:
MkErrorCheck(LcConfigLookupFloat(__VA_ARGS__))

Definition at line 77 of file config_overload_lc.h.

◆ LcConfigLookupFloat_e

#define LcConfigLookupFloat_e ( ...)
Value:
MK_EMBEDDED(MK_DBL,LcConfigLookupFloat,__VA_ARGS__)
double MK_DBL

Definition at line 79 of file config_overload_lc.h.

◆ LcConfigLookupInt64_C

#define LcConfigLookupInt64_C ( ...)
Value:
if (MkErrorCheckI(LcConfigLookupInt64(__VA_ARGS__)))
static enum MkErrorE LcConfigLookupInt64(LC_CFGN config, MK_STRN path, MK_I64 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...

Definition at line 84 of file config_overload_lc.h.

◆ LcConfigLookupInt64_E

#define LcConfigLookupInt64_E ( ...)
Value:
MkErrorCheck(LcConfigLookupInt64(__VA_ARGS__))

Definition at line 83 of file config_overload_lc.h.

◆ LcConfigLookupInt64_e

#define LcConfigLookupInt64_e ( ...)
Value:
MK_EMBEDDED(MK_I64,LcConfigLookupInt64,__VA_ARGS__)
signed long long MK_I64

Definition at line 85 of file config_overload_lc.h.

◆ LcConfigLookupInt_C

#define LcConfigLookupInt_C ( ...)
Value:
if (MkErrorCheckI(LcConfigLookupInt(__VA_ARGS__)))
static enum MkErrorE LcConfigLookupInt(LC_CFGN config, MK_STRN path, MK_I32 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...

Definition at line 81 of file config_overload_lc.h.

◆ LcConfigLookupInt_E

#define LcConfigLookupInt_E ( ...)
Value:
MkErrorCheck(LcConfigLookupInt(__VA_ARGS__))

Definition at line 80 of file config_overload_lc.h.

◆ LcConfigLookupInt_e

#define LcConfigLookupInt_e ( ...)
Value:
MK_EMBEDDED(MK_I32,LcConfigLookupInt,__VA_ARGS__)
signed int MK_I32

Definition at line 82 of file config_overload_lc.h.

◆ LcConfigLookupString_C

#define LcConfigLookupString_C ( ...)
Value:
if (MkErrorCheckI(LcConfigLookupString(__VA_ARGS__)))
static enum MkErrorE LcConfigLookupString(LC_CFGN config, MK_STRN path, MK_STRN *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...

Definition at line 87 of file config_overload_lc.h.

◆ LcConfigLookupString_E

#define LcConfigLookupString_E ( ...)
Value:
MkErrorCheck(LcConfigLookupString(__VA_ARGS__))

Definition at line 86 of file config_overload_lc.h.

◆ LcConfigLookupString_e

#define LcConfigLookupString_e ( ...)
Value:
MK_EMBEDDED(MK_STRN,LcConfigLookupString,__VA_ARGS__)
const MK_STRB * MK_STRN

Definition at line 88 of file config_overload_lc.h.

Function Documentation

◆ LcConfigLookup()

static LC_CFS LcConfigLookup ( LC_CFGN config,
MK_STRN path )
inlinestatic

This function locates the setting in the configuration config specified by the path path

It returns a pointer to the LcSettingC structure on success, or NULL if the setting was not found.

Definition at line 259 of file LcConfigC_lc.h.

259 {
260 LC_INSTANCE_HDL(config);
261 return LcSettingC_ObjNew(config_lookup(config->nat, path));
262 }
#define LC_INSTANCE_HDL(x)
static MK_ARTIFICIAL LC_CFS LcSettingC_ObjNew(config_setting_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
LIBCONFIG_API config_setting_t * config_lookup(const config_t *config, const char *path)
config_t * nat
internal - link between LcConfigS and native library

◆ LcConfigLookupBool()

static enum MkErrorE LcConfigLookupBool ( LC_CFGN config,
MK_STRN path,
MK_BOOL * value_out )
inlinestatic

These functions look up the value of the setting in the configuration config specified by the path path

They store the value of the setting at value and return CONFIG_TRUE on success. If the setting was not found or if the type of the value did not match the type requested, they leave the data pointed to by value unmodified and return CONFIG_FALSE.

Storage for the string returned by ConfigLookupString is managed by the library and released automatically when the setting is destroyed or when the setting's value is changed; the string must not be freed by the caller.

See also
ConfigLookupFloat, ConfigLookupInt, ConfigLookupInt64, ConfigLookupString

Definition at line 267 of file LcConfigC_lc.h.

267 {
268 LC_INSTANCE_HDL(config);
269 MK_I32 value_out_val = 0;
270 enum LcErrorE errVal = (enum LcErrorE)config_lookup_bool(config->nat, path, &value_out_val);
271 *value_out = (MK_BOOL)(value_out_val);
272 LcErrorE_Check(config, errVal);
273 return MK_OK;
274 error:
275 return MK_ERROR;
276 }
LcErrorE
Signals an error and is used as the return value of a function …
Definition LcEnum_lc.h:188
#define LcErrorE_Check(lc_hdl, PROC)
check on a liblcconfig error and convert into a liblcconfig error …
MK_ERROR
MK_OK
LIBCONFIG_API int config_lookup_bool(const config_t *config, const char *path, int *value)

◆ LcConfigLookupBoolP()

enum MkErrorE LcConfigLookupBoolP ( LC_CFGN config,
MK_STRN path,
MK_BOOL * value_out )

Non-inline replacement for LcConfigLookupBool

◆ LcConfigLookupFloat()

static enum MkErrorE LcConfigLookupFloat ( LC_CFGN config,
MK_STRN path,
MK_DBL * value_out )
inlinestatic

These functions look up the value of the setting in the configuration config specified by the path path

They store the value of the setting at value and return CONFIG_TRUE on success. If the setting was not found or if the type of the value did not match the type requested, they leave the data pointed to by value unmodified and return CONFIG_FALSE.

Storage for the string returned by ConfigLookupString is managed by the library and released automatically when the setting is destroyed or when the setting's value is changed; the string must not be freed by the caller.

See also
ConfigLookupBool, ConfigLookupInt, ConfigLookupInt64, ConfigLookupString

Definition at line 279 of file LcConfigC_lc.h.

279 {
280 LC_INSTANCE_HDL(config);
281 enum LcErrorE errVal = (enum LcErrorE)config_lookup_float(config->nat, path, value_out);
282 LcErrorE_Check(config, errVal);
283 return MK_OK;
284 error:
285 return MK_ERROR;
286 }
LIBCONFIG_API int config_lookup_float(const config_t *config, const char *path, double *value)

◆ LcConfigLookupFloatP()

enum MkErrorE LcConfigLookupFloatP ( LC_CFGN config,
MK_STRN path,
MK_DBL * value_out )

Non-inline replacement for LcConfigLookupFloat

◆ LcConfigLookupInt()

static enum MkErrorE LcConfigLookupInt ( LC_CFGN config,
MK_STRN path,
MK_I32 * value_out )
inlinestatic

These functions look up the value of the setting in the configuration config specified by the path path

They store the value of the setting at value and return CONFIG_TRUE on success. If the setting was not found or if the type of the value did not match the type requested, they leave the data pointed to by value unmodified and return CONFIG_FALSE.

Storage for the string returned by ConfigLookupString is managed by the library and released automatically when the setting is destroyed or when the setting's value is changed; the string must not be freed by the caller.

See also
ConfigLookupBool, ConfigLookupFloat, ConfigLookupInt64, ConfigLookupString

Definition at line 289 of file LcConfigC_lc.h.

289 {
290 LC_INSTANCE_HDL(config);
291 enum LcErrorE errVal = (enum LcErrorE)config_lookup_int(config->nat, path, value_out);
292 LcErrorE_Check(config, errVal);
293 return MK_OK;
294 error:
295 return MK_ERROR;
296 }
LIBCONFIG_API int config_lookup_int(const config_t *config, const char *path, int *value)

◆ LcConfigLookupInt64()

static enum MkErrorE LcConfigLookupInt64 ( LC_CFGN config,
MK_STRN path,
MK_I64 * value_out )
inlinestatic

These functions look up the value of the setting in the configuration config specified by the path path

They store the value of the setting at value and return CONFIG_TRUE on success. If the setting was not found or if the type of the value did not match the type requested, they leave the data pointed to by value unmodified and return CONFIG_FALSE.

Storage for the string returned by ConfigLookupString is managed by the library and released automatically when the setting is destroyed or when the setting's value is changed; the string must not be freed by the caller.

See also
ConfigLookupBool, ConfigLookupFloat, ConfigLookupInt, ConfigLookupString

Definition at line 299 of file LcConfigC_lc.h.

299 {
300 LC_INSTANCE_HDL(config);
301 enum LcErrorE errVal = (enum LcErrorE)config_lookup_int64(config->nat, path, value_out);
302 LcErrorE_Check(config, errVal);
303 return MK_OK;
304 error:
305 return MK_ERROR;
306 }
LIBCONFIG_API int config_lookup_int64(const config_t *config, const char *path, long long *value)

◆ LcConfigLookupInt64P()

enum MkErrorE LcConfigLookupInt64P ( LC_CFGN config,
MK_STRN path,
MK_I64 * value_out )

Non-inline replacement for LcConfigLookupInt64

◆ LcConfigLookupIntP()

enum MkErrorE LcConfigLookupIntP ( LC_CFGN config,
MK_STRN path,
MK_I32 * value_out )

Non-inline replacement for LcConfigLookupInt

◆ LcConfigLookupP()

LC_CFS LcConfigLookupP ( LC_CFGN config,
MK_STRN path )

Non-inline replacement for LcConfigLookup

◆ LcConfigLookupString()

static enum MkErrorE LcConfigLookupString ( LC_CFGN config,
MK_STRN path,
MK_STRN * value_out )
inlinestatic

These functions look up the value of the setting in the configuration config specified by the path path

They store the value of the setting at value and return CONFIG_TRUE on success. If the setting was not found or if the type of the value did not match the type requested, they leave the data pointed to by value unmodified and return CONFIG_FALSE.

Storage for the string returned by ConfigLookupString is managed by the library and released automatically when the setting is destroyed or when the setting's value is changed; the string must not be freed by the caller.

See also
ConfigLookupBool, ConfigLookupFloat, ConfigLookupInt, ConfigLookupInt64

Definition at line 309 of file LcConfigC_lc.h.

309 {
310 LC_INSTANCE_HDL(config);
311 enum LcErrorE errVal = (enum LcErrorE)config_lookup_string(config->nat, path, value_out);
312 LcErrorE_Check(config, errVal);
313 return MK_OK;
314 error:
315 return MK_ERROR;
316 }
LIBCONFIG_API int config_lookup_string(const config_t *config, const char *path, const char **value)

◆ LcConfigLookupStringP()

enum MkErrorE LcConfigLookupStringP ( LC_CFGN config,
MK_STRN path,
MK_STRN * value_out )

Non-inline replacement for LcConfigLookupString