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

LcSettingC - various functions to get data from a settingMore...

+ Collaboration diagram for LcSettingC_Get_C_API:

Functions

LC_CFS LcSettingGetElem (LC_CFSN setting, MK_I32 idx)
 This function fetches the element at the given index index in the setting setting, which must be an array, list, or group …
 
LC_CFS LcSettingGetMember (LC_CFSN setting, MK_STRN name)
 This function fetches the child setting named name from the group setting
 
MK_BOOL LcSettingGetBool (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_BOOL LcSettingGetBoolElem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
MK_DBL LcSettingGetFloat (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_DBL LcSettingGetFloatElem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
enum LcConfigFormatE LcSettingGetFormat (LC_CFSN setting)
 These functions get and set the external format for the setting setting
 
MK_PTR LcSettingGetHookHide (LC_CFSN setting)
 These functions make it possible to attach arbitrary data to each setting structure, for instance a ''wrapper'' or ''peer'' object written in another programming language …
 
MK_I32 LcSettingGetInt (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_I64 LcSettingGetInt64 (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_I64 LcSettingGetInt64Elem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
MK_I32 LcSettingGetIntElem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
MK_STRN LcSettingGetString (LC_CFSN setting)
 These functions return the value of the given setting
 
MK_STRN LcSettingGetStringElem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
LC_CFG LcSettingGetConfig (LC_CFSN setting)
 addon - return the LcConfigC from the LcSettingC
 

LcSettingC - LcSettingC_Get_C_API - function

LC_EXTERN LC_CFS LcSettingGetElemP (LC_CFSN setting, MK_I32 idx)
 Non-inline replacement for LcSettingGetElem
 
LC_EXTERN LC_CFS LcSettingGetMemberP (LC_CFSN setting, MK_STRN name)
 Non-inline replacement for LcSettingGetMember
 
LC_EXTERN MK_BOOL LcSettingGetBoolP (LC_CFSN setting)
 Non-inline replacement for LcSettingGetBool
 
LC_EXTERN MK_BOOL LcSettingGetBoolElemP (LC_CFSN setting, MK_I32 idx)
 Non-inline replacement for LcSettingGetBoolElem
 
LC_EXTERN MK_DBL LcSettingGetFloatP (LC_CFSN setting)
 Non-inline replacement for LcSettingGetFloat
 
LC_EXTERN MK_DBL LcSettingGetFloatElemP (LC_CFSN setting, MK_I32 idx)
 Non-inline replacement for LcSettingGetFloatElem
 
LC_EXTERN enum LcConfigFormatE LcSettingGetFormatP (LC_CFSN setting)
 Non-inline replacement for LcSettingGetFormat
 
LC_EXTERN MK_PTR LcSettingGetHookHideP (LC_CFSN setting)
 Non-inline replacement for LcSettingGetHookHide
 
LC_EXTERN MK_I32 LcSettingGetIntP (LC_CFSN setting)
 Non-inline replacement for LcSettingGetInt
 
LC_EXTERN MK_I64 LcSettingGetInt64P (LC_CFSN setting)
 Non-inline replacement for LcSettingGetInt64
 
LC_EXTERN MK_I64 LcSettingGetInt64ElemP (LC_CFSN setting, MK_I32 idx)
 Non-inline replacement for LcSettingGetInt64Elem
 
LC_EXTERN MK_I32 LcSettingGetIntElemP (LC_CFSN setting, MK_I32 idx)
 Non-inline replacement for LcSettingGetIntElem
 
LC_EXTERN MK_STRN LcSettingGetStringP (LC_CFSN setting)
 Non-inline replacement for LcSettingGetString
 
LC_EXTERN MK_STRN LcSettingGetStringElemP (LC_CFSN setting, MK_I32 idx)
 Non-inline replacement for LcSettingGetStringElem
 

Detailed Description

LcSettingC - various functions to get data from a setting

Function Documentation

◆ LcSettingGetBool()

MK_BOOL LcSettingGetBool ( LC_CFSN setting)
inline

These functions return the value of the given setting

If the type of the setting does not match the type requested, a 0 or NULL value is returned. Storage for the string returned by SettingGetString 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
SettingGetFloat, SettingGetInt, SettingGetInt64, SettingGetString

Definition at line 111 of file LcSettingC_lc.h.

111 {
112 LC_INSTANCE_HDL(setting);
113 return (MK_BOOL)config_setting_get_bool(setting->nat);
114 }
#define LC_INSTANCE_HDL(x)
bool MK_BOOL
LIBCONFIG_API int config_setting_get_bool(const config_setting_t *setting)
config_setting_t * nat
internal - link between LcSettingS and native library

◆ LcSettingGetBoolElem()

MK_BOOL LcSettingGetBoolElem ( LC_CFSN setting,
MK_I32 idx )
inline

These functions return the value at the specified index index in the setting setting

If the setting is not an array or list, or if the type of the element does not match the type requested, or if index is out of range, they return 0 or NULL. Storage for the string returned by SettingGetStringElem is managed by the library and released automatically when the setting is destroyed or when its value is changed; the string must not be freed by the caller.

See also
SettingGetFloatElem, SettingGetInt64Elem, SettingGetIntElem, SettingGetStringElem

Definition at line 117 of file LcSettingC_lc.h.

117 {
118 LC_INSTANCE_HDL(setting);
119 return (MK_BOOL)config_setting_get_bool_elem(setting->nat, idx);
120 }
LIBCONFIG_API int config_setting_get_bool_elem(const config_setting_t *setting, int idx)

◆ LcSettingGetBoolElemP()

LC_EXTERN MK_BOOL LcSettingGetBoolElemP ( LC_CFSN setting,
MK_I32 idx )

Non-inline replacement for LcSettingGetBoolElem

◆ LcSettingGetBoolP()

LC_EXTERN MK_BOOL LcSettingGetBoolP ( LC_CFSN setting)

Non-inline replacement for LcSettingGetBool

◆ LcSettingGetConfig()

LC_CFG LcSettingGetConfig ( LC_CFSN setting)
inline

addon - return the LcConfigC from the LcSettingC

Definition at line 507 of file LcSettingC_lc.h.

507 {
508 return LcConfigC_ObjNew(setting->nat->config);
509}
MK_ARTIFICIAL LC_CFG LcConfigC_ObjNew(config_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
struct config_t * config

◆ LcSettingGetElem()

LC_CFS LcSettingGetElem ( LC_CFSN setting,
MK_I32 idx )
inline

This function fetches the element at the given index index in the setting setting, which must be an array, list, or group …

It returns the requested setting on success, or NULL if index is out of range or if setting is not an array, list, or group.

Definition at line 97 of file LcSettingC_lc.h.

97 {
98 LC_INSTANCE_HDL(setting);
100 }
MK_ARTIFICIAL LC_CFS LcSettingC_ObjNew(config_setting_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
unsigned int MK_U32
LIBCONFIG_API config_setting_t * config_setting_get_elem(const config_setting_t *setting, unsigned int idx)

◆ LcSettingGetElemP()

LC_EXTERN LC_CFS LcSettingGetElemP ( LC_CFSN setting,
MK_I32 idx )

Non-inline replacement for LcSettingGetElem

◆ LcSettingGetFloat()

MK_DBL LcSettingGetFloat ( LC_CFSN setting)
inline

These functions return the value of the given setting

If the type of the setting does not match the type requested, a 0 or NULL value is returned. Storage for the string returned by SettingGetString 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
SettingGetBool, SettingGetInt, SettingGetInt64, SettingGetString

Definition at line 123 of file LcSettingC_lc.h.

123 {
124 LC_INSTANCE_HDL(setting);
125 return config_setting_get_float(setting->nat);
126 }
LIBCONFIG_API double config_setting_get_float(const config_setting_t *setting)

◆ LcSettingGetFloatElem()

MK_DBL LcSettingGetFloatElem ( LC_CFSN setting,
MK_I32 idx )
inline

These functions return the value at the specified index index in the setting setting

If the setting is not an array or list, or if the type of the element does not match the type requested, or if index is out of range, they return 0 or NULL. Storage for the string returned by SettingGetStringElem is managed by the library and released automatically when the setting is destroyed or when its value is changed; the string must not be freed by the caller.

See also
SettingGetBoolElem, SettingGetInt64Elem, SettingGetIntElem, SettingGetStringElem

Definition at line 129 of file LcSettingC_lc.h.

129 {
130 LC_INSTANCE_HDL(setting);
131 return config_setting_get_float_elem(setting->nat, idx);
132 }
LIBCONFIG_API double config_setting_get_float_elem(const config_setting_t *setting, int idx)

◆ LcSettingGetFloatElemP()

LC_EXTERN MK_DBL LcSettingGetFloatElemP ( LC_CFSN setting,
MK_I32 idx )

Non-inline replacement for LcSettingGetFloatElem

◆ LcSettingGetFloatP()

LC_EXTERN MK_DBL LcSettingGetFloatP ( LC_CFSN setting)

Non-inline replacement for LcSettingGetFloat

◆ LcSettingGetFormat()

enum LcConfigFormatE LcSettingGetFormat ( LC_CFSN setting)
inline

These functions get and set the external format for the setting setting

The format must be one of the constants CONFIG_FORMAT_DEFAULT or CONFIG_FORMAT_HEX. All settings support the CONFIG_FORMAT_DEFAULT format. The CONFIG_FORMAT_HEX format specifies hexadecimal formatting for integer values, and hence only applies to settings of type CONFIG_TYPE_INT and CONFIG_TYPE_INT64. If format is invalid for the given setting, it is ignored.

If a non-default format has not been set for the setting, SettingGetFormat returns the default format for the configuration, as set by ConfigSetDefaultFormat.

SettingSetFormat returns CONFIG_TRUE on success and CONFIG_FALSE on failure.

See also
SettingSetFormat

Definition at line 135 of file LcSettingC_lc.h.

135 {
136 LC_INSTANCE_HDL(setting);
137 return (enum LcConfigFormatE)config_setting_get_format(setting->nat);
138 }
LcConfigFormatE
set the format of a LcSettingC …
Definition LcEnum_lc.h:47
LIBCONFIG_API short config_setting_get_format(const config_setting_t *setting)

◆ LcSettingGetFormatP()

LC_EXTERN enum LcConfigFormatE LcSettingGetFormatP ( LC_CFSN setting)

Non-inline replacement for LcSettingGetFormat

◆ LcSettingGetHookHide()

MK_PTR LcSettingGetHookHide ( LC_CFSN setting)
inline

These functions make it possible to attach arbitrary data to each setting structure, for instance a ''wrapper'' or ''peer'' object written in another programming language …

The destructor function, if one has been supplied via a call to config_set_destructor, will be called by the library to dispose of this data when the setting itself is destroyed. There is no default destructor.

See also
config_setting_set_hook

Definition at line 141 of file LcSettingC_lc.h.

141 {
142 LC_INSTANCE_HDL(setting);
143 return (MK_PTR)config_setting_get_hook(setting->nat);
144 }
MK_PTRB * MK_PTR
#define config_setting_get_hook(S)

◆ LcSettingGetHookHideP()

LC_EXTERN MK_PTR LcSettingGetHookHideP ( LC_CFSN setting)

Non-inline replacement for LcSettingGetHookHide

◆ LcSettingGetInt()

MK_I32 LcSettingGetInt ( LC_CFSN setting)
inline

These functions return the value of the given setting

If the type of the setting does not match the type requested, a 0 or NULL value is returned. Storage for the string returned by SettingGetString 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
SettingGetBool, SettingGetFloat, SettingGetInt64, SettingGetString

Definition at line 147 of file LcSettingC_lc.h.

147 {
148 LC_INSTANCE_HDL(setting);
149 return config_setting_get_int(setting->nat);
150 }
LIBCONFIG_API int config_setting_get_int(const config_setting_t *setting)

◆ LcSettingGetInt64()

MK_I64 LcSettingGetInt64 ( LC_CFSN setting)
inline

These functions return the value of the given setting

If the type of the setting does not match the type requested, a 0 or NULL value is returned. Storage for the string returned by SettingGetString 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
SettingGetBool, SettingGetFloat, SettingGetInt, SettingGetString

Definition at line 153 of file LcSettingC_lc.h.

153 {
154 LC_INSTANCE_HDL(setting);
155 return config_setting_get_int64(setting->nat);
156 }
LIBCONFIG_API long long config_setting_get_int64(const config_setting_t *setting)

◆ LcSettingGetInt64Elem()

MK_I64 LcSettingGetInt64Elem ( LC_CFSN setting,
MK_I32 idx )
inline

These functions return the value at the specified index index in the setting setting

If the setting is not an array or list, or if the type of the element does not match the type requested, or if index is out of range, they return 0 or NULL. Storage for the string returned by SettingGetStringElem is managed by the library and released automatically when the setting is destroyed or when its value is changed; the string must not be freed by the caller.

See also
SettingGetBoolElem, SettingGetFloatElem, SettingGetIntElem, SettingGetStringElem

Definition at line 159 of file LcSettingC_lc.h.

159 {
160 LC_INSTANCE_HDL(setting);
161 return config_setting_get_int64_elem(setting->nat, idx);
162 }
LIBCONFIG_API long long config_setting_get_int64_elem(const config_setting_t *setting, int idx)

◆ LcSettingGetInt64ElemP()

LC_EXTERN MK_I64 LcSettingGetInt64ElemP ( LC_CFSN setting,
MK_I32 idx )

Non-inline replacement for LcSettingGetInt64Elem

◆ LcSettingGetInt64P()

LC_EXTERN MK_I64 LcSettingGetInt64P ( LC_CFSN setting)

Non-inline replacement for LcSettingGetInt64

◆ LcSettingGetIntElem()

MK_I32 LcSettingGetIntElem ( LC_CFSN setting,
MK_I32 idx )
inline

These functions return the value at the specified index index in the setting setting

If the setting is not an array or list, or if the type of the element does not match the type requested, or if index is out of range, they return 0 or NULL. Storage for the string returned by SettingGetStringElem is managed by the library and released automatically when the setting is destroyed or when its value is changed; the string must not be freed by the caller.

See also
SettingGetBoolElem, SettingGetFloatElem, SettingGetInt64Elem, SettingGetStringElem

Definition at line 165 of file LcSettingC_lc.h.

165 {
166 LC_INSTANCE_HDL(setting);
167 return config_setting_get_int_elem(setting->nat, idx);
168 }
LIBCONFIG_API int config_setting_get_int_elem(const config_setting_t *setting, int idx)

◆ LcSettingGetIntElemP()

LC_EXTERN MK_I32 LcSettingGetIntElemP ( LC_CFSN setting,
MK_I32 idx )

Non-inline replacement for LcSettingGetIntElem

◆ LcSettingGetIntP()

LC_EXTERN MK_I32 LcSettingGetIntP ( LC_CFSN setting)

Non-inline replacement for LcSettingGetInt

◆ LcSettingGetMember()

LC_CFS LcSettingGetMember ( LC_CFSN setting,
MK_STRN name )
inline

This function fetches the child setting named name from the group setting

It returns the requested setting on success, or NULL if the setting was not found or if setting is not a group.

Definition at line 103 of file LcSettingC_lc.h.

103 {
104 LC_INSTANCE_HDL(setting);
105 return LcSettingC_ObjNew(config_setting_get_member(setting->nat, name));
106 }
LIBCONFIG_API config_setting_t * config_setting_get_member(const config_setting_t *setting, const char *name)

◆ LcSettingGetMemberP()

LC_EXTERN LC_CFS LcSettingGetMemberP ( LC_CFSN setting,
MK_STRN name )

Non-inline replacement for LcSettingGetMember

◆ LcSettingGetString()

MK_STRN LcSettingGetString ( LC_CFSN setting)
inline

These functions return the value of the given setting

If the type of the setting does not match the type requested, a 0 or NULL value is returned. Storage for the string returned by SettingGetString 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
SettingGetBool, SettingGetFloat, SettingGetInt, SettingGetInt64

Definition at line 171 of file LcSettingC_lc.h.

171 {
172 LC_INSTANCE_HDL(setting);
173 MK_STRN __retVal__L = config_setting_get_string(setting->nat);
174 return __retVal__L;
175 }
const MK_STRB * MK_STRN
LIBCONFIG_API const char * config_setting_get_string(const config_setting_t *setting)

◆ LcSettingGetStringElem()

MK_STRN LcSettingGetStringElem ( LC_CFSN setting,
MK_I32 idx )
inline

These functions return the value at the specified index index in the setting setting

If the setting is not an array or list, or if the type of the element does not match the type requested, or if index is out of range, they return 0 or NULL. Storage for the string returned by SettingGetStringElem is managed by the library and released automatically when the setting is destroyed or when its value is changed; the string must not be freed by the caller.

See also
SettingGetBoolElem, SettingGetFloatElem, SettingGetInt64Elem, SettingGetIntElem

Definition at line 178 of file LcSettingC_lc.h.

178 {
179 LC_INSTANCE_HDL(setting);
180 MK_STRN __retVal__L = config_setting_get_string_elem(setting->nat, idx);
181 return __retVal__L;
182 }
LIBCONFIG_API const char * config_setting_get_string_elem(const config_setting_t *setting, int idx)

◆ LcSettingGetStringElemP()

LC_EXTERN MK_STRN LcSettingGetStringElemP ( LC_CFSN setting,
MK_I32 idx )

Non-inline replacement for LcSettingGetStringElem

◆ LcSettingGetStringP()

LC_EXTERN MK_STRN LcSettingGetStringP ( LC_CFSN setting)

Non-inline replacement for LcSettingGetString