Commit graph

1 commit

Author SHA1 Message Date
Patrick Ohly
006bcf2603 single file format for multiple .ini files (MBC #1208)
This patch adds the infrastructure for reading a single file
which contains multiple separate .ini files. Writing is not
implemented.

The Ini*ConfigNode classes are derived from the File*ConfigNode
classes and could replace those. The only reason for not doing
this right away is that the master branch is in code freeze in
preparation for 1.0. Removing File*ConfigNode and replacing
their usages should be done after the release.

The SingleFileConfigTree implements the splitting of the single
file into independent pieces. It instantiates IniFileConfigNodes
with in-memory access to the actual data, using the new classes
introduced for this case in the previous patches.

SingleFileConfigTree could also use other ConfigNodes, but that kind
of flexibility is not needed yet and also would require rethinking the
way how the single file is split. Right now the separators ("===
.... ===") are known to not occur in the individual pieces.

Like the FileConfigTree, this class must be able to preserve
nodes which were created without flushing the tree afterwards.
This is done when reading from a read-only template, which may
add new nodes or modify existing ones in memory.
2010-05-04 09:39:20 +02:00