LcSettingC - various functions to perform misc operations … More...
Collaboration diagram for LcSettingC_Misc_C_API:Functions | |
| void | liblcconfig::LcSettingLog_RT (MK_RT mkrt, LC_CFSN const setting, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl) |
| log the setting … | |
| static LC_CFS | liblcconfig::LcSettingParent (LC_CFSN setting) |
This function returns the parent setting of the given setting, or NULL if setting is the root setting … | |
| static MK_I32 | liblcconfig::LcSettingIndex (LC_CFSN setting) |
| This function returns the index of the given setting within its parent setting … | |
| static MK_I32 | liblcconfig::LcSettingLength (LC_CFSN setting) |
| This function returns the number of settings in a group, or the number of elements in a list or array … | |
| static MK_STRN | liblcconfig::LcSettingName (LC_CFSN setting) |
This function returns the name of the given setting, or NULL if the setting has no name … | |
| static enum MkErrorE | liblcconfig::LcSettingRemove (LC_CFS parent, MK_STRN name) |
| This function removes and destroys the setting named name from the parent setting parent, which must be a group … | |
| static enum MkErrorE | liblcconfig::LcSettingRemoveElem (LC_CFS parent, MK_I32 idx) |
| This function removes the child setting at the given index index from the setting parent, which must be a group, list, or array … | |
| static MK_STRN | liblcconfig::LcSettingSourceFile (LC_CFSN setting) |
| This function returns the name of the file from which the setting setting was read, or NULL if the setting was not read from a file … | |
| static MK_I32 | liblcconfig::LcSettingSourceLine (LC_CFSN setting) |
| This function returns the line number of the configuration file or stream at which the setting setting was read, or 0 if no line number is available … | |
| static enum LcConfigTypeE | liblcconfig::LcSettingType (LC_CFSN setting) |
| This function returns the type of the given setting … | |
| static LC_CFS | liblcconfig::LcSettingAddIfNotExists (LC_CFS setting, MK_STRN name, enum LcConfigTypeE cfgtype) |
| addon - add name with type only if not exists in the setting … | |
| static bool | liblcconfig::LcSettingExists (const LC_CFS setting, MK_STRN name) |
| addon - return true if name exists in the setting otherwise false … | |
LcSettingC - LcSettingC_Misc_C_API - overload | |
| #define | LcSettingLog_NULL(...) |
| #define | LcSettingLog(...) |
| #define | LcSettingLog_4(setting, fmtobj, debug, callfunc) |
| #define | LcSettingLog_3(setting, fmtobj, debug) |
| #define | LcSettingLog_2(setting, fmtobj) |
| #define | LcSettingLog_1(setting) |
| #define | LcSettingRemove_E(...) |
| #define | LcSettingRemove_C(...) |
| #define | LcSettingRemoveElem_E(...) |
| #define | LcSettingRemoveElem_C(...) |
LcSettingC - various functions to perform misc operations …
| #define LcSettingLog | ( | ... | ) |
Definition at line 211 of file config_overload_lc.h.
| #define LcSettingLog_1 | ( | setting | ) |
Definition at line 215 of file config_overload_lc.h.
| #define LcSettingLog_2 | ( | setting, | |
| fmtobj ) |
Definition at line 214 of file config_overload_lc.h.
| #define LcSettingLog_3 | ( | setting, | |
| fmtobj, | |||
| debug ) |
Definition at line 213 of file config_overload_lc.h.
| #define LcSettingLog_4 | ( | setting, | |
| fmtobj, | |||
| debug, | |||
| callfunc ) |
Definition at line 212 of file config_overload_lc.h.
| #define LcSettingLog_NULL | ( | ... | ) |
Definition at line 210 of file config_overload_lc.h.
| #define LcSettingRemove_C | ( | ... | ) |
Definition at line 217 of file config_overload_lc.h.
| #define LcSettingRemove_E | ( | ... | ) |
Definition at line 216 of file config_overload_lc.h.
| #define LcSettingRemoveElem_C | ( | ... | ) |
Definition at line 219 of file config_overload_lc.h.
| #define LcSettingRemoveElem_E | ( | ... | ) |
Definition at line 218 of file config_overload_lc.h.
|
inlinestatic |
addon - add name with type only if not exists in the setting …
If parent is an array or list, the name parameter is ignored and may be NULL.
The function returns the new setting on success, or NULL if parent is not a group, array, or list; or if there is already a child setting of parent named name; or if type is invalid. If type is a scalar type, the new setting will have a default value of 0, 0.0, false, or NULL, as appropriate.
Definition at line 474 of file LcSettingC_lc.h.
Here is the caller graph for this function:addon - return true if name exists in the setting otherwise false …
Same as LcSettingGetMember but only test on exists
Definition at line 499 of file LcSettingC_lc.h.
Here is the caller graph for this function:This function returns the index of the given setting within its parent setting …
If setting is the root setting, this function returns -1.
Definition at line 293 of file LcSettingC_lc.h.
Here is the caller graph for this function:This function returns the number of settings in a group, or the number of elements in a list or array …
For other types of settings, it returns 0.
Definition at line 299 of file LcSettingC_lc.h.
Here is the caller graph for this function:| void liblcconfig::LcSettingLog_RT | ( | MK_RT | mkrt, |
| LC_CFSN const | setting, | ||
| MK_OBJN | fmtobj, | ||
| MK_DBG const | debug, | ||
| MK_STRN const | callfunc, | ||
| MK_I32 const | lvl ) |
log the setting …
| [in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
| [in] | setting | same as config_setting_t |
| [in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
| [in] | debug | the debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0) |
| [in] | callfunc | a user-defined postfix to identify the calling-function or the environment (default = name-of-function, MK_NULL = resolve-own-name) |
| [in] | lvl | a user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0) |
This function returns the name of the given setting, or NULL if the setting has no name …
Storage for the returned string is managed by the library and released automatically when the setting is destroyed; the string must not be freed by the caller.
Definition at line 305 of file LcSettingC_lc.h.
Here is the caller graph for this function:This function returns the parent setting of the given setting, or NULL if setting is the root setting …
Definition at line 285 of file LcSettingC_lc.h.
Here is the caller graph for this function:This function removes and destroys the setting named name from the parent setting parent, which must be a group …
Any child settings of the setting are recursively destroyed as well.
The name parameter can also specify a setting path relative to the provided parent. (In that case, the setting will be looked up and removed.)
The function returns CONFIG_TRUE on success. If parent is not a group, or if it has no setting with the given name, it returns CONFIG_FALSE.
Definition at line 312 of file LcSettingC_lc.h.
Here is the caller graph for this function:This function removes the child setting at the given index index from the setting parent, which must be a group, list, or array …
Any child settings of the removed setting are recursively destroyed as well.
The function returns CONFIG_TRUE on success. If parent is not a group, list, or array, or if index is out of range, it returns CONFIG_FALSE.
Definition at line 322 of file LcSettingC_lc.h.
Here is the caller graph for this function:This function returns the name of the file from which the setting setting was read, or NULL if the setting was not read from a file …
This information is useful for reporting application-level errors. Storage for the returned string is managed by the library and released automatically when the configuration is destroyed; the string must not be freed by the caller.
Definition at line 332 of file LcSettingC_lc.h.
Here is the caller graph for this function:This function returns the line number of the configuration file or stream at which the setting setting was read, or 0 if no line number is available …
This information is useful for reporting application-level errors.
Definition at line 339 of file LcSettingC_lc.h.
Here is the caller graph for this function:
|
inlinestatic |
This function returns the type of the given setting …
The return value is one of the constants CONFIG_TYPE_INT, CONFIG_TYPE_INT64, CONFIG_TYPE_FLOAT, CONFIG_TYPE_STRING, CONFIG_TYPE_BOOL, CONFIG_TYPE_ARRAY, CONFIG_TYPE_LIST, or CONFIG_TYPE_GROUP.
Definition at line 345 of file LcSettingC_lc.h.
Here is the caller graph for this function: