]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/property_tree/doc/ini_parser.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / property_tree / doc / ini_parser.qbk
CommitLineData
7c673cae
FG
1[/
2 / Copyright (c) 2008 Marcin Kalicinski (kalita <at> poczta dot onet dot pl)
3 / Copyright (c) 2009 Sebastian Redl (sebastian dot redl <at> getdesigned dot at)
4 /
5 / Distributed under the Boost Software License, Version 1.0. (See accompanying
6 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 /]
8[section INI Parser]
9[def __ini__ [@http://en.wikipedia.org/wiki/INI INI format]]
10The __ini__ was once widely used in the world of Windows. It is now deprecated,
11but is still used by a surprisingly large number of applications. The reason is
12probably its simplicity, plus that Microsoft recommends using the registry as
13a replacement, which not all developers want to do.
14
15INI is a simple key-value format with a single level of sectioning. It is thus
16less rich than the property tree dataset, which means that not all property
17trees can be serialized as INI files.
18
19The INI parser creates a tree node for every section, and a child node for
20every property in that section. All properties not in a section are directly
21added to the root node. Empty sections are ignored. (They don't round-trip, as
22described below.)
23
24The INI serializer reverses this process. It first writes out every child of the
25root that contains data, but no child nodes, as properties. Then it creates a
26section for every child that contains child nodes, but no data. The children of
27the sections must only contain data. It is an error if the root node contains
28data, or any child of the root contains both data and content, or there's more
29than three levels of hierarchy. There must also not be any duplicate keys.
30
31An empty tree node is assumed to be an empty property. There is no way to create
32empty sections.
33
34Since the Windows INI parser discards trailing spaces and does not support
35quoting, the property tree parser follows this example. This means that
36property values containing trailing spaces do not round-trip.
37[endsect] [/ini_parser]