Frama-C:
Plug-ins:
Libraries:

Frama-C API - Cilconfig

Reading and storing configuration files from the filesystem. Currently only used in Frama-C's GUI.

Configuration

type configData =
  1. | ConfInt of int
  2. | ConfBool of bool
  3. | ConfFloat of float
  4. | ConfString of string
  5. | ConfList of configData list

The configuration data can be of several types *

val loadConfiguration : Datatype.Filepath.t -> unit

Load the configuration from a file

val saveConfiguration : Datatype.Filepath.t -> unit

Save the configuration in a file. Overwrites the previous values

val clearConfiguration : unit -> unit

Clear all configuration data

val setConfiguration : string -> configData -> unit

Set a configuration element, with a key. Overwrites the previous values

val findConfiguration : string -> configData

Find a configuration elements, given a key. Raises Not_found if it cannot find it

val findConfigurationInt : string -> int

Like findConfiguration but extracts the integer

val useConfigurationInt : string -> (int -> unit) -> unit

Looks for an integer configuration element, and if it is found, it uses the given function. Otherwise, does nothing

val findConfigurationFloat : string -> float
val useConfigurationFloat : string -> (float -> unit) -> unit
val findConfigurationBool : string -> bool
val useConfigurationBool : string -> (bool -> unit) -> unit
val findConfigurationString : string -> string
val useConfigurationString : string -> (string -> unit) -> unit
val findConfigurationList : string -> configData list
val useConfigurationList : string -> (configData list -> unit) -> unit