There are a few interesting things happening that I'd like to highlight. First is Zack Rusin's
KDE config file editor. This isn't a gui application, rather a utility that could be used to manage or build application configurations. Here is a description from the
DESIGN file:
The basic entities found in config files are represented by tokens in KConfEdit. All tokens can be found in tokens.{h,cpp} files. There are three basic tokens:
- Application - represents the top level entity holding all others,
- Group - held by the Application token, currently have only name and contain a list of Entries
- Entry - the basic entity in configs. Held by the group. Currently have a name a value. This is the class that will expand as we work on KConfig. Some methods that should be added as our parser gains on functionality includd isMutable(), hasDefault(), type()...
All mutators in Tokens create a class called Momento. Based on the Memento design pattern they serve a similar purpose (provide undo mechanism). Momento's one creation grab and save the Tokens state and add themselves to the UndoManager. UndoManager (singleton) holds Momentos for each and every change.
Parsing is directed by ParserManager. ParserManager connects to the host of which configuration we're trying to modify, gets all the files and once it gets them it uses the actual parsers (currently only KConfigParser) to create an ApplicationToken lists from that data.