summaryrefslogtreecommitdiff
path: root/libs/property_tree/doc/property_tree.qbk
blob: fef18f749e773c7e55dc2bfb22c2b45cb1bd397b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[/
 / Copyright (c) 2008 Marcin Kalicinski (kalita <at> poczta dot onet dot pl)
 / Copyright (c) 2009 Sebastian Redl (sebastian dot redl <at> getdesigned dot at)
 /
 / Distributed under the Boost Software License, Version 1.0. (See accompanying
 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 /]

[library Boost.PropertyTree
    [quickbook 1.4]
    [copyright 2008 Marcin Kalicinski]
    [purpose Property Tree library]
    [license
        Distributed under the Boost Software License, Version 1.0.
        (See accompanying file LICENSE_1_0.txt or copy at
        [@http://www.boost.org/LICENSE_1_0.txt])
    ]
    [authors [Kalicinski, Marcin]]
    [id property_tree]
    [dirname property_tree]
    [category container]
    [category template]
]

[/ Tried to use templates here but got errors expanding them in [classref ...] etc.]
[/ types]
[def __ptree__ [classref boost::property_tree::ptree ptree]]
[def __ptree_value_type__ [classref boost::property_tree::basic_ptree::value_type value_type]]
[def __ptree_data_type__ [classref boost::property_tree::basic_ptree::data_type data_type]]
[def __ptree_iterator__ [classref boost::property_tree::basic_ptree::iterator iterator]]
[def __ptree_const_iterator__ [classref boost::property_tree::basic_ptree::const_iterator const_iterator]]
[def __path__ [classref boost::property_tree::string_path path]]
[def __ptree_error__ [classref boost::property_tree::ptree_error ptree_error]]
[def __ptree_bad_data__ [classref boost::property_tree::ptree_bad_data ptree_bad_data]]
[def __ptree_bad_path__ [classref boost::property_tree::ptree_bad_path ptree_bad_path]]

[/ members]
[def __ptree_insert__ [memberref boost::property_tree::basic_ptree::insert insert]]
[def __ptree_push_back__ [memberref boost::property_tree::basic_ptree::push_back push_back]]
[def __ptree_find__ [memberref boost::property_tree::basic_ptree::find find]]
[def __ptree_erase__ [memberref boost::property_tree::basic_ptree::erase erase]]
[def __ptree_find__ [memberref boost::property_tree::basic_ptree::find find]]
[def __ptree_data__ [memberref boost::property_tree::basic_ptree::data data]]
[def __ptree_push_front__ [memberref boost::property_tree::basic_ptree::push_front push_front]]
[def __ptree_sort__ [memberref boost::property_tree::basic_ptree::sort sort]]
[def __ptree_get__ [memberref boost::property_tree::basic_ptree::get get]]
[/ XXX: Don't know how to specify overloads]
[def __ptree_get_defaulted__ [memberref boost::property_tree::basic_ptree::get get]]
[def __ptree_get_optional__ [memberref boost::property_tree::basic_ptree::get_optional get_optional]]
[def __ptree_get_value__ [memberref boost::property_tree::basic_ptree::get_value get_value]]
[/ XXX: Don't know how to specify overloads]
[def __ptree_get_value_defaulted__ [memberref boost::property_tree::basic_ptree::get_value get_value]]
[def __ptree_get_value_optional__ [memberref boost::property_tree::basic_ptree::get_value_optional get_value_optional]]
[def __ptree_get_child__ [memberref boost::property_tree::basic_ptree::get_child get_child]]
[def __ptree_put__ [memberref boost::property_tree::basic_ptree::put put]]
[def __ptree_add__ [memberref boost::property_tree::basic_ptree::add add]]
[def __ptree_put_value__ [memberref boost::property_tree::basic_ptree::put_value put_value]]

[/ free-functions]
[def __read_xml__ [funcref boost::property_tree::xml_parser::read_xml read_xml]]
[def __write_xml__ [funcref boost::property_tree::xml_parser::write_xml write_xml]]

[include intro.qbk]

[include tutorial.qbk]

[include container.qbk]

[include synopsis.qbk]

[include parsers.qbk]

[include accessing.qbk]

[section Appendices]
[heading Compatibility]
Property tree uses partial class template specialization. There has been no
attempt to work around lack of support for this. The library will therefore
most probably not work with Visual C++ 7.0 or earlier, or gcc 2.x.

Property tree has been tested (regressions successfully compiled and run)
with the following compilers:

* Visual C++ 8.0
* gcc 3.4.2 (MinGW)
* gcc 3.3.5 (Linux)
* gcc 3.4.4 (Linux)
* gcc 4.3.3 (Linux)
* Intel C++ 9.0 (Linux)

[heading Rationale]
# [*Why are there 3 versions of __ptree_get__? Couldn't there be just one?]
The three versions reflect experience gathered during several of years of using
property tree in several different applications. During that time I tried hard
to come up with one, proper form of the get function, and failed. I know of
these three basic patterns of usage:

 * ['Just get the data and I do not care if it cannot be done.]  This is used
   when the programmer is fairly sure that data exists. Or in homework
   assignments. Or when tomorrow is final deadline for your project.
 * ['Get the data and revert to default value if it cannot be done.]  Used when
   you want to allow omitting the key in question. Implemented by some similar
   tools (windows INI file access functions).
 * ['Get the data, but I care more whether you succeeded than I do for the data
   itself.] Used when you want to vary control flow depending on get
   success/failure. Or to check for presence of a key.

[heading Future Development]
* More parsers:  YAML, environment strings.
* More robust XML parser.
* Mathematical relations:  ptree difference, union, intersection.
  Useful for finding configuration file changes etc.

[endsect] [/ Appendices]

[xinclude autodoc.xml]