theConfig 10.0
Loading...
Searching...
No Matches
LcSettingC_Set_C_API

LcSettingC - various functions to set date into a settingMore...

+ Collaboration diagram for LcSettingC_Set_C_API:

Functions

static LC_CFS LcSettingSetBoolElem (LC_CFS setting, MK_I32 idx, MK_I32 value)
 These functions set the value at the specified index index in the setting setting to value
 
static LC_CFS LcSettingSetFloatElem (LC_CFS setting, MK_I32 idx, MK_DBL value)
 These functions set the value at the specified index index in the setting setting to value
 
static LC_CFS LcSettingSetInt64Elem (LC_CFS setting, MK_I32 idx, MK_I64 value)
 These functions set the value at the specified index index in the setting setting to value
 
static LC_CFS LcSettingSetIntElem (LC_CFS setting, MK_I32 idx, MK_I32 value)
 These functions set the value at the specified index index in the setting setting to value
 
static LC_CFS LcSettingSetStringElem (LC_CFS setting, MK_I32 idx, MK_STRN value)
 These functions set the value at the specified index index in the setting setting to value
 
static enum MkErrorE LcSettingSetBool (LC_CFS setting, MK_BOOL value)
 These functions set the value of the given setting to value
 
static enum MkErrorE LcSettingSetFloat (LC_CFS setting, MK_DBL value)
 These functions set the value of the given setting to value
 
static enum MkErrorE LcSettingSetFormat (LC_CFS setting, enum LcConfigFormatE format)
 These functions get and set the external format for the setting setting
 
static void LcSettingSetHookHide (LC_CFS setting, MK_PTR hook)
 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 enum MkErrorE LcSettingSetInt (LC_CFS setting, MK_I32 value)
 These functions set the value of the given setting to value
 
static enum MkErrorE LcSettingSetInt64 (LC_CFS setting, MK_I64 value)
 These functions set the value of the given setting to value
 
static enum MkErrorE LcSettingSetString (LC_CFS setting, MK_STRN value)
 These functions set the value of the given setting to value
 

LcSettingC - LcSettingC_Set_C_API - function

LC_CFS LcSettingSetBoolElemP (LC_CFS setting, MK_I32 idx, MK_I32 value)
 Non-inline replacement for LcSettingSetBoolElem
 
LC_CFS LcSettingSetFloatElemP (LC_CFS setting, MK_I32 idx, MK_DBL value)
 Non-inline replacement for LcSettingSetFloatElem
 
LC_CFS LcSettingSetInt64ElemP (LC_CFS setting, MK_I32 idx, MK_I64 value)
 Non-inline replacement for LcSettingSetInt64Elem
 
LC_CFS LcSettingSetIntElemP (LC_CFS setting, MK_I32 idx, MK_I32 value)
 Non-inline replacement for LcSettingSetIntElem
 
LC_CFS LcSettingSetStringElemP (LC_CFS setting, MK_I32 idx, MK_STRN value)
 Non-inline replacement for LcSettingSetStringElem
 
enum MkErrorE LcSettingSetBoolP (LC_CFS setting, MK_BOOL value)
 Non-inline replacement for LcSettingSetBool
 
enum MkErrorE LcSettingSetFloatP (LC_CFS setting, MK_DBL value)
 Non-inline replacement for LcSettingSetFloat
 
enum MkErrorE LcSettingSetFormatP (LC_CFS setting, enum LcConfigFormatE format)
 Non-inline replacement for LcSettingSetFormat
 
void LcSettingSetHookHideP (LC_CFS setting, MK_PTR hook)
 Non-inline replacement for LcSettingSetHookHide
 
enum MkErrorE LcSettingSetIntP (LC_CFS setting, MK_I32 value)
 Non-inline replacement for LcSettingSetInt
 
enum MkErrorE LcSettingSetInt64P (LC_CFS setting, MK_I64 value)
 Non-inline replacement for LcSettingSetInt64
 
enum MkErrorE LcSettingSetStringP (LC_CFS setting, MK_STRN value)
 Non-inline replacement for LcSettingSetString
 

LcSettingC - LcSettingC_Set_C_API - overload

#define LcSettingSetBool_E(...)
 
#define LcSettingSetBool_C(...)
 
#define LcSettingSetFloat_E(...)
 
#define LcSettingSetFloat_C(...)
 
#define LcSettingSetFormat_E(...)
 
#define LcSettingSetFormat_C(...)
 
#define LcSettingSetInt_E(...)
 
#define LcSettingSetInt_C(...)
 
#define LcSettingSetInt64_E(...)
 
#define LcSettingSetInt64_C(...)
 
#define LcSettingSetString_E(...)
 
#define LcSettingSetString_C(...)
 

Detailed Description

LcSettingC - various functions to set date into a setting

Macro Definition Documentation

◆ LcSettingSetBool_C

#define LcSettingSetBool_C ( ...)
Value:
if (MkErrorCheckI(LcSettingSetBool(__VA_ARGS__)))
static enum MkErrorE LcSettingSetBool(LC_CFS setting, MK_BOOL value)
These functions set the value of the given setting to value …

Definition at line 230 of file config_overload_lc.h.

◆ LcSettingSetBool_E

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

Definition at line 229 of file config_overload_lc.h.

◆ LcSettingSetFloat_C

#define LcSettingSetFloat_C ( ...)
Value:
if (MkErrorCheckI(LcSettingSetFloat(__VA_ARGS__)))
static enum MkErrorE LcSettingSetFloat(LC_CFS setting, MK_DBL value)
These functions set the value of the given setting to value …

Definition at line 232 of file config_overload_lc.h.

◆ LcSettingSetFloat_E

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

Definition at line 231 of file config_overload_lc.h.

◆ LcSettingSetFormat_C

#define LcSettingSetFormat_C ( ...)
Value:
if (MkErrorCheckI(LcSettingSetFormat(__VA_ARGS__)))
static enum MkErrorE LcSettingSetFormat(LC_CFS setting, enum LcConfigFormatE format)
These functions get and set the external format for the setting setting …

Definition at line 234 of file config_overload_lc.h.

◆ LcSettingSetFormat_E

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

Definition at line 233 of file config_overload_lc.h.

◆ LcSettingSetInt64_C

#define LcSettingSetInt64_C ( ...)
Value:
if (MkErrorCheckI(LcSettingSetInt64(__VA_ARGS__)))
static enum MkErrorE LcSettingSetInt64(LC_CFS setting, MK_I64 value)
These functions set the value of the given setting to value …

Definition at line 238 of file config_overload_lc.h.

◆ LcSettingSetInt64_E

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

Definition at line 237 of file config_overload_lc.h.

◆ LcSettingSetInt_C

#define LcSettingSetInt_C ( ...)
Value:
if (MkErrorCheckI(LcSettingSetInt(__VA_ARGS__)))
static enum MkErrorE LcSettingSetInt(LC_CFS setting, MK_I32 value)
These functions set the value of the given setting to value …

Definition at line 236 of file config_overload_lc.h.

◆ LcSettingSetInt_E

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

Definition at line 235 of file config_overload_lc.h.

◆ LcSettingSetString_C

#define LcSettingSetString_C ( ...)
Value:
if (MkErrorCheckI(LcSettingSetString(__VA_ARGS__)))
static enum MkErrorE LcSettingSetString(LC_CFS setting, MK_STRN value)
These functions set the value of the given setting to value …

Definition at line 240 of file config_overload_lc.h.

◆ LcSettingSetString_E

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

Definition at line 239 of file config_overload_lc.h.

Function Documentation

◆ LcSettingSetBool()

static enum MkErrorE LcSettingSetBool ( LC_CFS setting,
MK_BOOL value )
inlinestatic

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

388 {
389 LC_INSTANCE_HDL(setting);
390 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_bool(setting->nat, value);
391 LcErrorE_Check(setting, errVal);
392 return MK_OK;
393 error:
394 return MK_ERROR;
395 }
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 …
#define LC_INSTANCE_HDL(x)
MK_ERROR
MK_OK
LIBCONFIG_API int config_setting_set_bool(config_setting_t *setting, int value)
config_setting_t * nat
internal - link between LcSettingS and native library

◆ LcSettingSetBoolElem()

static LC_CFS LcSettingSetBoolElem ( LC_CFS setting,
MK_I32 idx,
MK_I32 value )
inlinestatic

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

356 {
357 LC_INSTANCE_HDL(setting);
358 return LcSettingC_ObjNew(config_setting_set_bool_elem(setting->nat, idx, value));
359 }
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_set_bool_elem(config_setting_t *setting, int idx, int value)

◆ LcSettingSetBoolElemP()

LC_CFS LcSettingSetBoolElemP ( LC_CFS setting,
MK_I32 idx,
MK_I32 value )

Non-inline replacement for LcSettingSetBoolElem

◆ LcSettingSetBoolP()

enum MkErrorE LcSettingSetBoolP ( LC_CFS setting,
MK_BOOL value )

Non-inline replacement for LcSettingSetBool

◆ LcSettingSetFloat()

static enum MkErrorE LcSettingSetFloat ( LC_CFS setting,
MK_DBL value )
inlinestatic

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

398 {
399 LC_INSTANCE_HDL(setting);
400 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_float(setting->nat, value);
401 LcErrorE_Check(setting, errVal);
402 return MK_OK;
403 error:
404 return MK_ERROR;
405 }
LIBCONFIG_API int config_setting_set_float(config_setting_t *setting, double value)

◆ LcSettingSetFloatElem()

static LC_CFS LcSettingSetFloatElem ( LC_CFS setting,
MK_I32 idx,
MK_DBL value )
inlinestatic

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

362 {
363 LC_INSTANCE_HDL(setting);
364 return LcSettingC_ObjNew(config_setting_set_float_elem(setting->nat, idx, value));
365 }
LIBCONFIG_API config_setting_t * config_setting_set_float_elem(config_setting_t *setting, int idx, double value)

◆ LcSettingSetFloatElemP()

LC_CFS LcSettingSetFloatElemP ( LC_CFS setting,
MK_I32 idx,
MK_DBL value )

Non-inline replacement for LcSettingSetFloatElem

◆ LcSettingSetFloatP()

enum MkErrorE LcSettingSetFloatP ( LC_CFS setting,
MK_DBL value )

Non-inline replacement for LcSettingSetFloat

◆ LcSettingSetFormat()

static enum MkErrorE LcSettingSetFormat ( LC_CFS setting,
enum LcConfigFormatE format )
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
SettingGetFormat

Definition at line 408 of file LcSettingC_lc.h.

408 {
409 LC_INSTANCE_HDL(setting);
410 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_format(setting->nat, format);
411 LcErrorE_Check(setting, errVal);
412 return MK_OK;
413 error:
414 return MK_ERROR;
415 }
LIBCONFIG_API int config_setting_set_format(config_setting_t *setting, short format)

◆ LcSettingSetFormatP()

enum MkErrorE LcSettingSetFormatP ( LC_CFS setting,
enum LcConfigFormatE format )

Non-inline replacement for LcSettingSetFormat

◆ LcSettingSetHookHide()

static void LcSettingSetHookHide ( LC_CFS setting,
MK_PTR hook )
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_get_hook

Definition at line 418 of file LcSettingC_lc.h.

418 {
419 LC_INSTANCE_HDL(setting);
420 config_setting_set_hook(setting->nat, (MK_PTR)(hook));
421 }
MK_PTRB * MK_PTR
LIBCONFIG_API void config_setting_set_hook(config_setting_t *setting, void *hook)

◆ LcSettingSetHookHideP()

void LcSettingSetHookHideP ( LC_CFS setting,
MK_PTR hook )

Non-inline replacement for LcSettingSetHookHide

◆ LcSettingSetInt()

static enum MkErrorE LcSettingSetInt ( LC_CFS setting,
MK_I32 value )
inlinestatic

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

424 {
425 LC_INSTANCE_HDL(setting);
426 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_int(setting->nat, value);
427 LcErrorE_Check(setting, errVal);
428 return MK_OK;
429 error:
430 return MK_ERROR;
431 }
LIBCONFIG_API int config_setting_set_int(config_setting_t *setting, int value)

◆ LcSettingSetInt64()

static enum MkErrorE LcSettingSetInt64 ( LC_CFS setting,
MK_I64 value )
inlinestatic

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

434 {
435 LC_INSTANCE_HDL(setting);
436 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_int64(setting->nat, value);
437 LcErrorE_Check(setting, errVal);
438 return MK_OK;
439 error:
440 return MK_ERROR;
441 }
LIBCONFIG_API int config_setting_set_int64(config_setting_t *setting, long long value)

◆ LcSettingSetInt64Elem()

static LC_CFS LcSettingSetInt64Elem ( LC_CFS setting,
MK_I32 idx,
MK_I64 value )
inlinestatic

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

368 {
369 LC_INSTANCE_HDL(setting);
370 return LcSettingC_ObjNew(config_setting_set_int64_elem(setting->nat, idx, value));
371 }
LIBCONFIG_API config_setting_t * config_setting_set_int64_elem(config_setting_t *setting, int idx, long long value)

◆ LcSettingSetInt64ElemP()

LC_CFS LcSettingSetInt64ElemP ( LC_CFS setting,
MK_I32 idx,
MK_I64 value )

Non-inline replacement for LcSettingSetInt64Elem

◆ LcSettingSetInt64P()

enum MkErrorE LcSettingSetInt64P ( LC_CFS setting,
MK_I64 value )

Non-inline replacement for LcSettingSetInt64

◆ LcSettingSetIntElem()

static LC_CFS LcSettingSetIntElem ( LC_CFS setting,
MK_I32 idx,
MK_I32 value )
inlinestatic

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

374 {
375 LC_INSTANCE_HDL(setting);
376 return LcSettingC_ObjNew(config_setting_set_int_elem(setting->nat, idx, value));
377 }
LIBCONFIG_API config_setting_t * config_setting_set_int_elem(config_setting_t *setting, int idx, int value)

◆ LcSettingSetIntElemP()

LC_CFS LcSettingSetIntElemP ( LC_CFS setting,
MK_I32 idx,
MK_I32 value )

Non-inline replacement for LcSettingSetIntElem

◆ LcSettingSetIntP()

enum MkErrorE LcSettingSetIntP ( LC_CFS setting,
MK_I32 value )

Non-inline replacement for LcSettingSetInt

◆ LcSettingSetString()

static enum MkErrorE LcSettingSetString ( LC_CFS setting,
MK_STRN value )
inlinestatic

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

444 {
445 LC_INSTANCE_HDL(setting);
446 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_string(setting->nat, value);
447 LcErrorE_Check(setting, errVal);
448 return MK_OK;
449 error:
450 return MK_ERROR;
451 }
LIBCONFIG_API int config_setting_set_string(config_setting_t *setting, const char *value)

◆ LcSettingSetStringElem()

static LC_CFS LcSettingSetStringElem ( LC_CFS setting,
MK_I32 idx,
MK_STRN value )
inlinestatic

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

380 {
381 LC_INSTANCE_HDL(setting);
382 return LcSettingC_ObjNew(config_setting_set_string_elem(setting->nat, idx, value));
383 }
LIBCONFIG_API config_setting_t * config_setting_set_string_elem(config_setting_t *setting, int idx, const char *value)

◆ LcSettingSetStringElemP()

LC_CFS LcSettingSetStringElemP ( LC_CFS setting,
MK_I32 idx,
MK_STRN value )

Non-inline replacement for LcSettingSetStringElem

◆ LcSettingSetStringP()

enum MkErrorE LcSettingSetStringP ( LC_CFS setting,
MK_STRN value )

Non-inline replacement for LcSettingSetString