Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Bayeux provides utility and high level classes (managers...) that can be dynamically configured through some possibly complex sets of parameters. The Bayeux library as well as its client applications rely on a configuration interface based on the datatools::properties
and datatools::multi_properties
classes. Typically, a configurable object can be prepared through an interface similar to the following:
In order to help users to understand how to properly configure such kind of object, Bayeux implements the Object Configuration Description (OCD) interface which proposes an embedded documentation system for these classes. The OCD interface provides an API to describe the parameters that are used to configure an instance of a given class. This description consists in detailing the name, type, mutability, default value (if any) of each configuration parameter and possibly other constraints. This is done programmatically using a companion object of the class that is automatically registered in the library using some dedicated macros. This gives to the class some kind of limited introspection system, at least in the context of object initialization.
The users can then use the Bayeux's OCD interface to browse the documentation associated to the configuration of instances of the class, and possibly validate or generate skeleton configuration files for objects of this class.
The bxocd_manual
executable can be used to request OCD documentation from the classes provided by any library that uses the OCD interface.
To print the list of all Bayeux's classes with OCD support:
To print the only OCD supported Bayeux's classes with namespace geomtools
:
List the classes with OCD support from the Bayeux/mctools' Geant4 plugin:
To generate a reStructuredText formatted documentation for a given Bayeux's class, convert it in HTML format and browse it:
OCD documentation for Bayeux's classes in not available.
The Bayeux OCD tutorial, available from the Bayeux source directory, illustrates how to add OCD support to a class.
The Bayeux/datatools library also provides a example dedicated to the OCD support, it is available from the Bayeux source directory.