theConfig 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - rb - jv - cc
Loading...
Searching...
No Matches
LcSettingC_Lookup_C_API

LcSettingC - various functions to lookup a settingMore...

+ Collaboration diagram for LcSettingC_Lookup_C_API:

Functions

MK_BFL LcSettingLookupAll (LC_CFSN setting)
 addon - read an entire configuration below setting into MkBufferListC
 
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_I32 *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_I64 *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
 

LcSettingC - LcSettingC_Lookup_C_API - function

LC_EXTERN LC_CFS LcSettingLookupP (LC_CFS setting, MK_STRN path)
 Non-inline replacement for LcSettingLookup
 
LC_EXTERN enum MkErrorE LcSettingLookupBoolP (LC_CFSN setting, MK_STRN name, MK_BOOL *value_out)
 Non-inline replacement for LcSettingLookupBool
 
LC_EXTERN enum MkErrorE LcSettingLookupFloatP (LC_CFSN setting, MK_STRN name, MK_DBL *value_out)
 Non-inline replacement for LcSettingLookupFloat
 
LC_EXTERN enum MkErrorE LcSettingLookupIntP (LC_CFSN setting, MK_STRN name, MK_I32 *value_out)
 Non-inline replacement for LcSettingLookupInt
 
LC_EXTERN enum MkErrorE LcSettingLookupInt64P (LC_CFSN setting, MK_STRN name, MK_I64 *value_out)
 Non-inline replacement for LcSettingLookupInt64
 
LC_EXTERN enum MkErrorE LcSettingLookupStringP (LC_CFSN setting, MK_STRN name, MK_STRN *value_out)
 Non-inline replacement for LcSettingLookupString
 

LcSettingC - LcSettingC_Lookup_C_API - overload

#define LcSettingLookupBool_E(...)
 
#define LcSettingLookupBool_C(...)
 
#define LcSettingLookupBool_e(...)
 
#define LcSettingLookupFloat_E(...)
 
#define LcSettingLookupFloat_C(...)
 
#define LcSettingLookupFloat_e(...)
 
#define LcSettingLookupInt_E(...)
 
#define LcSettingLookupInt_C(...)
 
#define LcSettingLookupInt_e(...)
 
#define LcSettingLookupInt64_E(...)
 
#define LcSettingLookupInt64_C(...)
 
#define LcSettingLookupInt64_e(...)
 
#define LcSettingLookupString_E(...)
 
#define LcSettingLookupString_C(...)
 
#define LcSettingLookupString_e(...)
 

Detailed Description

LcSettingC - various functions to lookup a setting

Macro Definition Documentation

◆ LcSettingLookupBool_C

#define LcSettingLookupBool_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupBool(__VA_ARGS__)))
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 …

Definition at line 190 of file config_overload_lc.h.

◆ LcSettingLookupBool_E

#define LcSettingLookupBool_E ( ...)
Value:
MkErrorCheck(LcSettingLookupBool(__VA_ARGS__))

Definition at line 189 of file config_overload_lc.h.

◆ LcSettingLookupBool_e

#define LcSettingLookupBool_e ( ...)
Value:
#define MK_EMBEDDED(type, call,...)
bool MK_BOOL

Definition at line 191 of file config_overload_lc.h.

◆ LcSettingLookupFloat_C

#define LcSettingLookupFloat_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupFloat(__VA_ARGS__)))
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 …

Definition at line 193 of file config_overload_lc.h.

◆ LcSettingLookupFloat_E

#define LcSettingLookupFloat_E ( ...)
Value:
MkErrorCheck(LcSettingLookupFloat(__VA_ARGS__))

Definition at line 192 of file config_overload_lc.h.

◆ LcSettingLookupFloat_e

#define LcSettingLookupFloat_e ( ...)
Value:
double MK_DBL

Definition at line 194 of file config_overload_lc.h.

◆ LcSettingLookupInt64_C

#define LcSettingLookupInt64_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupInt64(__VA_ARGS__)))
enum MkErrorE LcSettingLookupInt64(LC_CFSN setting, MK_STRN name, MK_I64 *value_out)
These functions look up the value of the child setting named name of the setting setting …

Definition at line 199 of file config_overload_lc.h.

◆ LcSettingLookupInt64_E

#define LcSettingLookupInt64_E ( ...)
Value:
MkErrorCheck(LcSettingLookupInt64(__VA_ARGS__))

Definition at line 198 of file config_overload_lc.h.

◆ LcSettingLookupInt64_e

#define LcSettingLookupInt64_e ( ...)
Value:
signed long long MK_I64

Definition at line 200 of file config_overload_lc.h.

◆ LcSettingLookupInt_C

#define LcSettingLookupInt_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupInt(__VA_ARGS__)))
enum MkErrorE LcSettingLookupInt(LC_CFSN setting, MK_STRN name, MK_I32 *value_out)
These functions look up the value of the child setting named name of the setting setting …

Definition at line 196 of file config_overload_lc.h.

◆ LcSettingLookupInt_E

#define LcSettingLookupInt_E ( ...)
Value:
MkErrorCheck(LcSettingLookupInt(__VA_ARGS__))

Definition at line 195 of file config_overload_lc.h.

◆ LcSettingLookupInt_e

#define LcSettingLookupInt_e ( ...)
Value:
signed int MK_I32

Definition at line 197 of file config_overload_lc.h.

◆ LcSettingLookupString_C

#define LcSettingLookupString_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupString(__VA_ARGS__)))
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 …

Definition at line 202 of file config_overload_lc.h.

◆ LcSettingLookupString_E

#define LcSettingLookupString_E ( ...)
Value:
MkErrorCheck(LcSettingLookupString(__VA_ARGS__))

Definition at line 201 of file config_overload_lc.h.

◆ LcSettingLookupString_e

#define LcSettingLookupString_e ( ...)
Value:
const MK_STRB * MK_STRN

Definition at line 203 of file config_overload_lc.h.

Function Documentation

◆ LcSettingLookup()

LC_CFS LcSettingLookup ( LC_CFS setting,
MK_STRN path )
inline

This function locates a setting by a path path relative to the setting setting

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

Definition at line 237 of file LcSettingC_lc.h.

237 {
238 LC_INSTANCE_HDL(setting);
239 return LcSettingC_ObjNew(config_setting_lookup(setting->nat, path));
240 }
#define LC_INSTANCE_HDL(x)
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_setting_lookup(config_setting_t *setting, const char *path)
config_setting_t * nat
internal - link between LcSettingS and native library

◆ LcSettingLookupAll()

MK_BFL LcSettingLookupAll ( LC_CFSN setting)
extern

addon - read an entire configuration below setting into MkBufferListC

Returns
instand of MkBufferListC owned by MK_BFL LcSettingLookupAll(LC_CFSN setting)

◆ LcSettingLookupBool()

enum MkErrorE LcSettingLookupBool ( LC_CFSN setting,
MK_STRN name,
MK_BOOL * value_out )
inline

These functions look up the value of the child setting named name of the setting setting

They store the value 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 SettingLookupString 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
SettingLookupFloat, SettingLookupInt, SettingLookupInt64, SettingLookupString

Definition at line 245 of file LcSettingC_lc.h.

245 {
246 LC_INSTANCE_HDL(setting);
247 MK_I32 value_out_val = 0;
248 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_bool(setting->nat, name, &value_out_val);
249 *value_out = (MK_BOOL)(value_out_val);
250 LcErrorE_Check(setting, errVal);
251 return MK_OK;
252 error:
253 return MK_ERROR;
254 }
LcErrorE
Signals an error and is used as the return value of a function …
Definition LcEnum_lc.h:205
#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_setting_lookup_bool(const config_setting_t *setting, const char *name, int *value)

◆ LcSettingLookupBoolP()

LC_EXTERN enum MkErrorE LcSettingLookupBoolP ( LC_CFSN setting,
MK_STRN name,
MK_BOOL * value_out )

Non-inline replacement for LcSettingLookupBool

◆ LcSettingLookupFloat()

enum MkErrorE LcSettingLookupFloat ( LC_CFSN setting,
MK_STRN name,
MK_DBL * value_out )
inline

These functions look up the value of the child setting named name of the setting setting

They store the value 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 SettingLookupString 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
SettingLookupBool, SettingLookupInt, SettingLookupInt64, SettingLookupString

Definition at line 257 of file LcSettingC_lc.h.

257 {
258 LC_INSTANCE_HDL(setting);
259 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_float(setting->nat, name, value_out);
260 LcErrorE_Check(setting, errVal);
261 return MK_OK;
262 error:
263 return MK_ERROR;
264 }
LIBCONFIG_API int config_setting_lookup_float(const config_setting_t *setting, const char *name, double *value)

◆ LcSettingLookupFloatP()

LC_EXTERN enum MkErrorE LcSettingLookupFloatP ( LC_CFSN setting,
MK_STRN name,
MK_DBL * value_out )

Non-inline replacement for LcSettingLookupFloat

◆ LcSettingLookupInt()

enum MkErrorE LcSettingLookupInt ( LC_CFSN setting,
MK_STRN name,
MK_I32 * value_out )
inline

These functions look up the value of the child setting named name of the setting setting

They store the value 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 SettingLookupString 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
SettingLookupBool, SettingLookupFloat, SettingLookupInt64, SettingLookupString

Definition at line 267 of file LcSettingC_lc.h.

267 {
268 LC_INSTANCE_HDL(setting);
269 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_int(setting->nat, name, value_out);
270 LcErrorE_Check(setting, errVal);
271 return MK_OK;
272 error:
273 return MK_ERROR;
274 }
LIBCONFIG_API int config_setting_lookup_int(const config_setting_t *setting, const char *name, int *value)

◆ LcSettingLookupInt64()

enum MkErrorE LcSettingLookupInt64 ( LC_CFSN setting,
MK_STRN name,
MK_I64 * value_out )
inline

These functions look up the value of the child setting named name of the setting setting

They store the value 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 SettingLookupString 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
SettingLookupBool, SettingLookupFloat, SettingLookupInt, SettingLookupString

Definition at line 277 of file LcSettingC_lc.h.

277 {
278 LC_INSTANCE_HDL(setting);
279 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_int64(setting->nat, name, value_out);
280 LcErrorE_Check(setting, errVal);
281 return MK_OK;
282 error:
283 return MK_ERROR;
284 }
LIBCONFIG_API int config_setting_lookup_int64(const config_setting_t *setting, const char *name, long long *value)

◆ LcSettingLookupInt64P()

LC_EXTERN enum MkErrorE LcSettingLookupInt64P ( LC_CFSN setting,
MK_STRN name,
MK_I64 * value_out )

Non-inline replacement for LcSettingLookupInt64

◆ LcSettingLookupIntP()

LC_EXTERN enum MkErrorE LcSettingLookupIntP ( LC_CFSN setting,
MK_STRN name,
MK_I32 * value_out )

Non-inline replacement for LcSettingLookupInt

◆ LcSettingLookupP()

LC_EXTERN LC_CFS LcSettingLookupP ( LC_CFS setting,
MK_STRN path )

Non-inline replacement for LcSettingLookup

◆ LcSettingLookupString()

enum MkErrorE LcSettingLookupString ( LC_CFSN setting,
MK_STRN name,
MK_STRN * value_out )
inline

These functions look up the value of the child setting named name of the setting setting

They store the value 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 SettingLookupString 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
SettingLookupBool, SettingLookupFloat, SettingLookupInt, SettingLookupInt64

Definition at line 287 of file LcSettingC_lc.h.

287 {
288 LC_INSTANCE_HDL(setting);
289 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_string(setting->nat, name, value_out);
290 LcErrorE_Check(setting, errVal);
291 return MK_OK;
292 error:
293 return MK_ERROR;
294 }
LIBCONFIG_API int config_setting_lookup_string(const config_setting_t *setting, const char *name, const char **value)

◆ LcSettingLookupStringP()

LC_EXTERN enum MkErrorE LcSettingLookupStringP ( LC_CFSN setting,
MK_STRN name,
MK_STRN * value_out )

Non-inline replacement for LcSettingLookupString