golcconfig 9.0
Loading...
Searching...
No Matches
Functions
LcSettingC_Set_C_API

various functions to set data in a LcSettingCMore...

+ Collaboration diagram for LcSettingC_Set_C_API:

Functions

LC_EXTERN LC_CFS LcSettingSetBoolElemP (LC_CFS setting, MK_INT idx, MK_INT value)
 Non-inline replacement for LcSettingSetBoolElem
 
LC_EXTERN LC_CFS LcSettingSetFloatElemP (LC_CFS setting, MK_INT idx, MK_DBL value)
 Non-inline replacement for LcSettingSetFloatElem
 
LC_EXTERN LC_CFS LcSettingSetInt64ElemP (LC_CFS setting, MK_INT idx, MK_WID value)
 Non-inline replacement for LcSettingSetInt64Elem
 
LC_EXTERN LC_CFS LcSettingSetIntElemP (LC_CFS setting, MK_INT idx, MK_INT value)
 Non-inline replacement for LcSettingSetIntElem
 
LC_EXTERN LC_CFS LcSettingSetStringElemP (LC_CFS setting, MK_INT idx, MK_STRN value)
 Non-inline replacement for LcSettingSetStringElem
 
LC_EXTERN enum MkErrorE LcSettingSetBoolP (LC_CFS setting, MK_BOOL value)
 Non-inline replacement for LcSettingSetBool
 
LC_EXTERN enum MkErrorE LcSettingSetFloatP (LC_CFS setting, MK_DBL value)
 Non-inline replacement for LcSettingSetFloat
 
LC_EXTERN enum MkErrorE LcSettingSetFormatP (LC_CFS setting, enum LcConfigFormatE format)
 Non-inline replacement for LcSettingSetFormat
 
LC_EXTERN enum MkErrorE LcSettingSetIntP (LC_CFS setting, MK_INT value)
 Non-inline replacement for LcSettingSetInt
 
LC_EXTERN enum MkErrorE LcSettingSetInt64P (LC_CFS setting, MK_WID value)
 Non-inline replacement for LcSettingSetInt64
 
LC_EXTERN enum MkErrorE LcSettingSetStringP (LC_CFS setting, MK_STRN value)
 Non-inline replacement for LcSettingSetString
 
LC_CFS LcSettingSetBoolElem (LC_CFS setting, MK_INT idx, MK_INT value)
 These functions set the value at the specified index index in the setting setting to value
 
LC_CFS LcSettingSetFloatElem (LC_CFS setting, MK_INT idx, MK_DBL value)
 These functions set the value at the specified index index in the setting setting to value
 
LC_CFS LcSettingSetInt64Elem (LC_CFS setting, MK_INT idx, MK_WID value)
 These functions set the value at the specified index index in the setting setting to value
 
LC_CFS LcSettingSetIntElem (LC_CFS setting, MK_INT idx, MK_INT value)
 These functions set the value at the specified index index in the setting setting to value
 
LC_CFS LcSettingSetStringElem (LC_CFS setting, MK_INT idx, MK_STRN value)
 These functions set the value at the specified index index in the setting setting to value
 
enum MkErrorE LcSettingSetBool (LC_CFS setting, MK_BOOL value)
 These functions set the value of the given setting to value
 
enum MkErrorE LcSettingSetFloat (LC_CFS setting, MK_DBL value)
 These functions set the value of the given setting to value
 
enum MkErrorE LcSettingSetFormat (LC_CFS setting, enum LcConfigFormatE format)
 These functions get and set the external format for the setting setting
 
enum MkErrorE LcSettingSetInt (LC_CFS setting, MK_INT value)
 These functions set the value of the given setting to value
 
enum MkErrorE LcSettingSetInt64 (LC_CFS setting, MK_WID value)
 These functions set the value of the given setting to value
 
enum MkErrorE LcSettingSetString (LC_CFS setting, MK_STRN value)
 These functions set the value of the given setting to value
 

Overload

#define LcSettingSetBool_E(...)   MkErrorCheck(LcSettingSetBool(__VA_ARGS__))
 
#define LcSettingSetBool_C(...)   if (MkErrorCheckI(LcSettingSetBool(__VA_ARGS__)))
 
#define LcSettingSetFloat_E(...)   MkErrorCheck(LcSettingSetFloat(__VA_ARGS__))
 
#define LcSettingSetFloat_C(...)   if (MkErrorCheckI(LcSettingSetFloat(__VA_ARGS__)))
 
#define LcSettingSetFormat_E(...)   MkErrorCheck(LcSettingSetFormat(__VA_ARGS__))
 
#define LcSettingSetFormat_C(...)   if (MkErrorCheckI(LcSettingSetFormat(__VA_ARGS__)))
 
#define LcSettingSetInt_E(...)   MkErrorCheck(LcSettingSetInt(__VA_ARGS__))
 
#define LcSettingSetInt_C(...)   if (MkErrorCheckI(LcSettingSetInt(__VA_ARGS__)))
 
#define LcSettingSetInt64_E(...)   MkErrorCheck(LcSettingSetInt64(__VA_ARGS__))
 
#define LcSettingSetInt64_C(...)   if (MkErrorCheckI(LcSettingSetInt64(__VA_ARGS__)))
 
#define LcSettingSetString_E(...)   MkErrorCheck(LcSettingSetString(__VA_ARGS__))
 
#define LcSettingSetString_C(...)   if (MkErrorCheckI(LcSettingSetString(__VA_ARGS__)))
 

Detailed Description

various functions to set data in a LcSettingC

Setting data is usefull to modify a configuration value on-the-fly or to setup an entire new configuration-file with ConfigWriteFile.

Macro Definition Documentation

◆ LcSettingSetBool_C

#define LcSettingSetBool_C (   ...)    if (MkErrorCheckI(LcSettingSetBool(__VA_ARGS__)))

Definition at line 156 of file config_overload_lc.h.

◆ LcSettingSetBool_E

#define LcSettingSetBool_E (   ...)    MkErrorCheck(LcSettingSetBool(__VA_ARGS__))

Definition at line 155 of file config_overload_lc.h.

◆ LcSettingSetFloat_C

#define LcSettingSetFloat_C (   ...)    if (MkErrorCheckI(LcSettingSetFloat(__VA_ARGS__)))

Definition at line 158 of file config_overload_lc.h.

◆ LcSettingSetFloat_E

#define LcSettingSetFloat_E (   ...)    MkErrorCheck(LcSettingSetFloat(__VA_ARGS__))

Definition at line 157 of file config_overload_lc.h.

◆ LcSettingSetFormat_C

#define LcSettingSetFormat_C (   ...)    if (MkErrorCheckI(LcSettingSetFormat(__VA_ARGS__)))

Definition at line 160 of file config_overload_lc.h.

◆ LcSettingSetFormat_E

#define LcSettingSetFormat_E (   ...)    MkErrorCheck(LcSettingSetFormat(__VA_ARGS__))

Definition at line 159 of file config_overload_lc.h.

◆ LcSettingSetInt64_C

#define LcSettingSetInt64_C (   ...)    if (MkErrorCheckI(LcSettingSetInt64(__VA_ARGS__)))

Definition at line 164 of file config_overload_lc.h.

◆ LcSettingSetInt64_E

#define LcSettingSetInt64_E (   ...)    MkErrorCheck(LcSettingSetInt64(__VA_ARGS__))

Definition at line 163 of file config_overload_lc.h.

◆ LcSettingSetInt_C

#define LcSettingSetInt_C (   ...)    if (MkErrorCheckI(LcSettingSetInt(__VA_ARGS__)))

Definition at line 162 of file config_overload_lc.h.

◆ LcSettingSetInt_E

#define LcSettingSetInt_E (   ...)    MkErrorCheck(LcSettingSetInt(__VA_ARGS__))

Definition at line 161 of file config_overload_lc.h.

◆ LcSettingSetString_C

#define LcSettingSetString_C (   ...)    if (MkErrorCheckI(LcSettingSetString(__VA_ARGS__)))

Definition at line 166 of file config_overload_lc.h.

◆ LcSettingSetString_E

#define LcSettingSetString_E (   ...)    MkErrorCheck(LcSettingSetString(__VA_ARGS__))

Definition at line 165 of file config_overload_lc.h.

Function Documentation

◆ LcSettingSetBool()

mk_inline enum MkErrorE LcSettingSetBool ( LC_CFS  setting,
MK_BOOL  value 
)
inline

These functions set the value of the given setting to value

On success, they return CONFIG_TRUE. If the setting does not match the type of the value, they return CONFIG_FALSE. config_setting_set_string makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetFloat, SettingSetInt, SettingSetInt64, SettingSetString

Definition at line 541 of file LcSettingC_lc.h.

◆ LcSettingSetBoolElem()

mk_inline LC_CFS LcSettingSetBoolElem ( LC_CFS  setting,
MK_INT  idx,
MK_INT  value 
)
inline

These functions set the value at the specified index index in the setting setting to value

If index is negative, a new element is added to the end of the array or list. On success, these functions return a pointer to the setting representing the element. If the setting is not an array or list, or if the setting is an array and the type of the array does not match the type of the value, or if index is out of range, they return NULL. config_setting_set_string_elem makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetFloatElem, SettingSetInt64Elem, SettingSetIntElem, SettingSetStringElem

Definition at line 513 of file LcSettingC_lc.h.

◆ LcSettingSetBoolElemP()

LC_EXTERN LC_CFS LcSettingSetBoolElemP ( LC_CFS  setting,
MK_INT  idx,
MK_INT  value 
)

Non-inline replacement for LcSettingSetBoolElem

◆ LcSettingSetBoolP()

LC_EXTERN enum MkErrorE LcSettingSetBoolP ( LC_CFS  setting,
MK_BOOL  value 
)

Non-inline replacement for LcSettingSetBool

◆ LcSettingSetFloat()

mk_inline enum MkErrorE LcSettingSetFloat ( LC_CFS  setting,
MK_DBL  value 
)
inline

These functions set the value of the given setting to value

On success, they return CONFIG_TRUE. If the setting does not match the type of the value, they return CONFIG_FALSE. config_setting_set_string makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetBool, SettingSetInt, SettingSetInt64, SettingSetString

Definition at line 550 of file LcSettingC_lc.h.

◆ LcSettingSetFloatElem()

mk_inline LC_CFS LcSettingSetFloatElem ( LC_CFS  setting,
MK_INT  idx,
MK_DBL  value 
)
inline

These functions set the value at the specified index index in the setting setting to value

If index is negative, a new element is added to the end of the array or list. On success, these functions return a pointer to the setting representing the element. If the setting is not an array or list, or if the setting is an array and the type of the array does not match the type of the value, or if index is out of range, they return NULL. config_setting_set_string_elem makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetBoolElem, SettingSetInt64Elem, SettingSetIntElem, SettingSetStringElem

Definition at line 518 of file LcSettingC_lc.h.

◆ LcSettingSetFloatElemP()

LC_EXTERN LC_CFS LcSettingSetFloatElemP ( LC_CFS  setting,
MK_INT  idx,
MK_DBL  value 
)

Non-inline replacement for LcSettingSetFloatElem

◆ LcSettingSetFloatP()

LC_EXTERN enum MkErrorE LcSettingSetFloatP ( LC_CFS  setting,
MK_DBL  value 
)

Non-inline replacement for LcSettingSetFloat

◆ LcSettingSetFormat()

mk_inline enum MkErrorE LcSettingSetFormat ( LC_CFS  setting,
enum LcConfigFormatE  format 
)
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, config_setting_get_format returns the default format for the configuration, as set by ConfigSetDefaultFormat.

config_setting_set_format returns CONFIG_TRUE on success and CONFIG_FALSE on failure.

See also
SettingGetFormat

Definition at line 559 of file LcSettingC_lc.h.

◆ LcSettingSetFormatP()

LC_EXTERN enum MkErrorE LcSettingSetFormatP ( LC_CFS  setting,
enum LcConfigFormatE  format 
)

Non-inline replacement for LcSettingSetFormat

◆ LcSettingSetInt()

mk_inline enum MkErrorE LcSettingSetInt ( LC_CFS  setting,
MK_INT  value 
)
inline

These functions set the value of the given setting to value

On success, they return CONFIG_TRUE. If the setting does not match the type of the value, they return CONFIG_FALSE. config_setting_set_string makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetBool, SettingSetFloat, SettingSetInt64, SettingSetString

Definition at line 568 of file LcSettingC_lc.h.

◆ LcSettingSetInt64()

mk_inline enum MkErrorE LcSettingSetInt64 ( LC_CFS  setting,
MK_WID  value 
)
inline

These functions set the value of the given setting to value

On success, they return CONFIG_TRUE. If the setting does not match the type of the value, they return CONFIG_FALSE. config_setting_set_string makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetBool, SettingSetFloat, SettingSetInt, SettingSetString

Definition at line 577 of file LcSettingC_lc.h.

◆ LcSettingSetInt64Elem()

mk_inline LC_CFS LcSettingSetInt64Elem ( LC_CFS  setting,
MK_INT  idx,
MK_WID  value 
)
inline

These functions set the value at the specified index index in the setting setting to value

If index is negative, a new element is added to the end of the array or list. On success, these functions return a pointer to the setting representing the element. If the setting is not an array or list, or if the setting is an array and the type of the array does not match the type of the value, or if index is out of range, they return NULL. config_setting_set_string_elem makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetBoolElem, SettingSetFloatElem, SettingSetIntElem, SettingSetStringElem

Definition at line 523 of file LcSettingC_lc.h.

◆ LcSettingSetInt64ElemP()

LC_EXTERN LC_CFS LcSettingSetInt64ElemP ( LC_CFS  setting,
MK_INT  idx,
MK_WID  value 
)

Non-inline replacement for LcSettingSetInt64Elem

◆ LcSettingSetInt64P()

LC_EXTERN enum MkErrorE LcSettingSetInt64P ( LC_CFS  setting,
MK_WID  value 
)

Non-inline replacement for LcSettingSetInt64

◆ LcSettingSetIntElem()

mk_inline LC_CFS LcSettingSetIntElem ( LC_CFS  setting,
MK_INT  idx,
MK_INT  value 
)
inline

These functions set the value at the specified index index in the setting setting to value

If index is negative, a new element is added to the end of the array or list. On success, these functions return a pointer to the setting representing the element. If the setting is not an array or list, or if the setting is an array and the type of the array does not match the type of the value, or if index is out of range, they return NULL. config_setting_set_string_elem makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetBoolElem, SettingSetFloatElem, SettingSetInt64Elem, SettingSetStringElem

Definition at line 528 of file LcSettingC_lc.h.

◆ LcSettingSetIntElemP()

LC_EXTERN LC_CFS LcSettingSetIntElemP ( LC_CFS  setting,
MK_INT  idx,
MK_INT  value 
)

Non-inline replacement for LcSettingSetIntElem

◆ LcSettingSetIntP()

LC_EXTERN enum MkErrorE LcSettingSetIntP ( LC_CFS  setting,
MK_INT  value 
)

Non-inline replacement for LcSettingSetInt

◆ LcSettingSetString()

mk_inline enum MkErrorE LcSettingSetString ( LC_CFS  setting,
MK_STRN  value 
)
inline

These functions set the value of the given setting to value

On success, they return CONFIG_TRUE. If the setting does not match the type of the value, they return CONFIG_FALSE. config_setting_set_string makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetBool, SettingSetFloat, SettingSetInt, SettingSetInt64

Definition at line 586 of file LcSettingC_lc.h.

◆ LcSettingSetStringElem()

mk_inline LC_CFS LcSettingSetStringElem ( LC_CFS  setting,
MK_INT  idx,
MK_STRN  value 
)
inline

These functions set the value at the specified index index in the setting setting to value

If index is negative, a new element is added to the end of the array or list. On success, these functions return a pointer to the setting representing the element. If the setting is not an array or list, or if the setting is an array and the type of the array does not match the type of the value, or if index is out of range, they return NULL. config_setting_set_string_elem makes a copy of the passed string value, so it may be subsequently freed or modified by the caller without affecting the value of the setting.

See also
SettingSetBoolElem, SettingSetFloatElem, SettingSetInt64Elem, SettingSetIntElem

Definition at line 533 of file LcSettingC_lc.h.

◆ LcSettingSetStringElemP()

LC_EXTERN LC_CFS LcSettingSetStringElemP ( LC_CFS  setting,
MK_INT  idx,
MK_STRN  value 
)

Non-inline replacement for LcSettingSetStringElem

◆ LcSettingSetStringP()

LC_EXTERN enum MkErrorE LcSettingSetStringP ( LC_CFS  setting,
MK_STRN  value 
)

Non-inline replacement for LcSettingSetString