cslcconfig 9.0
No Matches

The liblcconfig Project.


The cslcconfig package is a library for processing configuration files

using csmsgque.lcconfig;

The cslcconfig package is a composition of multiple classes defining the Programming-Language-Micro-Kernel:

object description
csmsgque.lcconfig the namespace with all cslcconfig specific definitions
csmsgque.lcconfig.Attribute the interface to access the package specific attribute
csmsgque.lcconfig.LcClassC.Attribute the interface to access the class specific attribute
Instance.Attribute the interface to access the instance specific attribute

To access all features without csmsgque.lcconfig prefix use:

using csmsgque.lcconfig;

Using the cslcconfig package …
To access the cslcconfig package the environment variable MONO_PATH have to include the directory.

> man mono

      Provides a search path to the runtime where to look for library
      files. This is a tool convenient for debugging applications, but
      should not be used by deployed applications as it breaks the assembly
      loader in subtle ways.
      Directories are separated by the platform path separator (colons on unix). Example:
      Relative paths are resolved based on the launch-time current directory.
      Alternative solutions to MONO_PATH include: installing libraries into
      the Global Assembly Cache (see gacutil(1)) or having the dependent
      libraries side-by-side with the main executable.
      For a complete description of recommended practices for application
      deployment, see

C# initialization hint


Philosophy ,
LcConfig PACKAGE , LcConfigC , LcSettingC ,


C-API: LC_C_API - The LcConfig API.

cslcconfig is a simple library for processing structured configuration files. The file format is more compact and more readable than XML. And unlike XML, it is type-aware, so it is not necessary to do string parsing in application code.

cslcconfig is very compact – a fraction of the size of the expat XML parser library. This makes it well-suited for memory-constrained systems like handheld devices.

The library includes bindings for languages supported by the Programming-Language-Micro-Kernel. It works on POSIX-compliant UNIX and UNIX-like systems (GNU/Linux, Mac OS X, FreeBSD), Android, and Windows (2000, XP and later).


cslcconfig is a library for reading, manipulating, and writing structured configuration files. The library features a fully reentrant parser and includes bindings for both the C and C++ programming languages.

The library runs on modern POSIX-compilant systems, such as Linux, Solaris, and Mac OS X (Darwin), as well as on Microsoft Windows 2000/XP and later (with either Microsoft Visual Studio 2005 or later, or the GNU toolchain via the MinGW environment).

Why Another Configuration File Library?

There are several open-source configuration file libraries available as of this writing. This library was written because each of those libraries falls short in one or more ways. The main features of libconfig that set it apart from the other libraries are:

  • A fully reentrant parser. Independent configurations can be parsed in concurrent threads at the same time.
  • Both C and C++ bindings, as well as hooks to allow for the creation of wrappers in other languages.
  • A simple, structured configuration file format that is more readable and compact than XML and more flexible than the obsolete but prevalent Windows ''INI'' file format.
  • A low-footprint implementation (just 37K for the C library and 76K for the C++ library) that is suitable for memory-constrained systems.
  • Proper documentation.

Multithreading Issues

cslcconfig is fully reentrant; the functions in the library do not make use of global variables and do not maintain state between successive calls. Therefore two independent configurations may be safely manipulated concurrently by two distinct threads.

cslcconfig is not thread-safe. The library is not aware of the presence of threads and knows nothing about the host system's threading model. Therefore, if an instance of a configuration is to be accessed from multiple threads, it must be suitably protected by synchronization mechanisms like read-write locks or mutexes; the standard rules for safe multithreaded access to shared data must be observed.

cslcconfig is not async-safe. Calls should not be made into the library from signal handlers, because some of the C library routines that it uses may not be async-safe.

cslcconfig is not guaranteed to be cancel-safe. Since it is not aware of the host system's threading model, the library does not contain any thread cancellation points. In most cases this will not be an issue for multithreaded programs. However, be aware that some of the routines in the library (namely those that read/write configurations from/to files or streams) perform I/O using C library routines which may potentially block; whether or not these C library routines are cancel-safe depends on the host system.

Internationalization Issues

cslcconfig does not natively support Unicode configuration files, but string values may contain Unicode text encoded in UTF-8; such strings will be treated as ordinary 8-bit ASCII text by the library. It is the responsibility of the calling program to perform the necessary conversions to/from wide (wchar_t) strings using the wide string conversion functions such as mbsrtowcs() and wcsrtombs() or the iconv() function of the libiconv library.

The textual representation of a floating point value varies by locale. However, the libconfig grammar specifies that floating point values are represented using a period ('.') as the radix symbol; this is consistent with the grammar of most programming languages. When a configuration is read in or written out, libconfig temporarily changes the LC_NUMERIC category of the locale of the calling thread to the ''C'' locale to ensure consistent handling of floating point values regardless of the locale(s) in use by the calling program.

Note that the MinGW environment does not (as of this writing) provide functions for changing the locale of the calling thread. Therefore, when using libconfig in that environment, the calling program is responsible for changing the LC_NUMERIC category of the locale to the "C" locale before reading or writing a configuration.

Configuration Files

cslcconfig supports structured, hierarchical configurations. These configurations can be read from and written to files and manipulated in memory.

A configuration consists of a group of settings, which associate names with values. A value can be one of the following:

  • A scalar value: integer, 64-bit integer, floating-point number, boolean, or string
  • An array, which is a sequence of scalar values, all of which must have the same type
  • A group, which is a collection of settings
  • A list, which is a sequence of values of any type, including other lists

Consider the following configuration file for a hypothetical GUI application, which illustrates all of the elements of the configuration file grammar.

# Example application configuration file
version = "1.0";
title = "My Application";
size = { w = 640; h = 480; };
pos = { x = 350; y = 250; };
list = ( ( "abc", 123, true ), 1.234, ( /\* an empty list *\/ ) );
books = ( { title = "Treasure Island";
author = "Robert Louis Stevenson";
price = 29.95;
qty = 5; },
{ title = "Snow Crash";
author = "Neal Stephenson";
price = 9.99;
qty = 8; } );
pi = 3.141592654;
bigint = 9223372036854775807L;
columns = [ "Last Name", "First Name", "MI" ];
bitmask = 0x1FC3; // hex
umask = 0027; // octal. Range limited to that of "int"

Settings can be uniquely identified within the configuration by a path. The path is a dot-separated sequence of names, beginning at a top-level group and ending at the setting itself. Each name in the path is the name of a setting; if the setting has no name because it is an element in a list or array, an integer index in square brackets can be used as the name.

For example, in our hypothetical configuration file, the path to the x setting is application.window.pos.x; the path to the version setting is simply version; and the path to the title setting of the second book in the books list is application.books.[1].title.

The datatype of a value is determined from the format of the value itself. If the value is enclosed in double quotes, it is treated as a string. If it looks like an integer or floating point number, it is treated as such. If it is one of the values TRUE, true, FALSE, or false (or any other mixed-case version of those tokens, e.g., True or FaLsE), it is treated as a boolean. If it consists of a comma-separated list of values enclosed in square brackets, it is treated as an array. And if it consists of a comma-separated list of values enclosed in parentheses, it is treated as a list. Any value which does not meet any of these criteria is considered invalid and results in a parse error.

All names are case-sensitive. They may consist only of alphanumeric characters, dashes ('-'), underscores ('_'), and asterisks ('*'), and must begin with a letter or asterisk. No other characters are allowed.

In C and C++, integer, 64-bit integer, floating point, and string values are mapped to the native types int, long long, double, and const char *, respectively. The boolean type is mapped to int in C and bool in C++.

The following sections describe the elements of the configuration file grammar in additional detail.


A setting has the form:

name = value ;


name : value ;

The trailing semicolon is optional. Whitespace is not significant.

The value may be a scalar value, an array, a group, or a list.


A group has the form:

{ settings ... }

Groups can contain any number of settings, but each setting must have a unique name within the group.


An array has the form:

[ value, value ... ]

An array may have zero or more elements, but the elements must all be scalar values of the same type.

The last element in an array may be followed by a comma, which will be ignored.


A list has the form:

( value, value ... )

A list may have zero or more elements, each of which can be a scalar value, an array, a group, or another list.

The last element in a list may be followed by a comma, which will be ignored.

Integer Values

Integers can be represented in one of two ways: as a series of one or more decimal digits ('0' - '9'), with an optional leading sign character ('+' or '-'); or as a hexadecimal value consisting of the characters '0x' followed by a series of one or more hexadecimal digits ('0' - '9', 'A' - 'F', 'a' - 'f'). Additionally, octal notation integers (that is, those having a leading zero with non-zero value) are also allowed.

64-bit Integer Values

Long long (64-bit) integers are represented identically to integers, except that an 'L' character is appended to indicate a 64-bit value. For example, '0L' indicates a 64-bit integer value 0. As of version 1.5 of the library, the trailing 'L' is optional; if the integer value exceeds the range of a 32-bit integer, it will automatically be interpreted as a 64-bit integer.

The integer and 64-bit integer setting types are interchangeable to the extent that a conversion between the corresponding native types would not result in an overflow or underflow. For example, a long long value can be written to a setting that has an integer type, if that value is within the range of an int. This rule applies to every API function or method that reads a value from or writes a value to a setting: if the type conversion would not result in an overflow or underflow, then the call will succeed, and otherwise it will fail. This behavior was not well-defined prior to version 1.7 of the library.

Floating Point Values

Floating point values consist of a series of one or more digits, one decimal point, an optional leading sign character ('+' or '-'), and an optional exponent. An exponent consists of the letter 'E' or 'e', an optional sign character, and a series of one or more digits.

Boolean Values

Boolean values may have one of the following values: 'true', 'false', or any mixed-case variation thereof.

String Values

String values consist of arbitrary text delimited by double quotes. Literal double quotes can be escaped by preceding them with a backslash: '\"'. The escape sequences '\\', '\f', '\n', '\r', and '\t' are also recognized, and have the usual meaning.

In addition, the '\x' escape sequence is supported; this sequence must be followed by exactly two hexadecimal digits, which represent an 8-bit ASCII value. For example, '\xFF' represents the character with ASCII code 0xFF.

No other escape sequences are currently supported.

Adjacent strings are automatically concatenated, as in C/C++ source code. This is useful for formatting very long strings as sequences of shorter strings. For example, the following constructs are equivalent:

  • "The quick brown fox jumped over the lazy dog."
  • "The quick brown fox"
    " jumped over the lazy dog."
  • "The quick" /* comment *\/ " brown fox " // another comment
    "jumped over the lazy dog."


Three types of comments are allowed within a configuration:

  • Script-style comments. All text beginning with a '#' character to the end of the line is ignored.
  • C-style comments. All text, including line breaks, between a starting '/*' sequence and an ending '*\/' sequence is ignored.
  • C++-style comments. All text beginning with a '//' sequence to the end of the line is ignored.

As expected, comment delimiters appearing within quoted strings are treated as literal text.

Comments are ignored when the configuration is read in, so they are not treated as part of the configuration. Therefore if the configuration is written back out to a stream, any comments that were present in the original configuration will be lost.

Include Directives

A configuration file may ''include'' the contents of other files using an include directive. This directive has the effect of inlining the contents of the named file(s) at the point of inclusion.

An include directive must appear on its own line in the input. It has the form:

@include "path"

The interpretation of path depends on the currently registered include function. The default include function prepends the include directory, if any, to path, and then interprets the result as a single, literal file path. The application may supply its own include function which does variable substitution, wildcard expansion, or other transformations, returning a list of zero or more paths to files whose contents should be inlined at the point of inclusion.

Any backslashes or double quotes in the path must be escaped as '\\' and '\"', respectively.

For example, consider the following two configuration files:

# file: quote.cfg
quote = "Criticism may not be agreeable, but it is necessary."
" It fulfils the same function as pain in the human"
" body. It calls attention to an unhealthy state of"
" things.\\n"
"\\t--Winston Churchill";
# file: test.cfg
info: {
name = "Winston Churchill";
@include "quote.cfg"
country = "UK";

The resulting configuration will be equivalent to one in which the contents of the file 'quote.cfg' appeared at the point where the include directive is placed.

Include files may be nested to a maximum of 10 levels; exceeding this limit results in a parse error.

When the path argument to an @include directive is a relative path, then it will be interpreted as being relative to the include directory that has been been set by means of ConfigSetIncludeDir. If no include directory has been set, then it will be taken as being relative to the program's current working directory.

Like comments, include directives are not part of the configuration file syntax. They are processed before the configuration itself is parsed. Therefore, they are not preserved when the configuration is written back out to a stream. There is presently no support for programmatically inserting include directives into a configuration.


This chapter describes the C library API. The type LcConfigC represents a configuration, and the type LcSettingC represents a configuration setting.

The boolean values CONFIG_TRUE and CONFIG_FALSE are macros defined as (1) and (0), respectively.


The libconfig library uses the GNU license:

and uses the official website for reference:

The following authors are involved :

author role
Mark Lindner Lead developer & maintainer.
Daniel Marjamäki Enhancements & bugfixes.
Andrew Tytula Windows port.
Glenn Herteg Enhancements, bugfixes, documentation corrections.
Matt Renaud Enhancements & bugfixes.
JoseLuis Tallon Enhancements & bugfixes


LcConfig ENUM

enum LcConfigFormatEset the format of a LcSettingC
ConfigFormatE_FromIntreturn the LcConfigFormatE from integer …
ConfigFormatE_ToIntNon-inline replacement for LcConfigFormatE_ToInt
ConfigFormatE_ToStringreturn the LcConfigFormatE as string …
enum LcConfigOptionsEFconfiguration options for config-file-layout
ConfigOptionsEF_FromIntreturn the LcConfigOptionsEF from integer …
ConfigOptionsEF_ToIntNon-inline replacement for LcConfigOptionsEF_ToInt
ConfigOptionsEF_ToStringBEGIN-LcConfigOptionsEF - created by 'c_MqS.tcl -i NHI1_HOME/theConfig/liblcconfig/.liblcconfig.meta' - DO NOT change.
enum LcConfigTypeE
ConfigTypeE_FromIntreturn the LcConfigTypeE from integer …
ConfigTypeE_ToIntNon-inline replacement for LcConfigTypeE_ToInt
ConfigTypeE_ToStringreturn the LcConfigTypeE as string …
enum LcErrorESignals an error and is used as the return value of a function …
ErrorE_FromIntreturn the LcErrorE from integer …
ErrorE_ToIntNon-inline replacement for LcErrorE_ToInt
ErrorE_ToStringreturn the LcErrorE as string …
enum LcErrorTypeE
ErrorTypeE_FromIntreturn the LcErrorTypeE from integer …
ErrorTypeE_ToIntNon-inline replacement for LcErrorTypeE_ToInt

return the LcErrorTypeE as string …

LcConfig SETUP

Cleanupcleanup cslcconfig internal memory …

setup cslcconfig internal memory …


C-API: LcConfig_C_API - The package is the toplevel structure of the Programming-Language-Micro-Kernel

The cslcconfig package is loaded with:

using csmsgque.lcconfig;

and is a composition of one or more package-item and exact one package-main.

The cslcconfig package add the following classes into MkObjectC_C_API :

Object C-Short Description
LcConfigC LC_CFG The LcConfigC object known as cfg or config is the main data structure …
LcSettingC LC_CFS The LcSettingC object known as cfs or setting is the main data structure.

The cslcconfig package add the following types into MkObjectC_C_API :

    ABSTRACT: MkTypeSTT (TypeTypeType = type of a TypeType)
    |- ABSTRACT: MkDefTypeSTT (TypeType = type of a Type)
       |- LcConfigST, LcSettingT

LcConfig ENUM

C-API: LcConfig_Enum_C_API - C-API: Internal - Enum definition - cslcconfig enum definition …

A enum in the Programming-Language-Micro-Kernel is a enum-data-type and 3 enum-access-attributes

  1. ENUM_ToString → return the string-value from the enum-value
  2. ENUM_ToInt → return the integer-value from the enum-value
  3. ENUM_FromInt → create an enum-value from an integer-value.

The enum-data-type and the 3 enum-access-attributes are defined in all target-languages (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO).

enum LcConfigFormatE


set the format of a LcSettingC … → API: csmsgque.lcconfig.LcConfigFormatE

[static] LcConfigFormatE ConfigFormatE_FromInt(int value)


return the LcConfigFormatE from integer … → API: csmsgque.lcconfig.LcConfig.ConfigFormatE_FromInt

reference for original

[static] int ConfigFormatE_ToInt(LcConfigFormatE value)


Non-inline replacement for LcConfigFormatE_ToInt … → API: csmsgque.lcconfig.LcConfig.ConfigFormatE_ToInt

[static] string ConfigFormatE_ToString(LcConfigFormatE value)


return the LcConfigFormatE as string … → API: csmsgque.lcconfig.LcConfig.ConfigFormatE_ToString

reference for original

enum LcConfigOptionsEF


configuration options for config-file-layout → API: csmsgque.lcconfig.LcConfigOptionsEF

[static] LcConfigOptionsEF ConfigOptionsEF_FromInt(int value)


return the LcConfigOptionsEF from integer … → API: csmsgque.lcconfig.LcConfig.ConfigOptionsEF_FromInt

reference for original

[static] int ConfigOptionsEF_ToInt(LcConfigOptionsEF value)


Non-inline replacement for LcConfigOptionsEF_ToInt … → API: csmsgque.lcconfig.LcConfig.ConfigOptionsEF_ToInt

[static] string ConfigOptionsEF_ToString(LcConfigOptionsEF value)


BEGIN-LcConfigOptionsEF - created by 'c_MqS.tcl -i NHI1_HOME/theConfig/liblcconfig/.liblcconfig.meta' - DO NOT change. → API: csmsgque.lcconfig.LcConfig.ConfigOptionsEF_ToString

return the LcConfigOptionsEF as string …

reference for original

enum LcConfigTypeE


→ API: csmsgque.lcconfig.LcConfigTypeE

[static] LcConfigTypeE ConfigTypeE_FromInt(int value)


return the LcConfigTypeE from integer … → API: csmsgque.lcconfig.LcConfig.ConfigTypeE_FromInt

reference for original

[static] int ConfigTypeE_ToInt(LcConfigTypeE value)


Non-inline replacement for LcConfigTypeE_ToInt … → API: csmsgque.lcconfig.LcConfig.ConfigTypeE_ToInt

[static] string ConfigTypeE_ToString(LcConfigTypeE value)


return the LcConfigTypeE as string … → API: csmsgque.lcconfig.LcConfig.ConfigTypeE_ToString

reference for original

enum LcErrorE


Signals an error and is used as the return value of a function … → API: csmsgque.lcconfig.LcErrorE

[static] LcErrorE ErrorE_FromInt(int value)


return the LcErrorE from integer … → API: csmsgque.lcconfig.LcConfig.ErrorE_FromInt

reference for original

[static] int ErrorE_ToInt(LcErrorE value)


Non-inline replacement for LcErrorE_ToInt … → API: csmsgque.lcconfig.LcConfig.ErrorE_ToInt

[static] string ErrorE_ToString(LcErrorE value)


return the LcErrorE as string … → API: csmsgque.lcconfig.LcConfig.ErrorE_ToString

reference for original

enum LcErrorTypeE


→ API: csmsgque.lcconfig.LcErrorTypeE

[static] LcErrorTypeE ErrorTypeE_FromInt(int value)


return the LcErrorTypeE from integer … → API: csmsgque.lcconfig.LcConfig.ErrorTypeE_FromInt

reference for original

[static] int ErrorTypeE_ToInt(LcErrorTypeE value)


Non-inline replacement for LcErrorTypeE_ToInt … → API: csmsgque.lcconfig.LcConfig.ErrorTypeE_ToInt

[static] string ErrorTypeE_ToString(LcErrorTypeE value)


return the LcErrorTypeE as string … → API: csmsgque.lcconfig.LcConfig.ErrorTypeE_ToString

reference for original

LcConfig SETUP

C-API: LcConfig_Setup_C_API - Setup und Cleanup the cslcconfig

For details about Setup and Cleanup usage refer to MkKernel_Setup_C_API

[static] Cleanup()


cleanup cslcconfig internal memory … → API: csmsgque.lcconfig.LcConfig.Cleanup

MkCleanup can only be called once and will be ignored if not called in the same thread as LcSetup. after a call to LcSetup the call to MkCleanup is possible again.

during cleanup objects will be deleted too -> the language interpreter have to be active

reference for original

[static] Setup()


setup cslcconfig internal memory … → API: csmsgque.lcconfig.LcConfig.Setup

LcSetup can only be called once, additional call's will be ignored until a LcCleanup is called.

reference for original




Non-inline replacement for LcConfigErrorType

LcConfigC GET

GetDefaultFormatNon-inline replacement for LcConfigGetDefaultFormat
GetFloatPrecisionNon-inline replacement for LcConfigGetFloatPrecision
GetIncludeDirNon-inline replacement for LcConfigGetIncludeDir
GetOptionNon-inline replacement for LcConfigGetOption
GetOptionsNon-inline replacement for LcConfigGetOptions

Non-inline replacement for LcConfigGetTabWidth


InstancesNon-inline replacement for LcConfigInstances
NextNon-inline replacement for LcConfigNext

Non-inline replacement for LcConfigPrev


LookupNon-inline replacement for LcConfigLookup
LookupBoolNon-inline replacement for LcConfigLookupBool
LookupFloatNon-inline replacement for LcConfigLookupFloat
LookupIntNon-inline replacement for LcConfigLookupInt
LookupInt64Non-inline replacement for LcConfigLookupInt64

Non-inline replacement for LcConfigLookupString

LcConfigC MISC

ClearNon-inline replacement for LcConfigClear
Loglog the config
ReadFileNon-inline replacement for LcConfigReadFile
ReadStringNon-inline replacement for LcConfigReadString
RootSettingNon-inline replacement for LcConfigRootSetting
WriteFileNon-inline replacement for LcConfigWriteFile

read the entire configuration cfg into the string val_out

LcConfigC SET

SetDefaultFormatNon-inline replacement for LcConfigSetDefaultFormat
SetFloatPrecisionNon-inline replacement for LcConfigSetFloatPrecision
SetIncludeDirNon-inline replacement for LcConfigSetIncludeDir
SetOptionNon-inline replacement for LcConfigSetOption
SetOptionsNon-inline replacement for LcConfigSetOptions
SetSettingDeleteFunccallback called on delete a setting, used to cleanup user data…

Non-inline replacement for LcConfigSetTabWidth

LcConfigC TOR

CreateNon-inline replacement for LcConfigCreate
FromHandleNon-inline replacement for LcConfigFromHandle

delete a LcConfigC instance …


C-API: LcConfigC_C_API - The LcConfigC object known as cfg or config is the main data structure …


C-API: LcConfigC_Error_C_API - various functions to set the configuration of the LcConfigC

LcErrorTypeE config.ErrorType()


Non-inline replacement for LcConfigErrorType … → API: csmsgque.lcconfig.LcConfigC.ErrorType

LcConfigC GET

C-API: LcConfigC_Get_C_API - various functions to get the configuration of the LcConfigC

LcConfigFormatE config.GetDefaultFormat()


Non-inline replacement for LcConfigGetDefaultFormat … → API: csmsgque.lcconfig.LcConfigC.GetDefaultFormat

short config.GetFloatPrecision()


Non-inline replacement for LcConfigGetFloatPrecision … → API: csmsgque.lcconfig.LcConfigC.GetFloatPrecision

string config.GetIncludeDir()


Non-inline replacement for LcConfigGetIncludeDir … → API: csmsgque.lcconfig.LcConfigC.GetIncludeDir

bool config.GetOption(LcConfigOptionsEF option)


Non-inline replacement for LcConfigGetOption … → API: csmsgque.lcconfig.LcConfigC.GetOption

LcConfigOptionsEF config.GetOptions()


Non-inline replacement for LcConfigGetOptions … → API: csmsgque.lcconfig.LcConfigC.GetOptions

short config.GetTabWidth()


Non-inline replacement for LcConfigGetTabWidth … → API: csmsgque.lcconfig.LcConfigC.GetTabWidth


C-API: LcConfigC_Introspection_C_API - Get information about all instances created by class

[static] LcConfigC LcConfigC.Instances()


Non-inline replacement for LcConfigInstances … → API: csmsgque.lcconfig.LcConfigC.Instances

LcConfigC cfg.Next()


Non-inline replacement for LcConfigNext … → API: csmsgque.lcconfig.LcConfigC.Next

LcConfigC cfg.Prev()


Non-inline replacement for LcConfigPrev … → API: csmsgque.lcconfig.LcConfigC.Prev


C-API: LcConfigC_Lookup_C_API - locates the setting in the configuration and return the data or an LcSettingC

This function locates the setting in the configuration config specified by the path path. It returns a pointer to the LcSettingC structure on success, or NULL if the setting was not found.

LcSettingC config.Lookup(string path)


Non-inline replacement for LcConfigLookup … → API: csmsgque.lcconfig.LcConfigC.Lookup

bool config.LookupBool(string path)


Non-inline replacement for LcConfigLookupBool … → API: csmsgque.lcconfig.LcConfigC.LookupBool

double config.LookupFloat(string path)


Non-inline replacement for LcConfigLookupFloat … → API: csmsgque.lcconfig.LcConfigC.LookupFloat

int config.LookupInt(string path)


Non-inline replacement for LcConfigLookupInt … → API: csmsgque.lcconfig.LcConfigC.LookupInt

long config.LookupInt64(string path)


Non-inline replacement for LcConfigLookupInt64 … → API: csmsgque.lcconfig.LcConfigC.LookupInt64

string config.LookupString(string path)


Non-inline replacement for LcConfigLookupString … → API: csmsgque.lcconfig.LcConfigC.LookupString

LcConfigC MISC

C-API: LcConfigC_Misc_C_API - various functions to perform misc operations on a LcConfigC



Non-inline replacement for LcConfigClear … → API: csmsgque.lcconfig.LcConfigC.Clear

cfg.Log(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0)


log the config … → API: csmsgque.lcconfig.LcConfigC.Log

[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]cfgProgramming-Language-Micro-Kernel instance from config_t
[in]fmtobjmanaged object used to format the log-message (default=NULL = use default format)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]lvla user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0)

config.ReadFile(string filename)


Non-inline replacement for LcConfigReadFile … → API: csmsgque.lcconfig.LcConfigC.ReadFile

config.ReadString(string str)


Non-inline replacement for LcConfigReadString … → API: csmsgque.lcconfig.LcConfigC.ReadString

LcSettingC config.RootSetting()


Non-inline replacement for LcConfigRootSetting … → API: csmsgque.lcconfig.LcConfigC.RootSetting

config.WriteFile(string filename)


Non-inline replacement for LcConfigWriteFile … → API: csmsgque.lcconfig.LcConfigC.WriteFile

string cfg.WriteString()


read the entire configuration cfg into the string val_out … → API: csmsgque.lcconfig.LcConfigC.WriteString

[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]cfgProgramming-Language-Micro-Kernel instance from config_t
[out]val_outthe entire configuration as string - value owed by string cfg.WriteString() .
set the MkErrorC to the status MK_OK, MK_CONTINUE or MK_ERROR

LcConfigC SET

C-API: LcConfigC_Set_C_API - various functions to set the configuration of the LcConfigC

config.SetDefaultFormat(LcConfigFormatE format)


Non-inline replacement for LcConfigSetDefaultFormat … → API: csmsgque.lcconfig.LcConfigC.SetDefaultFormat

config.SetFloatPrecision(short digits)


Non-inline replacement for LcConfigSetFloatPrecision … → API: csmsgque.lcconfig.LcConfigC.SetFloatPrecision

config.SetIncludeDir(string include_dir)


Non-inline replacement for LcConfigSetIncludeDir … → API: csmsgque.lcconfig.LcConfigC.SetIncludeDir

cfg.SetIncludeFunc(LcConfigIncludeF fConfigIncludeData)


→ API: csmsgque.lcconfig.LcConfigC.SetIncludeFunc

config.SetOption(LcConfigOptionsEF option, bool flag)


Non-inline replacement for LcConfigSetOption … → API: csmsgque.lcconfig.LcConfigC.SetOption

config.SetOptions(LcConfigOptionsEF options)


Non-inline replacement for LcConfigSetOptions … → API: csmsgque.lcconfig.LcConfigC.SetOptions

cfg.SetSettingDeleteFunc(LcSettingDeleteF fSettingDeleteData)


callback called on delete a setting, used to cleanup user data… → API: csmsgque.lcconfig.LcConfigC.SetSettingDeleteFunc

config.SetTabWidth(short width)


Non-inline replacement for LcConfigSetTabWidth … → API: csmsgque.lcconfig.LcConfigC.SetTabWidth

LcConfigC TOR

C-API: LcConfigC_TOR_C_API - various functions to create, initialize and destroy a LcConfigC

[constructor] LcConfigC.Create()


Non-inline replacement for LcConfigCreate … → API: csmsgque.lcconfig.LcConfigC.Create

[static] LcConfigC LcConfigC.FromHandle(long exporthdl)


Non-inline replacement for LcConfigFromHandle … → API: csmsgque.lcconfig.LcConfigC.FromHandle

[destructor] cfg.Delete()


delete a LcConfigC instance … → API: LcConfigDelete_RT


LcSettingC GET

GetBoolNon-inline replacement for LcSettingGetBool
GetBoolElemNon-inline replacement for LcSettingGetBoolElem
GetConfigNon-inline replacement for LcSettingGetConfig
GetElemNon-inline replacement for LcSettingGetElem
GetFloatNon-inline replacement for LcSettingGetFloat
GetFloatElemNon-inline replacement for LcSettingGetFloatElem
GetFormatNon-inline replacement for LcSettingGetFormat
GetIntNon-inline replacement for LcSettingGetInt
GetInt64Non-inline replacement for LcSettingGetInt64
GetInt64ElemNon-inline replacement for LcSettingGetInt64Elem
GetIntElemNon-inline replacement for LcSettingGetIntElem
GetMemberNon-inline replacement for LcSettingGetMember
GetStringNon-inline replacement for LcSettingGetString

Non-inline replacement for LcSettingGetStringElem


InstancesNon-inline replacement for LcSettingInstances
NextNon-inline replacement for LcSettingNext

Non-inline replacement for LcSettingPrev

LcSettingC IS

IsAggregateNon-inline replacement for LcSettingIsAggregate
IsArrayNon-inline replacement for LcSettingIsArray
IsGroupNon-inline replacement for LcSettingIsGroup
IsListNon-inline replacement for LcSettingIsList
IsNumberNon-inline replacement for LcSettingIsNumber
IsRootNon-inline replacement for LcSettingIsRoot

Non-inline replacement for LcSettingIsScalar


LookupNon-inline replacement for LcSettingLookup
LookupAlladdon - read an entire configuration below setting into MkBufferListC
LookupBoolNon-inline replacement for LcSettingLookupBool
LookupFloatNon-inline replacement for LcSettingLookupFloat
LookupIntNon-inline replacement for LcSettingLookupInt
LookupInt64Non-inline replacement for LcSettingLookupInt64

Non-inline replacement for LcSettingLookupString

LcSettingC MISC

AddIfNotExistsNon-inline replacement for LcSettingAddIfNotExists
ExistsNon-inline replacement for LcSettingExists
IndexNon-inline replacement for LcSettingIndex
LengthNon-inline replacement for LcSettingLength
Loglog the setting
NameNon-inline replacement for LcSettingName
ParentNon-inline replacement for LcSettingParent
RemoveNon-inline replacement for LcSettingRemove
RemoveElemNon-inline replacement for LcSettingRemoveElem
SourceFileNon-inline replacement for LcSettingSourceFile
SourceLineNon-inline replacement for LcSettingSourceLine

Non-inline replacement for LcSettingType

LcSettingC SET

SetBoolNon-inline replacement for LcSettingSetBool
SetBoolElemNon-inline replacement for LcSettingSetBoolElem
SetFloatNon-inline replacement for LcSettingSetFloat
SetFloatElemNon-inline replacement for LcSettingSetFloatElem
SetFormatNon-inline replacement for LcSettingSetFormat
SetIntNon-inline replacement for LcSettingSetInt
SetInt64Non-inline replacement for LcSettingSetInt64
SetInt64ElemNon-inline replacement for LcSettingSetInt64Elem
SetIntElemNon-inline replacement for LcSettingSetIntElem
SetStringNon-inline replacement for LcSettingSetString

Non-inline replacement for LcSettingSetStringElem

LcSettingC TOR

FromHandleNon-inline replacement for LcSettingFromHandle

Non-inline replacement for LcSettingAdd


C-API: LcSettingC_C_API - The LcSettingC object known as cfs or setting is the main data structure.

LcSettingC GET

C-API: LcSettingC_Get_C_API - various functions to get data from a LcSettingC

bool setting.GetBool()


Non-inline replacement for LcSettingGetBool … → API: csmsgque.lcconfig.LcSettingC.GetBool

bool setting.GetBoolElem(int idx)


Non-inline replacement for LcSettingGetBoolElem … → API: csmsgque.lcconfig.LcSettingC.GetBoolElem

LcConfigC setting.GetConfig()


Non-inline replacement for LcSettingGetConfig … → API: csmsgque.lcconfig.LcSettingC.GetConfig

LcSettingC setting.GetElem(int idx)


Non-inline replacement for LcSettingGetElem … → API: csmsgque.lcconfig.LcSettingC.GetElem

double setting.GetFloat()


Non-inline replacement for LcSettingGetFloat … → API: csmsgque.lcconfig.LcSettingC.GetFloat

double setting.GetFloatElem(int idx)


Non-inline replacement for LcSettingGetFloatElem … → API: csmsgque.lcconfig.LcSettingC.GetFloatElem

LcConfigFormatE setting.GetFormat()


Non-inline replacement for LcSettingGetFormat … → API: csmsgque.lcconfig.LcSettingC.GetFormat

int setting.GetInt()


Non-inline replacement for LcSettingGetInt … → API: csmsgque.lcconfig.LcSettingC.GetInt

long setting.GetInt64()


Non-inline replacement for LcSettingGetInt64 … → API: csmsgque.lcconfig.LcSettingC.GetInt64

long setting.GetInt64Elem(int idx)


Non-inline replacement for LcSettingGetInt64Elem … → API: csmsgque.lcconfig.LcSettingC.GetInt64Elem

int setting.GetIntElem(int idx)


Non-inline replacement for LcSettingGetIntElem … → API: csmsgque.lcconfig.LcSettingC.GetIntElem

LcSettingC setting.GetMember(string name)


Non-inline replacement for LcSettingGetMember … → API: csmsgque.lcconfig.LcSettingC.GetMember

string setting.GetString()


Non-inline replacement for LcSettingGetString … → API: csmsgque.lcconfig.LcSettingC.GetString

string setting.GetStringElem(int idx)


Non-inline replacement for LcSettingGetStringElem … → API: csmsgque.lcconfig.LcSettingC.GetStringElem


C-API: LcSettingC_Introspection_C_API - Get information about all instances created by class

reference: MkObjectC_Introspection_C_API

[static] LcSettingC LcSettingC.Instances()


Non-inline replacement for LcSettingInstances … → API: csmsgque.lcconfig.LcSettingC.Instances

LcSettingC cfs.Next()


Non-inline replacement for LcSettingNext … → API: csmsgque.lcconfig.LcSettingC.Next

LcSettingC cfs.Prev()


Non-inline replacement for LcSettingPrev … → API: csmsgque.lcconfig.LcSettingC.Prev

LcSettingC IS

C-API: LcSettingC_Is_C_API - various functions to check the data-type from a LcSettingC

bool setting.IsAggregate()


Non-inline replacement for LcSettingIsAggregate … → API: csmsgque.lcconfig.LcSettingC.IsAggregate

bool setting.IsArray()


Non-inline replacement for LcSettingIsArray … → API: csmsgque.lcconfig.LcSettingC.IsArray

bool setting.IsGroup()


Non-inline replacement for LcSettingIsGroup … → API: csmsgque.lcconfig.LcSettingC.IsGroup

bool setting.IsList()


Non-inline replacement for LcSettingIsList … → API: csmsgque.lcconfig.LcSettingC.IsList

bool setting.IsNumber()


Non-inline replacement for LcSettingIsNumber … → API: csmsgque.lcconfig.LcSettingC.IsNumber

bool setting.IsRoot()


Non-inline replacement for LcSettingIsRoot … → API: csmsgque.lcconfig.LcSettingC.IsRoot

bool setting.IsScalar()


Non-inline replacement for LcSettingIsScalar … → API: csmsgque.lcconfig.LcSettingC.IsScalar


C-API: LcSettingC_Lookup_C_API - locates the setting in the configuration and return the data or an LcSettingC

In contrast to LcConfigC_Lookup_C_API, the path relative to the LcSettingC is used here.

LcSettingC setting.Lookup(string path)


Non-inline replacement for LcSettingLookup … → API: csmsgque.lcconfig.LcSettingC.Lookup

MkBufferListC setting.LookupAll()


addon - read an entire configuration below setting into MkBufferListC … → API: csmsgque.lcconfig.LcSettingC.LookupAll

instand of MkBufferListC owned by MkBufferListC setting.LookupAll()

reference for original

bool setting.LookupBool(string name)


Non-inline replacement for LcSettingLookupBool … → API: csmsgque.lcconfig.LcSettingC.LookupBool

double setting.LookupFloat(string name)


Non-inline replacement for LcSettingLookupFloat … → API: csmsgque.lcconfig.LcSettingC.LookupFloat

int setting.LookupInt(string name)


Non-inline replacement for LcSettingLookupInt … → API: csmsgque.lcconfig.LcSettingC.LookupInt

long setting.LookupInt64(string name)


Non-inline replacement for LcSettingLookupInt64 … → API: csmsgque.lcconfig.LcSettingC.LookupInt64

string setting.LookupString(string name)


Non-inline replacement for LcSettingLookupString … → API: csmsgque.lcconfig.LcSettingC.LookupString

LcSettingC MISC

C-API: LcSettingC_Misc_C_API - various functions to perform misc operationis on a LcSettingC

LcSettingC setting.AddIfNotExists(string name, LcConfigTypeE cfgtype)


Non-inline replacement for LcSettingAddIfNotExists … → API: csmsgque.lcconfig.LcSettingC.AddIfNotExists

bool setting.Exists(string name)


Non-inline replacement for LcSettingExists … → API: csmsgque.lcconfig.LcSettingC.Exists

int setting.Index()


Non-inline replacement for LcSettingIndex … → API: csmsgque.lcconfig.LcSettingC.Index

int setting.Length()


Non-inline replacement for LcSettingLength … → API: csmsgque.lcconfig.LcSettingC.Length

setting.Log(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0)


log the setting … → API: csmsgque.lcconfig.LcSettingC.Log

[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]settingsame as config_setting_t
[in]fmtobjmanaged object used to format the log-message (default=NULL = use default format)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]lvla user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0)

string setting.Name()


Non-inline replacement for LcSettingName … → API: csmsgque.lcconfig.LcSettingC.Name

LcSettingC setting.Parent()


Non-inline replacement for LcSettingParent … → API: csmsgque.lcconfig.LcSettingC.Parent

parent.Remove(string name)


Non-inline replacement for LcSettingRemove … → API: csmsgque.lcconfig.LcSettingC.Remove

parent.RemoveElem(int idx)


Non-inline replacement for LcSettingRemoveElem … → API: csmsgque.lcconfig.LcSettingC.RemoveElem

string setting.SourceFile()


Non-inline replacement for LcSettingSourceFile … → API: csmsgque.lcconfig.LcSettingC.SourceFile

int setting.SourceLine()


Non-inline replacement for LcSettingSourceLine … → API: csmsgque.lcconfig.LcSettingC.SourceLine

LcConfigTypeE setting.Type()


Non-inline replacement for LcSettingType … → API: csmsgque.lcconfig.LcSettingC.Type

LcSettingC SET

C-API: LcSettingC_Set_C_API - 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.

setting.SetBool(bool value)


Non-inline replacement for LcSettingSetBool … → API: csmsgque.lcconfig.LcSettingC.SetBool

LcSettingC setting.SetBoolElem(int idx, int value)


Non-inline replacement for LcSettingSetBoolElem … → API: csmsgque.lcconfig.LcSettingC.SetBoolElem

setting.SetFloat(double value)


Non-inline replacement for LcSettingSetFloat … → API: csmsgque.lcconfig.LcSettingC.SetFloat

LcSettingC setting.SetFloatElem(int idx, double value)


Non-inline replacement for LcSettingSetFloatElem … → API: csmsgque.lcconfig.LcSettingC.SetFloatElem

setting.SetFormat(LcConfigFormatE format)


Non-inline replacement for LcSettingSetFormat … → API: csmsgque.lcconfig.LcSettingC.SetFormat

setting.SetInt(int value)


Non-inline replacement for LcSettingSetInt … → API: csmsgque.lcconfig.LcSettingC.SetInt

setting.SetInt64(long value)


Non-inline replacement for LcSettingSetInt64 … → API: csmsgque.lcconfig.LcSettingC.SetInt64

LcSettingC setting.SetInt64Elem(int idx, long value)


Non-inline replacement for LcSettingSetInt64Elem … → API: csmsgque.lcconfig.LcSettingC.SetInt64Elem

LcSettingC setting.SetIntElem(int idx, int value)


Non-inline replacement for LcSettingSetIntElem … → API: csmsgque.lcconfig.LcSettingC.SetIntElem

setting.SetString(string value)


Non-inline replacement for LcSettingSetString … → API: csmsgque.lcconfig.LcSettingC.SetString

LcSettingC setting.SetStringElem(int idx, string value)


Non-inline replacement for LcSettingSetStringElem … → API: csmsgque.lcconfig.LcSettingC.SetStringElem

LcSettingC TOR

C-API: LcSettingC_TOR_C_API - various functions to create, initialize and destroy a LcSettingC

A new LcSettingC is not created directly but is the return value of a "lookup".
The two functions:

need the unique path of the "setting" in the configuration file.

[static] LcSettingC LcSettingC.FromHandle(long exporthdl)


Non-inline replacement for LcSettingFromHandle … → API: csmsgque.lcconfig.LcSettingC.FromHandle

[constructor] parent.Add(string name, LcConfigTypeE __type)


Non-inline replacement for LcSettingAdd … → API: csmsgque.lcconfig.LcSettingC.Add



liblcconfig, cclcconfig, cslcconfig, javalcconfig, golcconfig, pylcconfig, rubylcconfig, tcllcconfig, perllcconfig, phplcconfig


C#, unix, libconfig