theConfig 10.0
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
 
static LC_CFS LcSettingLookup (LC_CFS setting, MK_STRN path)
 This function locates a setting by a path path relative to the setting setting
 
static 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
 
static 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
 
static 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
 
static 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
 
static 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_CFS LcSettingLookupP (LC_CFS setting, MK_STRN path)
 Non-inline replacement for LcSettingLookup
 
enum MkErrorE LcSettingLookupBoolP (LC_CFSN setting, MK_STRN name, MK_BOOL *value_out)
 Non-inline replacement for LcSettingLookupBool
 
enum MkErrorE LcSettingLookupFloatP (LC_CFSN setting, MK_STRN name, MK_DBL *value_out)
 Non-inline replacement for LcSettingLookupFloat
 
enum MkErrorE LcSettingLookupIntP (LC_CFSN setting, MK_STRN name, MK_I32 *value_out)
 Non-inline replacement for LcSettingLookupInt
 
enum MkErrorE LcSettingLookupInt64P (LC_CFSN setting, MK_STRN name, MK_I64 *value_out)
 Non-inline replacement for LcSettingLookupInt64
 
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__)))
static 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 187 of file config_overload_lc.h.

◆ LcSettingLookupBool_E

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

Definition at line 186 of file config_overload_lc.h.

◆ LcSettingLookupBool_e

#define LcSettingLookupBool_e ( ...)
Value:
MK_EMBEDDED(MK_BOOL,LcSettingLookupBool,__VA_ARGS__)
bool MK_BOOL

Definition at line 188 of file config_overload_lc.h.

◆ LcSettingLookupFloat_C

#define LcSettingLookupFloat_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupFloat(__VA_ARGS__)))
static 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 190 of file config_overload_lc.h.

◆ LcSettingLookupFloat_E

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

Definition at line 189 of file config_overload_lc.h.

◆ LcSettingLookupFloat_e

#define LcSettingLookupFloat_e ( ...)
Value:
MK_EMBEDDED(MK_DBL,LcSettingLookupFloat,__VA_ARGS__)
double MK_DBL

Definition at line 191 of file config_overload_lc.h.

◆ LcSettingLookupInt64_C

#define LcSettingLookupInt64_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupInt64(__VA_ARGS__)))
static 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 196 of file config_overload_lc.h.

◆ LcSettingLookupInt64_E

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

Definition at line 195 of file config_overload_lc.h.

◆ LcSettingLookupInt64_e

#define LcSettingLookupInt64_e ( ...)
Value:
MK_EMBEDDED(MK_I64,LcSettingLookupInt64,__VA_ARGS__)
signed long long MK_I64

Definition at line 197 of file config_overload_lc.h.

◆ LcSettingLookupInt_C

#define LcSettingLookupInt_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupInt(__VA_ARGS__)))
static 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 193 of file config_overload_lc.h.

◆ LcSettingLookupInt_E

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

Definition at line 192 of file config_overload_lc.h.

◆ LcSettingLookupInt_e

#define LcSettingLookupInt_e ( ...)
Value:
MK_EMBEDDED(MK_I32,LcSettingLookupInt,__VA_ARGS__)
signed int MK_I32

Definition at line 194 of file config_overload_lc.h.

◆ LcSettingLookupString_C

#define LcSettingLookupString_C ( ...)
Value:
if (MkErrorCheckI(LcSettingLookupString(__VA_ARGS__)))
static 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 199 of file config_overload_lc.h.

◆ LcSettingLookupString_E

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

Definition at line 198 of file config_overload_lc.h.

◆ LcSettingLookupString_e

#define LcSettingLookupString_e ( ...)
Value:
MK_EMBEDDED(MK_STRN,LcSettingLookupString,__VA_ARGS__)
const MK_STRB * MK_STRN

Definition at line 200 of file config_overload_lc.h.

Function Documentation

◆ LcSettingLookup()

static LC_CFS LcSettingLookup ( LC_CFS setting,
MK_STRN path )
inlinestatic

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 220 of file LcSettingC_lc.h.

220 {
221 LC_INSTANCE_HDL(setting);
222 return LcSettingC_ObjNew(config_setting_lookup(setting->nat, path));
223 }
#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_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)

addon - read an entire configuration below setting into MkBufferListC

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

◆ LcSettingLookupBool()

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

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 228 of file LcSettingC_lc.h.

228 {
229 LC_INSTANCE_HDL(setting);
230 MK_I32 value_out_val = 0;
231 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_bool(setting->nat, name, &value_out_val);
232 *value_out = (MK_BOOL)(value_out_val);
233 LcErrorE_Check(setting, errVal);
234 return MK_OK;
235 error:
236 return MK_ERROR;
237 }
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_setting_lookup_bool(const config_setting_t *setting, const char *name, int *value)

◆ LcSettingLookupBoolP()

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

Non-inline replacement for LcSettingLookupBool

◆ LcSettingLookupFloat()

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

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 240 of file LcSettingC_lc.h.

240 {
241 LC_INSTANCE_HDL(setting);
242 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_float(setting->nat, name, value_out);
243 LcErrorE_Check(setting, errVal);
244 return MK_OK;
245 error:
246 return MK_ERROR;
247 }
LIBCONFIG_API int config_setting_lookup_float(const config_setting_t *setting, const char *name, double *value)

◆ LcSettingLookupFloatP()

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

Non-inline replacement for LcSettingLookupFloat

◆ LcSettingLookupInt()

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

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 250 of file LcSettingC_lc.h.

250 {
251 LC_INSTANCE_HDL(setting);
252 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_int(setting->nat, name, value_out);
253 LcErrorE_Check(setting, errVal);
254 return MK_OK;
255 error:
256 return MK_ERROR;
257 }
LIBCONFIG_API int config_setting_lookup_int(const config_setting_t *setting, const char *name, int *value)

◆ LcSettingLookupInt64()

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

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 260 of file LcSettingC_lc.h.

260 {
261 LC_INSTANCE_HDL(setting);
262 enum LcErrorE errVal = (enum LcErrorE)config_setting_lookup_int64(setting->nat, name, value_out);
263 LcErrorE_Check(setting, errVal);
264 return MK_OK;
265 error:
266 return MK_ERROR;
267 }
LIBCONFIG_API int config_setting_lookup_int64(const config_setting_t *setting, const char *name, long long *value)

◆ LcSettingLookupInt64P()

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

Non-inline replacement for LcSettingLookupInt64

◆ LcSettingLookupIntP()

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

Non-inline replacement for LcSettingLookupInt

◆ LcSettingLookupP()

LC_CFS LcSettingLookupP ( LC_CFS setting,
MK_STRN path )

Non-inline replacement for LcSettingLookup

◆ LcSettingLookupString()

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

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 270 of file LcSettingC_lc.h.

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

◆ LcSettingLookupStringP()

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

Non-inline replacement for LcSettingLookupString