theConfig 10.0
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

static LC_CFS liblcconfig::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 …
 
static LC_CFS liblcconfig::LcSettingGetMember (LC_CFSN setting, MK_STRN name)
 This function fetches the child setting named name from the group setting
 
static MK_BOOL liblcconfig::LcSettingGetBool (LC_CFSN setting)
 These functions return the value of the given setting
 
static MK_BOOL liblcconfig::LcSettingGetBoolElem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
static MK_DBL liblcconfig::LcSettingGetFloat (LC_CFSN setting)
 These functions return the value of the given setting
 
static MK_DBL liblcconfig::LcSettingGetFloatElem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
static enum LcConfigFormatE liblcconfig::LcSettingGetFormat (LC_CFSN setting)
 These functions get and set the external format for the setting setting
 
static MK_PTR liblcconfig::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 …
 
static MK_I32 liblcconfig::LcSettingGetInt (LC_CFSN setting)
 These functions return the value of the given setting
 
static MK_I64 liblcconfig::LcSettingGetInt64 (LC_CFSN setting)
 These functions return the value of the given setting
 
static MK_I64 liblcconfig::LcSettingGetInt64Elem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
static MK_I32 liblcconfig::LcSettingGetIntElem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
static MK_STRN liblcconfig::LcSettingGetString (LC_CFSN setting)
 These functions return the value of the given setting
 
static MK_STRN liblcconfig::LcSettingGetStringElem (LC_CFSN setting, MK_I32 idx)
 These functions return the value at the specified index index in the setting setting
 
static LC_CFG liblcconfig::LcSettingGetConfig (LC_CFSN setting)
 addon - return the LcConfigC from the LcSettingC
 

Detailed Description

LcSettingC - various functions to get data from a setting

Function Documentation

◆ LcSettingGetBool()

static MK_BOOL liblcconfig::LcSettingGetBool ( LC_CFSN setting)
inlinestatic

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

94 {
95 LC_INSTANCE_HDL(setting);
96 return (MK_BOOL)config_setting_get_bool(setting->nat);
97 }
#define LC_INSTANCE_HDL(x)
LIBCONFIG_API int config_setting_get_bool(const config_setting_t *setting)
+ Here is the caller graph for this function:

◆ LcSettingGetBoolElem()

static MK_BOOL liblcconfig::LcSettingGetBoolElem ( LC_CFSN setting,
MK_I32 idx )
inlinestatic

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

100 {
101 LC_INSTANCE_HDL(setting);
102 return (MK_BOOL)config_setting_get_bool_elem(setting->nat, idx);
103 }
LIBCONFIG_API int config_setting_get_bool_elem(const config_setting_t *setting, int idx)
+ Here is the caller graph for this function:

◆ LcSettingGetConfig()

static LC_CFG liblcconfig::LcSettingGetConfig ( LC_CFSN setting)
inlinestatic

addon - return the LcConfigC from the LcSettingC

Definition at line 490 of file LcSettingC_lc.h.

490 {
491 return LcConfigC_ObjNew(setting->nat->config);
492}
+ Here is the caller graph for this function:

◆ LcSettingGetElem()

static LC_CFS liblcconfig::LcSettingGetElem ( LC_CFSN setting,
MK_I32 idx )
inlinestatic

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

80 {
81 LC_INSTANCE_HDL(setting);
82 return LcSettingC_ObjNew(config_setting_get_elem(setting->nat, (MK_U32)idx));
83 }
LIBCONFIG_API config_setting_t * config_setting_get_elem(const config_setting_t *setting, unsigned int idx)
+ Here is the caller graph for this function:

◆ LcSettingGetFloat()

static MK_DBL liblcconfig::LcSettingGetFloat ( LC_CFSN setting)
inlinestatic

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

106 {
107 LC_INSTANCE_HDL(setting);
108 return config_setting_get_float(setting->nat);
109 }
LIBCONFIG_API double config_setting_get_float(const config_setting_t *setting)
+ Here is the caller graph for this function:

◆ LcSettingGetFloatElem()

static MK_DBL liblcconfig::LcSettingGetFloatElem ( LC_CFSN setting,
MK_I32 idx )
inlinestatic

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

112 {
113 LC_INSTANCE_HDL(setting);
114 return config_setting_get_float_elem(setting->nat, idx);
115 }
LIBCONFIG_API double config_setting_get_float_elem(const config_setting_t *setting, int idx)
+ Here is the caller graph for this function:

◆ LcSettingGetFormat()

static enum LcConfigFormatE liblcconfig::LcSettingGetFormat ( LC_CFSN setting)
inlinestatic

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

118 {
119 LC_INSTANCE_HDL(setting);
120 return (enum LcConfigFormatE)config_setting_get_format(setting->nat);
121 }
LIBCONFIG_API short config_setting_get_format(const config_setting_t *setting)
+ Here is the caller graph for this function:

◆ LcSettingGetHookHide()

static MK_PTR liblcconfig::LcSettingGetHookHide ( LC_CFSN setting)
inlinestatic

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

124 {
125 LC_INSTANCE_HDL(setting);
126 return (MK_PTR)config_setting_get_hook(setting->nat);
127 }
#define config_setting_get_hook(S)
+ Here is the caller graph for this function:

◆ LcSettingGetInt()

static MK_I32 liblcconfig::LcSettingGetInt ( LC_CFSN setting)
inlinestatic

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

130 {
131 LC_INSTANCE_HDL(setting);
132 return config_setting_get_int(setting->nat);
133 }
LIBCONFIG_API int config_setting_get_int(const config_setting_t *setting)
+ Here is the caller graph for this function:

◆ LcSettingGetInt64()

static MK_I64 liblcconfig::LcSettingGetInt64 ( LC_CFSN setting)
inlinestatic

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

136 {
137 LC_INSTANCE_HDL(setting);
138 return config_setting_get_int64(setting->nat);
139 }
LIBCONFIG_API long long config_setting_get_int64(const config_setting_t *setting)
+ Here is the caller graph for this function:

◆ LcSettingGetInt64Elem()

static MK_I64 liblcconfig::LcSettingGetInt64Elem ( LC_CFSN setting,
MK_I32 idx )
inlinestatic

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

142 {
143 LC_INSTANCE_HDL(setting);
144 return config_setting_get_int64_elem(setting->nat, idx);
145 }
LIBCONFIG_API long long config_setting_get_int64_elem(const config_setting_t *setting, int idx)
+ Here is the caller graph for this function:

◆ LcSettingGetIntElem()

static MK_I32 liblcconfig::LcSettingGetIntElem ( LC_CFSN setting,
MK_I32 idx )
inlinestatic

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

148 {
149 LC_INSTANCE_HDL(setting);
150 return config_setting_get_int_elem(setting->nat, idx);
151 }
LIBCONFIG_API int config_setting_get_int_elem(const config_setting_t *setting, int idx)
+ Here is the caller graph for this function:

◆ LcSettingGetMember()

static LC_CFS liblcconfig::LcSettingGetMember ( LC_CFSN setting,
MK_STRN name )
inlinestatic

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

86 {
87 LC_INSTANCE_HDL(setting);
88 return LcSettingC_ObjNew(config_setting_get_member(setting->nat, name));
89 }
LIBCONFIG_API config_setting_t * config_setting_get_member(const config_setting_t *setting, const char *name)
+ Here is the caller graph for this function:

◆ LcSettingGetString()

static MK_STRN liblcconfig::LcSettingGetString ( LC_CFSN setting)
inlinestatic

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

154 {
155 LC_INSTANCE_HDL(setting);
156 MK_STRN __retVal__L = config_setting_get_string(setting->nat);
157 return __retVal__L;
158 }
const MK_STRB * MK_STRN
LIBCONFIG_API const char * config_setting_get_string(const config_setting_t *setting)
+ Here is the caller graph for this function:

◆ LcSettingGetStringElem()

static MK_STRN liblcconfig::LcSettingGetStringElem ( LC_CFSN setting,
MK_I32 idx )
inlinestatic

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

161 {
162 LC_INSTANCE_HDL(setting);
163 MK_STRN __retVal__L = config_setting_get_string_elem(setting->nat, idx);
164 return __retVal__L;
165 }
LIBCONFIG_API const char * config_setting_get_string_elem(const config_setting_t *setting, int idx)
+ Here is the caller graph for this function: