theConfig 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
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 233 of file config_overload_lc.h.

◆ LcSettingSetBool_E

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

Definition at line 232 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 235 of file config_overload_lc.h.

◆ LcSettingSetFloat_E

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

Definition at line 234 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 237 of file config_overload_lc.h.

◆ LcSettingSetFormat_E

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

Definition at line 236 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 241 of file config_overload_lc.h.

◆ LcSettingSetInt64_E

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

Definition at line 240 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 239 of file config_overload_lc.h.

◆ LcSettingSetInt_E

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

Definition at line 238 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 243 of file config_overload_lc.h.

◆ LcSettingSetString_E

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

Definition at line 242 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 391 of file LcSettingC_lc.h.

391 {
392 LC_INSTANCE_HDL(setting);
393 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_bool(setting->nat, value);
394 LcErrorE_Check(setting, errVal);
395 return MK_OK;
396 error:
397 return MK_ERROR;
398 }
LcErrorE
Signals an error and is used as the return value of a function …
Definition LcEnum_lc.h:191
#define LcErrorE_Check(lc_hdl, PROC)
check on a tcllcconfig error and convert into a tcllcconfig 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
+ Here is the caller graph for this function:

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

359 {
360 LC_INSTANCE_HDL(setting);
361 return LcSettingC_ObjNew(config_setting_set_bool_elem(setting->nat, idx, value));
362 }
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)
+ Here is the caller graph for this function:

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

401 {
402 LC_INSTANCE_HDL(setting);
403 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_float(setting->nat, value);
404 LcErrorE_Check(setting, errVal);
405 return MK_OK;
406 error:
407 return MK_ERROR;
408 }
LIBCONFIG_API int config_setting_set_float(config_setting_t *setting, double value)
+ Here is the caller graph for this function:

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

365 {
366 LC_INSTANCE_HDL(setting);
367 return LcSettingC_ObjNew(config_setting_set_float_elem(setting->nat, idx, value));
368 }
LIBCONFIG_API config_setting_t * config_setting_set_float_elem(config_setting_t *setting, int idx, double value)
+ Here is the caller graph for this function:

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

411 {
412 LC_INSTANCE_HDL(setting);
413 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_format(setting->nat, format);
414 LcErrorE_Check(setting, errVal);
415 return MK_OK;
416 error:
417 return MK_ERROR;
418 }
LIBCONFIG_API int config_setting_set_format(config_setting_t *setting, short format)
+ Here is the caller graph for this function:

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

421 {
422 LC_INSTANCE_HDL(setting);
423 config_setting_set_hook(setting->nat, (MK_PTR)(hook));
424 }
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 427 of file LcSettingC_lc.h.

427 {
428 LC_INSTANCE_HDL(setting);
429 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_int(setting->nat, value);
430 LcErrorE_Check(setting, errVal);
431 return MK_OK;
432 error:
433 return MK_ERROR;
434 }
LIBCONFIG_API int config_setting_set_int(config_setting_t *setting, int value)
+ Here is the caller graph for this function:

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

437 {
438 LC_INSTANCE_HDL(setting);
439 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_int64(setting->nat, value);
440 LcErrorE_Check(setting, errVal);
441 return MK_OK;
442 error:
443 return MK_ERROR;
444 }
LIBCONFIG_API int config_setting_set_int64(config_setting_t *setting, long long value)
+ Here is the caller graph for this function:

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

371 {
372 LC_INSTANCE_HDL(setting);
373 return LcSettingC_ObjNew(config_setting_set_int64_elem(setting->nat, idx, value));
374 }
LIBCONFIG_API config_setting_t * config_setting_set_int64_elem(config_setting_t *setting, int idx, long long value)
+ Here is the caller graph for this function:

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

377 {
378 LC_INSTANCE_HDL(setting);
379 return LcSettingC_ObjNew(config_setting_set_int_elem(setting->nat, idx, value));
380 }
LIBCONFIG_API config_setting_t * config_setting_set_int_elem(config_setting_t *setting, int idx, int value)
+ Here is the caller graph for this function:

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

447 {
448 LC_INSTANCE_HDL(setting);
449 enum LcErrorE errVal = (enum LcErrorE)config_setting_set_string(setting->nat, value);
450 LcErrorE_Check(setting, errVal);
451 return MK_OK;
452 error:
453 return MK_ERROR;
454 }
LIBCONFIG_API int config_setting_set_string(config_setting_t *setting, const char *value)
+ Here is the caller graph for this function:

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

383 {
384 LC_INSTANCE_HDL(setting);
385 return LcSettingC_ObjNew(config_setting_set_string_elem(setting->nat, idx, value));
386 }
LIBCONFIG_API config_setting_t * config_setting_set_string_elem(config_setting_t *setting, int idx, const char *value)
+ Here is the caller graph for this function:

◆ 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