Next: , Previous: Configuration contexts, Up: Configuration functions


2.4.2 Configuration parameters

A gEDA configuration parameter consists of three components:

Group
A string which identifies the general category in which the parameter lies (e.g. which application and/or plugin).
Name
A string which specifically identifies the parameter within the group.
Value
The value of the parameter. This is stored as a string, but can be converted to a number of possible scalar and list types.

Groups, names and values are all case-sensitive.

2.4.2.1 Configuration groups and keys
— Function: config-groups cfg

Returns a list of all groups available in cfg and its parent contexts.

— Function: config-has-group? cfg group

Determines whether cfg or its parent contexts contain the specified group

— Function: config-keys cfg group

Returns a list of all keys available in the specified group in cfg and its parent contexts.

— Function: config-has-key? cfg group key

Determines whether cfg or its parent contexts contains key in the specified group.

2.4.2.2 Configuration inheritance

If a configuration context does not directly specify a value for a configuration parameter, it inherits the value from its parent context.

See Context parents.

— Function: config-inherited? cfg group key

Returns ‘#f’ if value of the configuration parameter with the given group and key is specified in the context cfg, and ‘#t’ if it is inherited from a parent context of cfg.

— Function: config-source cfg group key

Returns the configuration context (either cfg or one of its parent contexts) in which the configuration parameter with the given group and key has its value defined.

2.4.2.3 Configuration values

Each value is stored as a UTF-8 string in the configuration file. However, this string can be parsed a several different types. All of the following types are supported:

In addition, lists of all the above are supported.

— Function: config-string cfg group key

Retrieve configuration value as a string.

— Function: config-boolean cfg group key

Retrieve configuration value as a boolean.

— Function: config-int cfg group key

Retrieve configuration value as an exact integer.

— Function: config-real cfg group key

Retrieve configuration value as an inexact real number.

— Function: config-string-list cfg group key

Retrieve configuration value as a list of strings.

— Function: config-boolean-list cfg group key

Retrieve configuration value as a list of booleans.

— Function: config-int-list cfg group key

Retrieve configuration value as a list of exact integers.

— Function: config-real-list cfg group key

Retrieve configuration value as a list of inexact real numbers.

— Function: config-set! cfg group key value

Set the configuration parameter identified by the given group and key in the configuration context cfg. The type of value to set is inferred from value.