Configuration script module. There are a large number of command line options to control Synopsis, but there are many more options than it is feasable to implement in this fashion. Rather, Synopsis opts for the config file approach if you want full control over the process.
synopsis -c config.py -Wc,formatter=C++
The script is interpreted as a Python source file, and the only requirement is that once loaded it have a global object called Config. This Config object is usually a class which is constructed with the options dictionary to retrieve an object with nested configuration objects. Every config object has at least one attribute 'name', which identifies the module the object configures.
If no config script is specified on the command line, the default class Base is used, defined in this Config module. It is recommended that the Config class in your config script derive from this Base class to extend it as you wish.
1. From a list of built-in defaults for that task as a simple string (depends on attribute),
2. As a member of a module or package as a simple string (depends on attribute),
3. From anywhere via a tuple of two strings: (module, class-name); for example, to use the provided DOxygen Scope Sorter, you specify ('Synopsis.Formatter.HTML.doxygen', 'DOScopeSorter') or to use your own something like ('mymodules.py', 'ScopeSorter') - Note that ending the first string in '.py' forces it to be loaded from a file, something which cannot be achieved using the next method:
4. From anywhere via an absolute dotted reference, eg: 'Synopsis.Formatter.HTML.doxygen.DOScopeSorter'.
Of these methods, 1 or 2 are preferable for brevity and 4 for absolute references, unless a filename is needed in which case you need 3.
Classes Summary: | |
Base The base class for configuration objects. [Source] |