xref: /aosp_15_r20/external/libconfig/docs/libconfig_manual.html (revision 2e9d491483b805f09ea864149eadd5680efcc72a)
1*2e9d4914SAndroid Build Coastguard Worker<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2*2e9d4914SAndroid Build Coastguard Worker<html>
3*2e9d4914SAndroid Build Coastguard Worker<!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ -->
4*2e9d4914SAndroid Build Coastguard Worker<head>
5*2e9d4914SAndroid Build Coastguard Worker<title>libconfig</title>
6*2e9d4914SAndroid Build Coastguard Worker
7*2e9d4914SAndroid Build Coastguard Worker<meta name="description" content="libconfig">
8*2e9d4914SAndroid Build Coastguard Worker<meta name="keywords" content="libconfig">
9*2e9d4914SAndroid Build Coastguard Worker<meta name="resource-type" content="document">
10*2e9d4914SAndroid Build Coastguard Worker<meta name="distribution" content="global">
11*2e9d4914SAndroid Build Coastguard Worker<meta name="Generator" content="makeinfo">
12*2e9d4914SAndroid Build Coastguard Worker<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
13*2e9d4914SAndroid Build Coastguard Worker<link href="#Top" rel="start" title="Top">
14*2e9d4914SAndroid Build Coastguard Worker<link href="#Function-Index" rel="index" title="Function Index">
15*2e9d4914SAndroid Build Coastguard Worker<link href="#SEC_Contents" rel="contents" title="Table of Contents">
16*2e9d4914SAndroid Build Coastguard Worker<link href="dir.html#Top" rel="up" title="(dir)">
17*2e9d4914SAndroid Build Coastguard Worker<style type="text/css">
18*2e9d4914SAndroid Build Coastguard Worker<!--
19*2e9d4914SAndroid Build Coastguard Workera.summary-letter {text-decoration: none}
20*2e9d4914SAndroid Build Coastguard Workerblockquote.indentedblock {margin-right: 0em}
21*2e9d4914SAndroid Build Coastguard Workerblockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
22*2e9d4914SAndroid Build Coastguard Workerblockquote.smallquotation {font-size: smaller}
23*2e9d4914SAndroid Build Coastguard Workerdiv.display {margin-left: 3.2em}
24*2e9d4914SAndroid Build Coastguard Workerdiv.example {margin-left: 3.2em}
25*2e9d4914SAndroid Build Coastguard Workerdiv.lisp {margin-left: 3.2em}
26*2e9d4914SAndroid Build Coastguard Workerdiv.smalldisplay {margin-left: 3.2em}
27*2e9d4914SAndroid Build Coastguard Workerdiv.smallexample {margin-left: 3.2em}
28*2e9d4914SAndroid Build Coastguard Workerdiv.smalllisp {margin-left: 3.2em}
29*2e9d4914SAndroid Build Coastguard Workerkbd {font-style: oblique}
30*2e9d4914SAndroid Build Coastguard Workerpre.display {font-family: inherit}
31*2e9d4914SAndroid Build Coastguard Workerpre.format {font-family: inherit}
32*2e9d4914SAndroid Build Coastguard Workerpre.menu-comment {font-family: serif}
33*2e9d4914SAndroid Build Coastguard Workerpre.menu-preformatted {font-family: serif}
34*2e9d4914SAndroid Build Coastguard Workerpre.smalldisplay {font-family: inherit; font-size: smaller}
35*2e9d4914SAndroid Build Coastguard Workerpre.smallexample {font-size: smaller}
36*2e9d4914SAndroid Build Coastguard Workerpre.smallformat {font-family: inherit; font-size: smaller}
37*2e9d4914SAndroid Build Coastguard Workerpre.smalllisp {font-size: smaller}
38*2e9d4914SAndroid Build Coastguard Workerspan.nolinebreak {white-space: nowrap}
39*2e9d4914SAndroid Build Coastguard Workerspan.roman {font-family: initial; font-weight: normal}
40*2e9d4914SAndroid Build Coastguard Workerspan.sansserif {font-family: sans-serif; font-weight: normal}
41*2e9d4914SAndroid Build Coastguard Workerul.no-bullet {list-style: none}
42*2e9d4914SAndroid Build Coastguard Worker-->
43*2e9d4914SAndroid Build Coastguard Worker</style>
44*2e9d4914SAndroid Build Coastguard Worker
45*2e9d4914SAndroid Build Coastguard Worker
46*2e9d4914SAndroid Build Coastguard Worker</head>
47*2e9d4914SAndroid Build Coastguard Worker
48*2e9d4914SAndroid Build Coastguard Worker<body lang="en">
49*2e9d4914SAndroid Build Coastguard Worker<h1 class="settitle" align="center">libconfig</h1>
50*2e9d4914SAndroid Build Coastguard Worker
51*2e9d4914SAndroid Build Coastguard Worker
52*2e9d4914SAndroid Build Coastguard Worker
53*2e9d4914SAndroid Build Coastguard Worker
54*2e9d4914SAndroid Build Coastguard Worker
55*2e9d4914SAndroid Build Coastguard Worker
56*2e9d4914SAndroid Build Coastguard Worker
57*2e9d4914SAndroid Build Coastguard Worker
58*2e9d4914SAndroid Build Coastguard Worker
59*2e9d4914SAndroid Build Coastguard Worker<hr noshade size=6 color="black">
60*2e9d4914SAndroid Build Coastguard Worker<div align=right>A Library For Processing Structured Configuration Files<br>
61*2e9d4914SAndroid Build Coastguard WorkerVersion 1.7.2<br>
62*2e9d4914SAndroid Build Coastguard Worker5 Jan 2018</div>
63*2e9d4914SAndroid Build Coastguard Worker<br><br><br><br>
64*2e9d4914SAndroid Build Coastguard Worker<font size=+1>Mark A. Lindner</font>
65*2e9d4914SAndroid Build Coastguard Worker<hr size=3 noshade color="black">
66*2e9d4914SAndroid Build Coastguard Worker<br><br>
67*2e9d4914SAndroid Build Coastguard Worker
68*2e9d4914SAndroid Build Coastguard Worker<a name="SEC_Contents"></a>
69*2e9d4914SAndroid Build Coastguard Worker<h2 class="contents-heading">Table of Contents</h2>
70*2e9d4914SAndroid Build Coastguard Worker
71*2e9d4914SAndroid Build Coastguard Worker<div class="contents">
72*2e9d4914SAndroid Build Coastguard Worker
73*2e9d4914SAndroid Build Coastguard Worker<ul class="no-bullet">
74*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-Introduction-1" href="#Introduction">1 Introduction</a>
75*2e9d4914SAndroid Build Coastguard Worker  <ul class="no-bullet">
76*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Why-Another-Configuration-File-Library_003f-1" href="#Why-Another-Configuration-File-Library_003f">1.1 Why Another Configuration File Library?</a></li>
77*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Using-the-Library-from-a-C-Program-1" href="#Using-the-Library-from-a-C-Program">1.2 Using the Library from a C Program</a></li>
78*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Using-the-Library-from-a-C_002b_002b-Program-1" href="#Using-the-Library-from-a-C_002b_002b-Program">1.3 Using the Library from a C++ Program</a></li>
79*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Multithreading-Issues-1" href="#Multithreading-Issues">1.4 Multithreading Issues</a></li>
80*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Internationalization-Issues-1" href="#Internationalization-Issues">1.5 Internationalization Issues</a></li>
81*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Compiling-Using-pkg_002dconfig-1" href="#Compiling-Using-pkg_002dconfig">1.6 Compiling Using pkg-config</a></li>
82*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Version-Test-Macros-1" href="#Version-Test-Macros">1.7 Version Test Macros</a></li>
83*2e9d4914SAndroid Build Coastguard Worker  </ul></li>
84*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-Configuration-Files-1" href="#Configuration-Files">2 Configuration Files</a>
85*2e9d4914SAndroid Build Coastguard Worker  <ul class="no-bullet">
86*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Settings-1" href="#Settings">2.1 Settings</a></li>
87*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Groups-1" href="#Groups">2.2 Groups</a></li>
88*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Arrays-1" href="#Arrays">2.3 Arrays</a></li>
89*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Lists-1" href="#Lists">2.4 Lists</a></li>
90*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Integer-Values-1" href="#Integer-Values">2.5 Integer Values</a></li>
91*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-64_002dbit-Integer-Values-1" href="#g_t64_002dbit-Integer-Values">2.6 64-bit Integer Values</a></li>
92*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Floating-Point-Values-1" href="#Floating-Point-Values">2.7 Floating Point Values</a></li>
93*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Boolean-Values-1" href="#Boolean-Values">2.8 Boolean Values</a></li>
94*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-String-Values-1" href="#String-Values">2.9 String Values</a></li>
95*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Comments-1" href="#Comments">2.10 Comments</a></li>
96*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Include-Directives-1" href="#Include-Directives">2.11 Include Directives</a></li>
97*2e9d4914SAndroid Build Coastguard Worker  </ul></li>
98*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-The-C-API-1" href="#The-C-API">3 The C API</a></li>
99*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-The-C_002b_002b-API-1" href="#The-C_002b_002b-API">4 The C++ API</a></li>
100*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-Example-Programs-1" href="#Example-Programs">5 Example Programs</a></li>
101*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-Other-Bindings-and-Implementations-1" href="#Other-Bindings-and-Implementations">6 Other Bindings and Implementations</a>
102*2e9d4914SAndroid Build Coastguard Worker  <ul class="no-bullet">
103*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Bourne-Shell-1" href="#Bourne-Shell">6.1 Bourne Shell</a></li>
104*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-D-1" href="#D">6.2 D</a></li>
105*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Haskell-1" href="#Haskell">6.3 Haskell</a></li>
106*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Java-1" href="#Java">6.4 Java</a></li>
107*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Lisp-1" href="#Lisp">6.5 Lisp</a></li>
108*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Perl-1" href="#Perl">6.6 Perl</a></li>
109*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Python-1" href="#Python">6.7 Python</a></li>
110*2e9d4914SAndroid Build Coastguard Worker    <li><a name="toc-Ruby-1" href="#Ruby">6.8 Ruby</a></li>
111*2e9d4914SAndroid Build Coastguard Worker  </ul></li>
112*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-License-1" href="#License">Appendix A License</a></li>
113*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-Configuration-File-Grammar-1" href="#Configuration-File-Grammar">Appendix B Configuration File Grammar</a></li>
114*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-Function-Index-1" href="#Function-Index">Function Index</a></li>
115*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-Type-Index-1" href="#Type-Index">Type Index</a></li>
116*2e9d4914SAndroid Build Coastguard Worker  <li><a name="toc-Concept-Index-1" href="#Concept-Index">Concept Index</a></li>
117*2e9d4914SAndroid Build Coastguard Worker</ul>
118*2e9d4914SAndroid Build Coastguard Worker</div>
119*2e9d4914SAndroid Build Coastguard Worker
120*2e9d4914SAndroid Build Coastguard Worker
121*2e9d4914SAndroid Build Coastguard Worker<a name="Top"></a>
122*2e9d4914SAndroid Build Coastguard Worker<div class="header">
123*2e9d4914SAndroid Build Coastguard Worker<p>
124*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
125*2e9d4914SAndroid Build Coastguard Worker</div>
126*2e9d4914SAndroid Build Coastguard Worker<a name="libconfig"></a>
127*2e9d4914SAndroid Build Coastguard Worker<h1 class="top">libconfig</h1>
128*2e9d4914SAndroid Build Coastguard Worker
129*2e9d4914SAndroid Build Coastguard Worker<table class="menu" border="0" cellspacing="0">
130*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Introduction" accesskey="1">Introduction</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
131*2e9d4914SAndroid Build Coastguard Worker</td></tr>
132*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Configuration-Files" accesskey="2">Configuration Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
133*2e9d4914SAndroid Build Coastguard Worker</td></tr>
134*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#The-C-API" accesskey="3">The C API</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
135*2e9d4914SAndroid Build Coastguard Worker</td></tr>
136*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#The-C_002b_002b-API" accesskey="4">The C++ API</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
137*2e9d4914SAndroid Build Coastguard Worker</td></tr>
138*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Example-Programs" accesskey="5">Example Programs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
139*2e9d4914SAndroid Build Coastguard Worker</td></tr>
140*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Other-Bindings-and-Implementations" accesskey="6">Other Bindings and Implementations</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
141*2e9d4914SAndroid Build Coastguard Worker</td></tr>
142*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#License" accesskey="7">License</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
143*2e9d4914SAndroid Build Coastguard Worker</td></tr>
144*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Configuration-File-Grammar" accesskey="8">Configuration File Grammar</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
145*2e9d4914SAndroid Build Coastguard Worker</td></tr>
146*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Function-Index" accesskey="9">Function Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
147*2e9d4914SAndroid Build Coastguard Worker</td></tr>
148*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Type-Index">Type Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
149*2e9d4914SAndroid Build Coastguard Worker</td></tr>
150*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Concept-Index">Concept Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
151*2e9d4914SAndroid Build Coastguard Worker</td></tr>
152*2e9d4914SAndroid Build Coastguard Worker</table>
153*2e9d4914SAndroid Build Coastguard Worker
154*2e9d4914SAndroid Build Coastguard Worker<hr>
155*2e9d4914SAndroid Build Coastguard Worker<a name="Introduction"></a>
156*2e9d4914SAndroid Build Coastguard Worker<div class="header">
157*2e9d4914SAndroid Build Coastguard Worker<p>
158*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Configuration-Files" accesskey="n" rel="next">Configuration Files</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
159*2e9d4914SAndroid Build Coastguard Worker</div>
160*2e9d4914SAndroid Build Coastguard Worker<table class="menu" border="0" cellspacing="0">
161*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Why-Another-Configuration-File-Library_003f" accesskey="1">Why Another Configuration File Library?</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
162*2e9d4914SAndroid Build Coastguard Worker</td></tr>
163*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Using-the-Library-from-a-C-Program" accesskey="2">Using the Library from a C Program</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
164*2e9d4914SAndroid Build Coastguard Worker</td></tr>
165*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Using-the-Library-from-a-C_002b_002b-Program" accesskey="3">Using the Library from a C++ Program</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
166*2e9d4914SAndroid Build Coastguard Worker</td></tr>
167*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Multithreading-Issues" accesskey="4">Multithreading Issues</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
168*2e9d4914SAndroid Build Coastguard Worker</td></tr>
169*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Internationalization-Issues" accesskey="5">Internationalization Issues</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
170*2e9d4914SAndroid Build Coastguard Worker</td></tr>
171*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Compiling-Using-pkg_002dconfig" accesskey="6">Compiling Using pkg-config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
172*2e9d4914SAndroid Build Coastguard Worker</td></tr>
173*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Version-Test-Macros" accesskey="7">Version Test Macros</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
174*2e9d4914SAndroid Build Coastguard Worker</td></tr>
175*2e9d4914SAndroid Build Coastguard Worker</table>
176*2e9d4914SAndroid Build Coastguard Worker<a name="Introduction-1"></a>
177*2e9d4914SAndroid Build Coastguard Worker<h2 class="chapter">1 Introduction</h2>
178*2e9d4914SAndroid Build Coastguard Worker
179*2e9d4914SAndroid Build Coastguard Worker<p><i>Libconfig</i> is a library for reading, manipulating, and writing
180*2e9d4914SAndroid Build Coastguard Workerstructured configuration files. The library features a fully
181*2e9d4914SAndroid Build Coastguard Workerreentrant parser and includes bindings for both the C and C++
182*2e9d4914SAndroid Build Coastguard Workerprogramming languages.
183*2e9d4914SAndroid Build Coastguard Worker</p>
184*2e9d4914SAndroid Build Coastguard Worker<p>The library runs on modern POSIX-compilant systems, such as Linux,
185*2e9d4914SAndroid Build Coastguard WorkerSolaris, and Mac OS X (Darwin), as well as on Microsoft Windows
186*2e9d4914SAndroid Build Coastguard Worker2000/XP and later (with either Microsoft Visual Studio 2005 or later,
187*2e9d4914SAndroid Build Coastguard Workeror the GNU toolchain via the MinGW environment).
188*2e9d4914SAndroid Build Coastguard Worker</p>
189*2e9d4914SAndroid Build Coastguard Worker<hr>
190*2e9d4914SAndroid Build Coastguard Worker<a name="Why-Another-Configuration-File-Library_003f"></a>
191*2e9d4914SAndroid Build Coastguard Worker<div class="header">
192*2e9d4914SAndroid Build Coastguard Worker<p>
193*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Using-the-Library-from-a-C-Program" accesskey="n" rel="next">Using the Library from a C Program</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
194*2e9d4914SAndroid Build Coastguard Worker</div>
195*2e9d4914SAndroid Build Coastguard Worker<a name="Why-Another-Configuration-File-Library_003f-1"></a>
196*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">1.1 Why Another Configuration File Library?</h3>
197*2e9d4914SAndroid Build Coastguard Worker
198*2e9d4914SAndroid Build Coastguard Worker<p>There are several open-source configuration file libraries available
199*2e9d4914SAndroid Build Coastguard Workeras of this writing. This library was written because each of those
200*2e9d4914SAndroid Build Coastguard Workerlibraries falls short in one or more ways. The main features of
201*2e9d4914SAndroid Build Coastguard Worker<i>libconfig</i> that set it apart from the other libraries are:
202*2e9d4914SAndroid Build Coastguard Worker</p>
203*2e9d4914SAndroid Build Coastguard Worker<ul>
204*2e9d4914SAndroid Build Coastguard Worker<li> A fully reentrant parser. Independent configurations can be parsed in concurrent threads at the same time.
205*2e9d4914SAndroid Build Coastguard Worker
206*2e9d4914SAndroid Build Coastguard Worker</li><li> Both C <i>and</i> C++ bindings, as well as hooks to allow for the creation of wrappers in other languages.
207*2e9d4914SAndroid Build Coastguard Worker
208*2e9d4914SAndroid Build Coastguard Worker</li><li> A simple, structured configuration file format that is more
209*2e9d4914SAndroid Build Coastguard Workerreadable and compact than XML and more flexible than the obsolete but
210*2e9d4914SAndroid Build Coastguard Workerprevalent Windows &ldquo;INI&rdquo; file format.
211*2e9d4914SAndroid Build Coastguard Worker
212*2e9d4914SAndroid Build Coastguard Worker</li><li> A low-footprint implementation (just 37K for the C library and 76K for
213*2e9d4914SAndroid Build Coastguard Workerthe C++ library) that is suitable for memory-constrained systems.
214*2e9d4914SAndroid Build Coastguard Worker
215*2e9d4914SAndroid Build Coastguard Worker</li><li> Proper documentation.
216*2e9d4914SAndroid Build Coastguard Worker
217*2e9d4914SAndroid Build Coastguard Worker</li></ul>
218*2e9d4914SAndroid Build Coastguard Worker
219*2e9d4914SAndroid Build Coastguard Worker<hr>
220*2e9d4914SAndroid Build Coastguard Worker<a name="Using-the-Library-from-a-C-Program"></a>
221*2e9d4914SAndroid Build Coastguard Worker<div class="header">
222*2e9d4914SAndroid Build Coastguard Worker<p>
223*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Using-the-Library-from-a-C_002b_002b-Program" accesskey="n" rel="next">Using the Library from a C++ Program</a>, Previous: <a href="#Why-Another-Configuration-File-Library_003f" accesskey="p" rel="prev">Why Another Configuration File Library?</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
224*2e9d4914SAndroid Build Coastguard Worker</div>
225*2e9d4914SAndroid Build Coastguard Worker<a name="Using-the-Library-from-a-C-Program-1"></a>
226*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">1.2 Using the Library from a C Program</h3>
227*2e9d4914SAndroid Build Coastguard Worker
228*2e9d4914SAndroid Build Coastguard Worker<p>To use the library from C code, include the following preprocessor
229*2e9d4914SAndroid Build Coastguard Workerdirective in your source files:
230*2e9d4914SAndroid Build Coastguard Worker</p>
231*2e9d4914SAndroid Build Coastguard Worker<br>
232*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
233*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">#include &lt;libconfig.h&gt;
234*2e9d4914SAndroid Build Coastguard Worker</pre></div>
235*2e9d4914SAndroid Build Coastguard Worker<br>
236*2e9d4914SAndroid Build Coastguard Worker
237*2e9d4914SAndroid Build Coastguard Worker<p>To link with the library, specify &lsquo;<samp>-lconfig</samp>&rsquo; as an argument to the
238*2e9d4914SAndroid Build Coastguard Workerlinker.
239*2e9d4914SAndroid Build Coastguard Worker</p>
240*2e9d4914SAndroid Build Coastguard Worker<hr>
241*2e9d4914SAndroid Build Coastguard Worker<a name="Using-the-Library-from-a-C_002b_002b-Program"></a>
242*2e9d4914SAndroid Build Coastguard Worker<div class="header">
243*2e9d4914SAndroid Build Coastguard Worker<p>
244*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Multithreading-Issues" accesskey="n" rel="next">Multithreading Issues</a>, Previous: <a href="#Using-the-Library-from-a-C-Program" accesskey="p" rel="prev">Using the Library from a C Program</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
245*2e9d4914SAndroid Build Coastguard Worker</div>
246*2e9d4914SAndroid Build Coastguard Worker<a name="Using-the-Library-from-a-C_002b_002b-Program-1"></a>
247*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">1.3 Using the Library from a C++ Program</h3>
248*2e9d4914SAndroid Build Coastguard Worker
249*2e9d4914SAndroid Build Coastguard Worker<p>To use the library from C++, include the following preprocessor
250*2e9d4914SAndroid Build Coastguard Workerdirective in your source files:
251*2e9d4914SAndroid Build Coastguard Worker</p>
252*2e9d4914SAndroid Build Coastguard Worker<br>
253*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
254*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">#include &lt;libconfig.h++&gt;
255*2e9d4914SAndroid Build Coastguard Worker</pre></div>
256*2e9d4914SAndroid Build Coastguard Worker<br>
257*2e9d4914SAndroid Build Coastguard Worker
258*2e9d4914SAndroid Build Coastguard Worker<p>Or, alternatively:
259*2e9d4914SAndroid Build Coastguard Worker</p>
260*2e9d4914SAndroid Build Coastguard Worker<br>
261*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
262*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">#include &lt;libconfig.hh&gt;
263*2e9d4914SAndroid Build Coastguard Worker</pre></div>
264*2e9d4914SAndroid Build Coastguard Worker<br>
265*2e9d4914SAndroid Build Coastguard Worker<p>The C++ API classes are defined in the namespace &lsquo;<samp>libconfig</samp>&rsquo;, hence the
266*2e9d4914SAndroid Build Coastguard Workerfollowing statement may optionally be used:
267*2e9d4914SAndroid Build Coastguard Worker</p>
268*2e9d4914SAndroid Build Coastguard Worker<br>
269*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
270*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">using namespace libconfig;
271*2e9d4914SAndroid Build Coastguard Worker</pre></div>
272*2e9d4914SAndroid Build Coastguard Worker<br>
273*2e9d4914SAndroid Build Coastguard Worker
274*2e9d4914SAndroid Build Coastguard Worker<p>To link with the library, specify &lsquo;<samp>-lconfig++</samp>&rsquo; as an argument to
275*2e9d4914SAndroid Build Coastguard Workerthe linker.
276*2e9d4914SAndroid Build Coastguard Worker</p>
277*2e9d4914SAndroid Build Coastguard Worker<hr>
278*2e9d4914SAndroid Build Coastguard Worker<a name="Multithreading-Issues"></a>
279*2e9d4914SAndroid Build Coastguard Worker<div class="header">
280*2e9d4914SAndroid Build Coastguard Worker<p>
281*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Internationalization-Issues" accesskey="n" rel="next">Internationalization Issues</a>, Previous: <a href="#Using-the-Library-from-a-C_002b_002b-Program" accesskey="p" rel="prev">Using the Library from a C++ Program</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
282*2e9d4914SAndroid Build Coastguard Worker</div>
283*2e9d4914SAndroid Build Coastguard Worker<a name="Multithreading-Issues-1"></a>
284*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">1.4 Multithreading Issues</h3>
285*2e9d4914SAndroid Build Coastguard Worker
286*2e9d4914SAndroid Build Coastguard Worker<p><i>Libconfig</i> is fully <em>reentrant</em>; the functions in the library
287*2e9d4914SAndroid Build Coastguard Workerdo not make use of global variables and do not maintain state between
288*2e9d4914SAndroid Build Coastguard Workersuccessive calls. Therefore two independent configurations may be safely
289*2e9d4914SAndroid Build Coastguard Workermanipulated concurrently by two distinct threads.
290*2e9d4914SAndroid Build Coastguard Worker</p>
291*2e9d4914SAndroid Build Coastguard Worker<p><i>Libconfig</i> is not <em>thread-safe</em>. The library is not aware of
292*2e9d4914SAndroid Build Coastguard Workerthe presence of threads and knows nothing about the host system&rsquo;s
293*2e9d4914SAndroid Build Coastguard Workerthreading model. Therefore, if an instance of a configuration is to be
294*2e9d4914SAndroid Build Coastguard Workeraccessed from multiple threads, it must be suitably protected by
295*2e9d4914SAndroid Build Coastguard Workersynchronization mechanisms like read-write locks or mutexes; the
296*2e9d4914SAndroid Build Coastguard Workerstandard rules for safe multithreaded access to shared data must be
297*2e9d4914SAndroid Build Coastguard Workerobserved.
298*2e9d4914SAndroid Build Coastguard Worker</p>
299*2e9d4914SAndroid Build Coastguard Worker<p><i>Libconfig</i> is not <em>async-safe</em>. Calls should not be made into
300*2e9d4914SAndroid Build Coastguard Workerthe library from signal handlers, because some of the C library
301*2e9d4914SAndroid Build Coastguard Workerroutines that it uses may not be async-safe.
302*2e9d4914SAndroid Build Coastguard Worker</p>
303*2e9d4914SAndroid Build Coastguard Worker<p><i>Libconfig</i> is not guaranteed to be <em>cancel-safe</em>. Since it is
304*2e9d4914SAndroid Build Coastguard Workernot aware of the host system&rsquo;s threading model, the library does not
305*2e9d4914SAndroid Build Coastguard Workercontain any thread cancellation points. In most cases this will not be
306*2e9d4914SAndroid Build Coastguard Workeran issue for multithreaded programs. However, be aware that some of
307*2e9d4914SAndroid Build Coastguard Workerthe routines in the library (namely those that read/write
308*2e9d4914SAndroid Build Coastguard Workerconfigurations from/to files or streams) perform I/O using C library
309*2e9d4914SAndroid Build Coastguard Workerroutines which may potentially block; whether or not these C library
310*2e9d4914SAndroid Build Coastguard Workerroutines are cancel-safe depends on the host system.
311*2e9d4914SAndroid Build Coastguard Worker</p>
312*2e9d4914SAndroid Build Coastguard Worker<hr>
313*2e9d4914SAndroid Build Coastguard Worker<a name="Internationalization-Issues"></a>
314*2e9d4914SAndroid Build Coastguard Worker<div class="header">
315*2e9d4914SAndroid Build Coastguard Worker<p>
316*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Compiling-Using-pkg_002dconfig" accesskey="n" rel="next">Compiling Using pkg-config</a>, Previous: <a href="#Multithreading-Issues" accesskey="p" rel="prev">Multithreading Issues</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
317*2e9d4914SAndroid Build Coastguard Worker</div>
318*2e9d4914SAndroid Build Coastguard Worker<a name="Internationalization-Issues-1"></a>
319*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">1.5 Internationalization Issues</h3>
320*2e9d4914SAndroid Build Coastguard Worker
321*2e9d4914SAndroid Build Coastguard Worker<a name="index-Unicode"></a>
322*2e9d4914SAndroid Build Coastguard Worker<a name="index-UTF_002d8"></a>
323*2e9d4914SAndroid Build Coastguard Worker<p><i>Libconfig</i> does not natively support Unicode configuration files,
324*2e9d4914SAndroid Build Coastguard Workerbut string values may contain Unicode text encoded in UTF-8; such
325*2e9d4914SAndroid Build Coastguard Workerstrings will be treated as ordinary 8-bit ASCII text by the
326*2e9d4914SAndroid Build Coastguard Workerlibrary. It is the responsibility of the calling program to perform
327*2e9d4914SAndroid Build Coastguard Workerthe necessary conversions to/from wide (<tt>wchar_t</tt>) strings using the
328*2e9d4914SAndroid Build Coastguard Workerwide string conversion functions such as <tt>mbsrtowcs()</tt> and
329*2e9d4914SAndroid Build Coastguard Worker<tt>wcsrtombs()</tt> or the <tt>iconv()</tt> function of the <i>libiconv</i>
330*2e9d4914SAndroid Build Coastguard Workerlibrary.
331*2e9d4914SAndroid Build Coastguard Worker</p>
332*2e9d4914SAndroid Build Coastguard Worker<a name="index-locale"></a>
333*2e9d4914SAndroid Build Coastguard Worker<p>The textual representation of a floating point value varies by
334*2e9d4914SAndroid Build Coastguard Workerlocale. However, the <i>libconfig</i> grammar specifies that
335*2e9d4914SAndroid Build Coastguard Workerfloating point values are represented using a period (&lsquo;.&rsquo;) as the
336*2e9d4914SAndroid Build Coastguard Workerradix symbol; this is consistent with the grammar of most programming
337*2e9d4914SAndroid Build Coastguard Workerlanguages. When a configuration is read in or written out,
338*2e9d4914SAndroid Build Coastguard Worker<i>libconfig</i> temporarily changes the <tt>LC_NUMERIC</tt> category of the
339*2e9d4914SAndroid Build Coastguard Workerlocale of the calling thread to the &ldquo;C&rdquo; locale to ensure consistent
340*2e9d4914SAndroid Build Coastguard Workerhandling of floating point values regardless of the locale(s) in use
341*2e9d4914SAndroid Build Coastguard Workerby the calling program.
342*2e9d4914SAndroid Build Coastguard Worker</p>
343*2e9d4914SAndroid Build Coastguard Worker<p>Note that the MinGW environment does not (as of this writing) provide
344*2e9d4914SAndroid Build Coastguard Workerfunctions for changing the locale of the calling thread. Therefore,
345*2e9d4914SAndroid Build Coastguard Workerwhen using <i>libconfig</i> in that environment, the calling program is
346*2e9d4914SAndroid Build Coastguard Workerresponsible for changing the <tt>LC_NUMERIC</tt> category of the locale to
347*2e9d4914SAndroid Build Coastguard Workerthe &quot;C&quot; locale before reading or writing a configuration.
348*2e9d4914SAndroid Build Coastguard Worker</p>
349*2e9d4914SAndroid Build Coastguard Worker<hr>
350*2e9d4914SAndroid Build Coastguard Worker<a name="Compiling-Using-pkg_002dconfig"></a>
351*2e9d4914SAndroid Build Coastguard Worker<div class="header">
352*2e9d4914SAndroid Build Coastguard Worker<p>
353*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Version-Test-Macros" accesskey="n" rel="next">Version Test Macros</a>, Previous: <a href="#Internationalization-Issues" accesskey="p" rel="prev">Internationalization Issues</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
354*2e9d4914SAndroid Build Coastguard Worker</div>
355*2e9d4914SAndroid Build Coastguard Worker<a name="Compiling-Using-pkg_002dconfig-1"></a>
356*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">1.6 Compiling Using pkg-config</h3>
357*2e9d4914SAndroid Build Coastguard Worker
358*2e9d4914SAndroid Build Coastguard Worker<a name="index-pkg_002dconfig"></a>
359*2e9d4914SAndroid Build Coastguard Worker<p>On UNIX systems you can use the <i>pkg-config</i> utility (version 0.20
360*2e9d4914SAndroid Build Coastguard Workeror later) to automatically select the appropriate compiler and linker
361*2e9d4914SAndroid Build Coastguard Workerswitches for <i>libconfig</i>. Ensure that the environment variable
362*2e9d4914SAndroid Build Coastguard Worker<code>PKG_CONFIG_PATH</code> contains the absolute path to the
363*2e9d4914SAndroid Build Coastguard Worker<samp>lib/pkgconfig</samp> subdirectory of the <i>libconfig</i> installation. Then,
364*2e9d4914SAndroid Build Coastguard Workeryou can compile and link C programs with <i>libconfig</i> as follows:
365*2e9d4914SAndroid Build Coastguard Worker</p>
366*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
367*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">gcc `pkg-config --cflags libconfig` myprogram.c -o myprogram \
368*2e9d4914SAndroid Build Coastguard Worker    `pkg-config --libs libconfig`
369*2e9d4914SAndroid Build Coastguard Worker</pre></div>
370*2e9d4914SAndroid Build Coastguard Worker<br>
371*2e9d4914SAndroid Build Coastguard Worker
372*2e9d4914SAndroid Build Coastguard Worker<p>And similarly, for C++ programs:
373*2e9d4914SAndroid Build Coastguard Worker</p>
374*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
375*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">g++ `pkg-config --cflags libconfig++` myprogram.cpp -o myprogram \
376*2e9d4914SAndroid Build Coastguard Worker    `pkg-config --libs libconfig++`
377*2e9d4914SAndroid Build Coastguard Worker</pre></div>
378*2e9d4914SAndroid Build Coastguard Worker
379*2e9d4914SAndroid Build Coastguard Worker<br>
380*2e9d4914SAndroid Build Coastguard Worker<p>Note the backticks in the above examples.
381*2e9d4914SAndroid Build Coastguard Worker</p>
382*2e9d4914SAndroid Build Coastguard Worker<p>When using <b>autoconf</b>, the <code>PKG_CHECK_MODULES</code> m4 macro may be used to check for the presence of a given version of <i>libconfig</i>, and set the appropriate Makefile variables automatically. For example:
383*2e9d4914SAndroid Build Coastguard Worker</p>
384*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
385*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">PKG_CHECK_MODULES([LIBCONFIGXX], [libconfig++ &gt;= 1.4],,
386*2e9d4914SAndroid Build Coastguard Worker  AC_MSG_ERROR([libconfig++ 1.4 or newer not found.])
387*2e9d4914SAndroid Build Coastguard Worker)
388*2e9d4914SAndroid Build Coastguard Worker</pre></div>
389*2e9d4914SAndroid Build Coastguard Worker
390*2e9d4914SAndroid Build Coastguard Worker<p>In the above example, if <i>libconfig++</i> version 1.4 or newer is found,
391*2e9d4914SAndroid Build Coastguard Workerthe Makefile variables <code>LIBCONFIGXX_LIBS</code> and <code>LIBCONFIGXX_CFLAGS</code> will be
392*2e9d4914SAndroid Build Coastguard Workerset to the appropriate compiler and linker flags for compiling with
393*2e9d4914SAndroid Build Coastguard Worker<i>libconfig</i>, and if it is not found, the configure script will abort
394*2e9d4914SAndroid Build Coastguard Workerwith an error to that effect.
395*2e9d4914SAndroid Build Coastguard Worker</p>
396*2e9d4914SAndroid Build Coastguard Worker<hr>
397*2e9d4914SAndroid Build Coastguard Worker<a name="Version-Test-Macros"></a>
398*2e9d4914SAndroid Build Coastguard Worker<div class="header">
399*2e9d4914SAndroid Build Coastguard Worker<p>
400*2e9d4914SAndroid Build Coastguard WorkerPrevious: <a href="#Compiling-Using-pkg_002dconfig" accesskey="p" rel="prev">Compiling Using pkg-config</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
401*2e9d4914SAndroid Build Coastguard Worker</div>
402*2e9d4914SAndroid Build Coastguard Worker<a name="Version-Test-Macros-1"></a>
403*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">1.7 Version Test Macros</h3>
404*2e9d4914SAndroid Build Coastguard Worker
405*2e9d4914SAndroid Build Coastguard Worker<p>The <samp>libconfig.h</samp> header declares the following macros:
406*2e9d4914SAndroid Build Coastguard Worker</p>
407*2e9d4914SAndroid Build Coastguard Worker<dl>
408*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-LIBCONFIG_005fVER_005fMAJOR"></a>Macro: <strong>LIBCONFIG_VER_MAJOR</strong></dt>
409*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-LIBCONFIG_005fVER_005fMINOR"></a>Macro: <strong>LIBCONFIG_VER_MINOR</strong></dt>
410*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-LIBCONFIG_005fVER_005fREVISION"></a>Macro: <strong>LIBCONFIG_VER_REVISION</strong></dt>
411*2e9d4914SAndroid Build Coastguard Worker<dd>
412*2e9d4914SAndroid Build Coastguard Worker<p>These macros represent the major version, minor version, and revision
413*2e9d4914SAndroid Build Coastguard Workerof the <i>libconfig</i> library. For example, in <i>libconfig</i> 1.4 these
414*2e9d4914SAndroid Build Coastguard Workerare defined as &lsquo;<samp>1</samp>&rsquo;, &lsquo;<samp>4</samp>&rsquo;, and &lsquo;<samp>0</samp>&rsquo;, respectively. These
415*2e9d4914SAndroid Build Coastguard Workermacros can be used in preprocessor directives to determine which
416*2e9d4914SAndroid Build Coastguard Worker<i>libconfig</i> features and/or APIs are present. For example:
417*2e9d4914SAndroid Build Coastguard Worker</p>
418*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
419*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">#if (((LIBCONFIG_VER_MAJOR == 1) &amp;&amp; (LIBCONFIG_VER_MINOR &gt;= 4)) \
420*2e9d4914SAndroid Build Coastguard Worker     || (LIBCONFIG_VER_MAJOR &gt; 1))
421*2e9d4914SAndroid Build Coastguard Worker  /* use features present in libconfig 1.4 and later */
422*2e9d4914SAndroid Build Coastguard Worker#endif
423*2e9d4914SAndroid Build Coastguard Worker</pre></div>
424*2e9d4914SAndroid Build Coastguard Worker
425*2e9d4914SAndroid Build Coastguard Worker<p>These macros were introduced in <i>libconfig</i> 1.4.
426*2e9d4914SAndroid Build Coastguard Worker</p>
427*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
428*2e9d4914SAndroid Build Coastguard Worker
429*2e9d4914SAndroid Build Coastguard Worker<p>Similarly, the <samp>libconfig.h++</samp> header declares the following macros:
430*2e9d4914SAndroid Build Coastguard Worker</p>
431*2e9d4914SAndroid Build Coastguard Worker<dl>
432*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-LIBCONFIGXX_005fVER_005fMAJOR"></a>Macro: <strong>LIBCONFIGXX_VER_MAJOR</strong></dt>
433*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-LIBCONFIGXX_005fVER_005fMINOR"></a>Macro: <strong>LIBCONFIGXX_VER_MINOR</strong></dt>
434*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-LIBCONFIGXX_005fVER_005fREVISION"></a>Macro: <strong>LIBCONFIGXX_VER_REVISION</strong></dt>
435*2e9d4914SAndroid Build Coastguard Worker<dd>
436*2e9d4914SAndroid Build Coastguard Worker<p>These macros represent the major version, minor version, and revision
437*2e9d4914SAndroid Build Coastguard Workerof the <i>libconfig++</i> library.
438*2e9d4914SAndroid Build Coastguard Worker</p>
439*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
440*2e9d4914SAndroid Build Coastguard Worker
441*2e9d4914SAndroid Build Coastguard Worker<hr>
442*2e9d4914SAndroid Build Coastguard Worker<a name="Configuration-Files"></a>
443*2e9d4914SAndroid Build Coastguard Worker<div class="header">
444*2e9d4914SAndroid Build Coastguard Worker<p>
445*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#The-C-API" accesskey="n" rel="next">The C API</a>, Previous: <a href="#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
446*2e9d4914SAndroid Build Coastguard Worker</div>
447*2e9d4914SAndroid Build Coastguard Worker<table class="menu" border="0" cellspacing="0">
448*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Settings" accesskey="1">Settings</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
449*2e9d4914SAndroid Build Coastguard Worker</td></tr>
450*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Groups" accesskey="2">Groups</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
451*2e9d4914SAndroid Build Coastguard Worker</td></tr>
452*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Arrays" accesskey="3">Arrays</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
453*2e9d4914SAndroid Build Coastguard Worker</td></tr>
454*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Lists" accesskey="4">Lists</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
455*2e9d4914SAndroid Build Coastguard Worker</td></tr>
456*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Integer-Values" accesskey="5">Integer Values</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
457*2e9d4914SAndroid Build Coastguard Worker</td></tr>
458*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#g_t64_002dbit-Integer-Values" accesskey="6">64-bit Integer Values</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
459*2e9d4914SAndroid Build Coastguard Worker</td></tr>
460*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Floating-Point-Values" accesskey="7">Floating Point Values</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
461*2e9d4914SAndroid Build Coastguard Worker</td></tr>
462*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Boolean-Values" accesskey="8">Boolean Values</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
463*2e9d4914SAndroid Build Coastguard Worker</td></tr>
464*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#String-Values" accesskey="9">String Values</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
465*2e9d4914SAndroid Build Coastguard Worker</td></tr>
466*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Comments">Comments</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
467*2e9d4914SAndroid Build Coastguard Worker</td></tr>
468*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Include-Directives">Include Directives</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
469*2e9d4914SAndroid Build Coastguard Worker</td></tr>
470*2e9d4914SAndroid Build Coastguard Worker</table>
471*2e9d4914SAndroid Build Coastguard Worker<a name="Configuration-Files-1"></a>
472*2e9d4914SAndroid Build Coastguard Worker<h2 class="chapter">2 Configuration Files</h2>
473*2e9d4914SAndroid Build Coastguard Worker
474*2e9d4914SAndroid Build Coastguard Worker<p><i>Libconfig</i> supports structured, hierarchical configurations. These
475*2e9d4914SAndroid Build Coastguard Workerconfigurations can be read from and written to files and manipulated
476*2e9d4914SAndroid Build Coastguard Workerin memory.
477*2e9d4914SAndroid Build Coastguard Worker</p>
478*2e9d4914SAndroid Build Coastguard Worker<a name="index-setting"></a>
479*2e9d4914SAndroid Build Coastguard Worker<a name="index-value"></a>
480*2e9d4914SAndroid Build Coastguard Worker<a name="index-scalar-value"></a>
481*2e9d4914SAndroid Build Coastguard Worker<a name="index-array"></a>
482*2e9d4914SAndroid Build Coastguard Worker<a name="index-group"></a>
483*2e9d4914SAndroid Build Coastguard Worker<a name="index-list"></a>
484*2e9d4914SAndroid Build Coastguard Worker<a name="index-configuration"></a>
485*2e9d4914SAndroid Build Coastguard Worker<p>A <em>configuration</em> consists of a group of <em>settings</em>, which
486*2e9d4914SAndroid Build Coastguard Workerassociate names with values. A <em>value</em> can be one of the
487*2e9d4914SAndroid Build Coastguard Workerfollowing:
488*2e9d4914SAndroid Build Coastguard Worker</p>
489*2e9d4914SAndroid Build Coastguard Worker<ul>
490*2e9d4914SAndroid Build Coastguard Worker<li> A <em>scalar value</em>: integer, 64-bit integer, floating-point number, boolean,
491*2e9d4914SAndroid Build Coastguard Workeror string
492*2e9d4914SAndroid Build Coastguard Worker</li><li> An <em>array</em>, which is a sequence of scalar values, all of which must have the same type
493*2e9d4914SAndroid Build Coastguard Worker</li><li> A <em>group</em>, which is a collection of settings
494*2e9d4914SAndroid Build Coastguard Worker</li><li> A <em>list</em>, which is a sequence of values of any type, including other lists
495*2e9d4914SAndroid Build Coastguard Worker</li></ul>
496*2e9d4914SAndroid Build Coastguard Worker
497*2e9d4914SAndroid Build Coastguard Worker<p>Consider the following configuration file for a hypothetical GUI
498*2e9d4914SAndroid Build Coastguard Workerapplication, which illustrates all of the elements of the configuration
499*2e9d4914SAndroid Build Coastguard Workerfile grammar.
500*2e9d4914SAndroid Build Coastguard Worker</p>
501*2e9d4914SAndroid Build Coastguard Worker<br>
502*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
503*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
504*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample"># Example application configuration file
505*2e9d4914SAndroid Build Coastguard Worker
506*2e9d4914SAndroid Build Coastguard Workerversion = &quot;1.0&quot;;
507*2e9d4914SAndroid Build Coastguard Worker
508*2e9d4914SAndroid Build Coastguard Workerapplication:
509*2e9d4914SAndroid Build Coastguard Worker{
510*2e9d4914SAndroid Build Coastguard Worker  window:
511*2e9d4914SAndroid Build Coastguard Worker  {
512*2e9d4914SAndroid Build Coastguard Worker    title = &quot;My Application&quot;;
513*2e9d4914SAndroid Build Coastguard Worker    size = { w = 640; h = 480; };
514*2e9d4914SAndroid Build Coastguard Worker    pos = { x = 350; y = 250; };
515*2e9d4914SAndroid Build Coastguard Worker  };
516*2e9d4914SAndroid Build Coastguard Worker
517*2e9d4914SAndroid Build Coastguard Worker  list = ( ( &quot;abc&quot;, 123, true ), 1.234, ( /* an empty list */ ) );
518*2e9d4914SAndroid Build Coastguard Worker
519*2e9d4914SAndroid Build Coastguard Worker  books = ( { title  = &quot;Treasure Island&quot;;
520*2e9d4914SAndroid Build Coastguard Worker              author = &quot;Robert Louis Stevenson&quot;;
521*2e9d4914SAndroid Build Coastguard Worker              price  = 29.95;
522*2e9d4914SAndroid Build Coastguard Worker              qty    = 5; },
523*2e9d4914SAndroid Build Coastguard Worker            { title  = &quot;Snow Crash&quot;;
524*2e9d4914SAndroid Build Coastguard Worker              author = &quot;Neal Stephenson&quot;;
525*2e9d4914SAndroid Build Coastguard Worker              price  = 9.99;
526*2e9d4914SAndroid Build Coastguard Worker              qty    = 8; } );
527*2e9d4914SAndroid Build Coastguard Worker
528*2e9d4914SAndroid Build Coastguard Worker  misc:
529*2e9d4914SAndroid Build Coastguard Worker  {
530*2e9d4914SAndroid Build Coastguard Worker    pi = 3.141592654;
531*2e9d4914SAndroid Build Coastguard Worker    bigint = 9223372036854775807L;
532*2e9d4914SAndroid Build Coastguard Worker    columns = [ &quot;Last Name&quot;, &quot;First Name&quot;, &quot;MI&quot; ];
533*2e9d4914SAndroid Build Coastguard Worker    bitmask = 0x1FC3;	// hex
534*2e9d4914SAndroid Build Coastguard Worker    umask = 0027;	// octal. Range limited to that of &quot;int&quot;
535*2e9d4914SAndroid Build Coastguard Worker  };
536*2e9d4914SAndroid Build Coastguard Worker};
537*2e9d4914SAndroid Build Coastguard Worker</pre></div>
538*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
539*2e9d4914SAndroid Build Coastguard Worker<br>
540*2e9d4914SAndroid Build Coastguard Worker
541*2e9d4914SAndroid Build Coastguard Worker<a name="index-path"></a>
542*2e9d4914SAndroid Build Coastguard Worker<p>Settings can be uniquely identified within the configuration by a
543*2e9d4914SAndroid Build Coastguard Worker<em>path</em>. The path is a dot-separated sequence of names, beginning
544*2e9d4914SAndroid Build Coastguard Workerat a top-level group and ending at the setting itself. Each name in
545*2e9d4914SAndroid Build Coastguard Workerthe path is the name of a setting; if the setting has no name because
546*2e9d4914SAndroid Build Coastguard Workerit is an element in a list or array, an integer index in square
547*2e9d4914SAndroid Build Coastguard Workerbrackets can be used as the name.
548*2e9d4914SAndroid Build Coastguard Worker</p>
549*2e9d4914SAndroid Build Coastguard Worker<p>For example, in our hypothetical configuration file, the path to the
550*2e9d4914SAndroid Build Coastguard Worker<code>x</code> setting is <code>application.window.pos.x</code>; the path to the
551*2e9d4914SAndroid Build Coastguard Worker<code>version</code> setting is simply <code>version</code>; and the path to the
552*2e9d4914SAndroid Build Coastguard Worker<code>title</code> setting of the second book in the <code>books</code> list is
553*2e9d4914SAndroid Build Coastguard Worker<code>application.books.[1].title</code>.
554*2e9d4914SAndroid Build Coastguard Worker</p>
555*2e9d4914SAndroid Build Coastguard Worker<p>The datatype of a value is determined from the format of the value
556*2e9d4914SAndroid Build Coastguard Workeritself. If the value is enclosed in double quotes, it is treated as a
557*2e9d4914SAndroid Build Coastguard Workerstring. If it looks like an integer or floating point number, it is
558*2e9d4914SAndroid Build Coastguard Workertreated as such. If it is one of the values <code>TRUE</code>, <code>true</code>,
559*2e9d4914SAndroid Build Coastguard Worker<code>FALSE</code>, or <code>false</code> (or any other mixed-case version of
560*2e9d4914SAndroid Build Coastguard Workerthose tokens, e.g., <code>True</code> or <code>FaLsE</code>), it is treated as a
561*2e9d4914SAndroid Build Coastguard Workerboolean. If it consists of a comma-separated list of values enclosed
562*2e9d4914SAndroid Build Coastguard Workerin square brackets, it is treated as an array. And if it consists of a
563*2e9d4914SAndroid Build Coastguard Workercomma-separated list of values enclosed in parentheses, it is treated
564*2e9d4914SAndroid Build Coastguard Workeras a list. Any value which does not meet any of these criteria is
565*2e9d4914SAndroid Build Coastguard Workerconsidered invalid and results in a parse error.
566*2e9d4914SAndroid Build Coastguard Worker</p>
567*2e9d4914SAndroid Build Coastguard Worker<p>All names are case-sensitive. They may consist only of alphanumeric
568*2e9d4914SAndroid Build Coastguard Workercharacters, dashes (&lsquo;<samp>-</samp>&rsquo;), underscores (&lsquo;<samp>_</samp>&rsquo;), and asterisks
569*2e9d4914SAndroid Build Coastguard Worker(&lsquo;<samp>*</samp>&rsquo;), and must begin with a letter or asterisk. No other
570*2e9d4914SAndroid Build Coastguard Workercharacters are allowed.
571*2e9d4914SAndroid Build Coastguard Worker</p>
572*2e9d4914SAndroid Build Coastguard Worker<p>In C and C++, integer, 64-bit integer, floating point, and string
573*2e9d4914SAndroid Build Coastguard Workervalues are mapped to the native types <code>int</code>, <code>long long</code>,
574*2e9d4914SAndroid Build Coastguard Worker<code>double</code>, and <code>const char *</code>, respectively. The boolean type
575*2e9d4914SAndroid Build Coastguard Workeris mapped to <code>int</code> in C and <code>bool</code> in C++.
576*2e9d4914SAndroid Build Coastguard Worker</p>
577*2e9d4914SAndroid Build Coastguard Worker<p>The following sections describe the elements of the configuration file
578*2e9d4914SAndroid Build Coastguard Workergrammar in additional detail.
579*2e9d4914SAndroid Build Coastguard Worker</p>
580*2e9d4914SAndroid Build Coastguard Worker<hr>
581*2e9d4914SAndroid Build Coastguard Worker<a name="Settings"></a>
582*2e9d4914SAndroid Build Coastguard Worker<div class="header">
583*2e9d4914SAndroid Build Coastguard Worker<p>
584*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Groups" accesskey="n" rel="next">Groups</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
585*2e9d4914SAndroid Build Coastguard Worker</div>
586*2e9d4914SAndroid Build Coastguard Worker<a name="Settings-1"></a>
587*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.1 Settings</h3>
588*2e9d4914SAndroid Build Coastguard Worker
589*2e9d4914SAndroid Build Coastguard Worker<p>A setting has the form:
590*2e9d4914SAndroid Build Coastguard Worker</p>
591*2e9d4914SAndroid Build Coastguard Worker<p><i>name</i> <b>=</b> <i>value</i> <b>;</b>
592*2e9d4914SAndroid Build Coastguard Worker</p>
593*2e9d4914SAndroid Build Coastguard Worker<p>or:
594*2e9d4914SAndroid Build Coastguard Worker</p>
595*2e9d4914SAndroid Build Coastguard Worker<p><i>name</i> <b>:</b> <i>value</i> <b>;</b>
596*2e9d4914SAndroid Build Coastguard Worker</p>
597*2e9d4914SAndroid Build Coastguard Worker<p>The trailing semicolon is optional. Whitespace is not significant.
598*2e9d4914SAndroid Build Coastguard Worker</p>
599*2e9d4914SAndroid Build Coastguard Worker<p>The value may be a scalar value, an array, a group, or a list.
600*2e9d4914SAndroid Build Coastguard Worker</p>
601*2e9d4914SAndroid Build Coastguard Worker<hr>
602*2e9d4914SAndroid Build Coastguard Worker<a name="Groups"></a>
603*2e9d4914SAndroid Build Coastguard Worker<div class="header">
604*2e9d4914SAndroid Build Coastguard Worker<p>
605*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Arrays" accesskey="n" rel="next">Arrays</a>, Previous: <a href="#Settings" accesskey="p" rel="prev">Settings</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
606*2e9d4914SAndroid Build Coastguard Worker</div>
607*2e9d4914SAndroid Build Coastguard Worker<a name="Groups-1"></a>
608*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.2 Groups</h3>
609*2e9d4914SAndroid Build Coastguard Worker
610*2e9d4914SAndroid Build Coastguard Worker<p>A group has the form:
611*2e9d4914SAndroid Build Coastguard Worker</p>
612*2e9d4914SAndroid Build Coastguard Worker<p><b>{</b>
613*2e9d4914SAndroid Build Coastguard Worker   <i>settings ...</i>
614*2e9d4914SAndroid Build Coastguard Worker<b>}</b>
615*2e9d4914SAndroid Build Coastguard Worker</p>
616*2e9d4914SAndroid Build Coastguard Worker<p>Groups can contain any number of settings, but each setting must have
617*2e9d4914SAndroid Build Coastguard Workera unique name within the group.
618*2e9d4914SAndroid Build Coastguard Worker</p>
619*2e9d4914SAndroid Build Coastguard Worker<hr>
620*2e9d4914SAndroid Build Coastguard Worker<a name="Arrays"></a>
621*2e9d4914SAndroid Build Coastguard Worker<div class="header">
622*2e9d4914SAndroid Build Coastguard Worker<p>
623*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Lists" accesskey="n" rel="next">Lists</a>, Previous: <a href="#Groups" accesskey="p" rel="prev">Groups</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
624*2e9d4914SAndroid Build Coastguard Worker</div>
625*2e9d4914SAndroid Build Coastguard Worker<a name="Arrays-1"></a>
626*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.3 Arrays</h3>
627*2e9d4914SAndroid Build Coastguard Worker
628*2e9d4914SAndroid Build Coastguard Worker<p>An array has the form:
629*2e9d4914SAndroid Build Coastguard Worker</p>
630*2e9d4914SAndroid Build Coastguard Worker<p><b>[</b> <i>value</i><b>,</b> <i>value ...</i> <b>]</b>
631*2e9d4914SAndroid Build Coastguard Worker</p>
632*2e9d4914SAndroid Build Coastguard Worker<p>An array may have zero or more elements, but the elements must all be
633*2e9d4914SAndroid Build Coastguard Workerscalar values of the same type.
634*2e9d4914SAndroid Build Coastguard Worker</p>
635*2e9d4914SAndroid Build Coastguard Worker<p>The last element in an array may be followed by a comma, which will be ignored.
636*2e9d4914SAndroid Build Coastguard Worker</p>
637*2e9d4914SAndroid Build Coastguard Worker<hr>
638*2e9d4914SAndroid Build Coastguard Worker<a name="Lists"></a>
639*2e9d4914SAndroid Build Coastguard Worker<div class="header">
640*2e9d4914SAndroid Build Coastguard Worker<p>
641*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Integer-Values" accesskey="n" rel="next">Integer Values</a>, Previous: <a href="#Arrays" accesskey="p" rel="prev">Arrays</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
642*2e9d4914SAndroid Build Coastguard Worker</div>
643*2e9d4914SAndroid Build Coastguard Worker<a name="Lists-1"></a>
644*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.4 Lists</h3>
645*2e9d4914SAndroid Build Coastguard Worker
646*2e9d4914SAndroid Build Coastguard Worker<p>A list has the form:
647*2e9d4914SAndroid Build Coastguard Worker</p>
648*2e9d4914SAndroid Build Coastguard Worker<p><b>(</b> <i>value</i><b>,</b> <i>value ...</i> <b>)</b>
649*2e9d4914SAndroid Build Coastguard Worker</p>
650*2e9d4914SAndroid Build Coastguard Worker<p>A list may have zero or more elements, each of which can be a scalar
651*2e9d4914SAndroid Build Coastguard Workervalue, an array, a group, or another list.
652*2e9d4914SAndroid Build Coastguard Worker</p>
653*2e9d4914SAndroid Build Coastguard Worker<p>The last element in a list may be followed by a comma, which will be ignored.
654*2e9d4914SAndroid Build Coastguard Worker</p>
655*2e9d4914SAndroid Build Coastguard Worker<hr>
656*2e9d4914SAndroid Build Coastguard Worker<a name="Integer-Values"></a>
657*2e9d4914SAndroid Build Coastguard Worker<div class="header">
658*2e9d4914SAndroid Build Coastguard Worker<p>
659*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#g_t64_002dbit-Integer-Values" accesskey="n" rel="next">64-bit Integer Values</a>, Previous: <a href="#Lists" accesskey="p" rel="prev">Lists</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
660*2e9d4914SAndroid Build Coastguard Worker</div>
661*2e9d4914SAndroid Build Coastguard Worker<a name="Integer-Values-1"></a>
662*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.5 Integer Values</h3>
663*2e9d4914SAndroid Build Coastguard Worker
664*2e9d4914SAndroid Build Coastguard Worker<p>Integers can be represented in one of two ways: as a series of one or
665*2e9d4914SAndroid Build Coastguard Workermore decimal digits (&lsquo;<samp>0</samp>&rsquo; - &lsquo;<samp>9</samp>&rsquo;), with an optional leading
666*2e9d4914SAndroid Build Coastguard Workersign character (&lsquo;<samp>+</samp>&rsquo; or &lsquo;<samp>-</samp>&rsquo;); or as a hexadecimal value
667*2e9d4914SAndroid Build Coastguard Workerconsisting of the characters &lsquo;<samp>0x</samp>&rsquo; followed by a series of one or
668*2e9d4914SAndroid Build Coastguard Workermore hexadecimal digits (&lsquo;<samp>0</samp>&rsquo; - &lsquo;<samp>9</samp>&rsquo;, &lsquo;<samp>A</samp>&rsquo; - &lsquo;<samp>F</samp>&rsquo;,
669*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>a</samp>&rsquo; - &lsquo;<samp>f</samp>&rsquo;). Additionally, octal notation integers (that is,
670*2e9d4914SAndroid Build Coastguard Workerthose having a leading zero with non-zero value) are also allowed.
671*2e9d4914SAndroid Build Coastguard Worker</p>
672*2e9d4914SAndroid Build Coastguard Worker<hr>
673*2e9d4914SAndroid Build Coastguard Worker<a name="g_t64_002dbit-Integer-Values"></a>
674*2e9d4914SAndroid Build Coastguard Worker<div class="header">
675*2e9d4914SAndroid Build Coastguard Worker<p>
676*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Floating-Point-Values" accesskey="n" rel="next">Floating Point Values</a>, Previous: <a href="#Integer-Values" accesskey="p" rel="prev">Integer Values</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
677*2e9d4914SAndroid Build Coastguard Worker</div>
678*2e9d4914SAndroid Build Coastguard Worker<a name="g_t64_002dbit-Integer-Values-1"></a>
679*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.6 64-bit Integer Values</h3>
680*2e9d4914SAndroid Build Coastguard Worker
681*2e9d4914SAndroid Build Coastguard Worker<p>Long long (64-bit) integers are represented identically to integers,
682*2e9d4914SAndroid Build Coastguard Workerexcept that an &lsquo;L&rsquo; character is appended to indicate a 64-bit
683*2e9d4914SAndroid Build Coastguard Workervalue. For example, &lsquo;<samp>0L</samp>&rsquo; indicates a 64-bit integer value 0.  As
684*2e9d4914SAndroid Build Coastguard Workerof version 1.5 of the library, the trailing &lsquo;L&rsquo; is optional; if the
685*2e9d4914SAndroid Build Coastguard Workerinteger value exceeds the range of a 32-bit integer, it will
686*2e9d4914SAndroid Build Coastguard Workerautomatically be interpreted as a 64-bit integer.
687*2e9d4914SAndroid Build Coastguard Worker</p>
688*2e9d4914SAndroid Build Coastguard Worker<p>The <i>integer</i> and <i>64-bit integer</i> setting types are interchangeable to the
689*2e9d4914SAndroid Build Coastguard Workerextent that a conversion between the corresponding native types would not
690*2e9d4914SAndroid Build Coastguard Workerresult in an overflow or underflow. For example, a <i>long long</i> value can be
691*2e9d4914SAndroid Build Coastguard Workerwritten to a setting that has an <i>integer</i> type, if that value is within the
692*2e9d4914SAndroid Build Coastguard Workerrange of an <i>int</i>. This rule applies to every API function or method that
693*2e9d4914SAndroid Build Coastguard Workerreads a value from or writes a value to a setting: if the type conversion would
694*2e9d4914SAndroid Build Coastguard Workernot result in an overflow or underflow, then the call will succeed, and
695*2e9d4914SAndroid Build Coastguard Workerotherwise it will fail. This behavior was not well-defined prior to version 1.7
696*2e9d4914SAndroid Build Coastguard Workerof the library.
697*2e9d4914SAndroid Build Coastguard Worker</p>
698*2e9d4914SAndroid Build Coastguard Worker<hr>
699*2e9d4914SAndroid Build Coastguard Worker<a name="Floating-Point-Values"></a>
700*2e9d4914SAndroid Build Coastguard Worker<div class="header">
701*2e9d4914SAndroid Build Coastguard Worker<p>
702*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Boolean-Values" accesskey="n" rel="next">Boolean Values</a>, Previous: <a href="#g_t64_002dbit-Integer-Values" accesskey="p" rel="prev">64-bit Integer Values</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
703*2e9d4914SAndroid Build Coastguard Worker</div>
704*2e9d4914SAndroid Build Coastguard Worker<a name="Floating-Point-Values-1"></a>
705*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.7 Floating Point Values</h3>
706*2e9d4914SAndroid Build Coastguard Worker
707*2e9d4914SAndroid Build Coastguard Worker<p>Floating point values consist of a series of one or more digits, one
708*2e9d4914SAndroid Build Coastguard Workerdecimal point, an optional leading sign character (&lsquo;<samp>+</samp>&rsquo; or
709*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>-</samp>&rsquo;), and an optional exponent. An exponent consists of the
710*2e9d4914SAndroid Build Coastguard Workerletter &lsquo;<samp>E</samp>&rsquo; or &lsquo;<samp>e</samp>&rsquo;, an optional sign character, and a series
711*2e9d4914SAndroid Build Coastguard Workerof one or more digits.
712*2e9d4914SAndroid Build Coastguard Worker</p>
713*2e9d4914SAndroid Build Coastguard Worker<hr>
714*2e9d4914SAndroid Build Coastguard Worker<a name="Boolean-Values"></a>
715*2e9d4914SAndroid Build Coastguard Worker<div class="header">
716*2e9d4914SAndroid Build Coastguard Worker<p>
717*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#String-Values" accesskey="n" rel="next">String Values</a>, Previous: <a href="#Floating-Point-Values" accesskey="p" rel="prev">Floating Point Values</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
718*2e9d4914SAndroid Build Coastguard Worker</div>
719*2e9d4914SAndroid Build Coastguard Worker<a name="Boolean-Values-1"></a>
720*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.8 Boolean Values</h3>
721*2e9d4914SAndroid Build Coastguard Worker
722*2e9d4914SAndroid Build Coastguard Worker<p>Boolean values may have one of the following values: &lsquo;<samp>true</samp>&rsquo;,
723*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>false</samp>&rsquo;, or any mixed-case variation thereof.
724*2e9d4914SAndroid Build Coastguard Worker</p>
725*2e9d4914SAndroid Build Coastguard Worker<hr>
726*2e9d4914SAndroid Build Coastguard Worker<a name="String-Values"></a>
727*2e9d4914SAndroid Build Coastguard Worker<div class="header">
728*2e9d4914SAndroid Build Coastguard Worker<p>
729*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Comments" accesskey="n" rel="next">Comments</a>, Previous: <a href="#Boolean-Values" accesskey="p" rel="prev">Boolean Values</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
730*2e9d4914SAndroid Build Coastguard Worker</div>
731*2e9d4914SAndroid Build Coastguard Worker<a name="String-Values-1"></a>
732*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.9 String Values</h3>
733*2e9d4914SAndroid Build Coastguard Worker
734*2e9d4914SAndroid Build Coastguard Worker<a name="index-escape-sequence"></a>
735*2e9d4914SAndroid Build Coastguard Worker<p>String values consist of arbitrary text delimited by double
736*2e9d4914SAndroid Build Coastguard Workerquotes. Literal double quotes can be escaped by preceding them with a
737*2e9d4914SAndroid Build Coastguard Workerbackslash: &lsquo;<samp>\&quot;</samp>&rsquo;. The escape sequences &lsquo;<samp>\\</samp>&rsquo;, &lsquo;<samp>\f</samp>&rsquo;,
738*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>\n</samp>&rsquo;, &lsquo;<samp>\r</samp>&rsquo;, and &lsquo;<samp>\t</samp>&rsquo; are also recognized, and have the
739*2e9d4914SAndroid Build Coastguard Workerusual meaning.
740*2e9d4914SAndroid Build Coastguard Worker</p>
741*2e9d4914SAndroid Build Coastguard Worker<p>In addition, the &lsquo;<samp>\x</samp>&rsquo; escape sequence is supported; this sequence
742*2e9d4914SAndroid Build Coastguard Workermust be followed by <i>exactly two</i> hexadecimal digits, which represent an
743*2e9d4914SAndroid Build Coastguard Worker8-bit ASCII value. For example, &lsquo;<samp>\xFF</samp>&rsquo; represents the character
744*2e9d4914SAndroid Build Coastguard Workerwith ASCII code 0xFF.
745*2e9d4914SAndroid Build Coastguard Worker</p>
746*2e9d4914SAndroid Build Coastguard Worker<p>No other escape sequences are currently supported.
747*2e9d4914SAndroid Build Coastguard Worker</p>
748*2e9d4914SAndroid Build Coastguard Worker<p>Adjacent strings are automatically concatenated, as in C/C++ source
749*2e9d4914SAndroid Build Coastguard Workercode. This is useful for formatting very long strings as sequences of
750*2e9d4914SAndroid Build Coastguard Workershorter strings. For example, the following constructs are equivalent:
751*2e9d4914SAndroid Build Coastguard Worker</p>
752*2e9d4914SAndroid Build Coastguard Worker<ul>
753*2e9d4914SAndroid Build Coastguard Worker<li> <code>&quot;The quick brown fox jumped over the lazy dog.&quot;</code>
754*2e9d4914SAndroid Build Coastguard Worker
755*2e9d4914SAndroid Build Coastguard Worker</li><li> <code>&quot;The quick brown fox&quot;</code> <br>
756*2e9d4914SAndroid Build Coastguard Worker<code>&quot; jumped over the lazy dog.&quot;</code>
757*2e9d4914SAndroid Build Coastguard Worker
758*2e9d4914SAndroid Build Coastguard Worker</li><li> <code>&quot;The quick&quot; /* comment */ &quot; brown fox &quot; // another comment</code> <br>
759*2e9d4914SAndroid Build Coastguard Worker<code>&quot;jumped over the lazy dog.&quot;</code>
760*2e9d4914SAndroid Build Coastguard Worker
761*2e9d4914SAndroid Build Coastguard Worker</li></ul>
762*2e9d4914SAndroid Build Coastguard Worker<hr>
763*2e9d4914SAndroid Build Coastguard Worker<a name="Comments"></a>
764*2e9d4914SAndroid Build Coastguard Worker<div class="header">
765*2e9d4914SAndroid Build Coastguard Worker<p>
766*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Include-Directives" accesskey="n" rel="next">Include Directives</a>, Previous: <a href="#String-Values" accesskey="p" rel="prev">String Values</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
767*2e9d4914SAndroid Build Coastguard Worker</div>
768*2e9d4914SAndroid Build Coastguard Worker<a name="Comments-1"></a>
769*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.10 Comments</h3>
770*2e9d4914SAndroid Build Coastguard Worker
771*2e9d4914SAndroid Build Coastguard Worker<a name="index-comment"></a>
772*2e9d4914SAndroid Build Coastguard Worker<p>Three types of comments are allowed within a configuration:
773*2e9d4914SAndroid Build Coastguard Worker</p>
774*2e9d4914SAndroid Build Coastguard Worker<ul>
775*2e9d4914SAndroid Build Coastguard Worker<li> Script-style comments. All text beginning with a &lsquo;<samp>#</samp>&rsquo; character
776*2e9d4914SAndroid Build Coastguard Workerto the end of the line is ignored.
777*2e9d4914SAndroid Build Coastguard Worker
778*2e9d4914SAndroid Build Coastguard Worker</li><li> C-style comments. All text, including line breaks, between a starting
779*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>/*</samp>&rsquo; sequence and an ending &lsquo;<samp>*/</samp>&rsquo; sequence is ignored.
780*2e9d4914SAndroid Build Coastguard Worker
781*2e9d4914SAndroid Build Coastguard Worker</li><li> C++-style comments. All text beginning with a &lsquo;<samp>//</samp>&rsquo; sequence to the
782*2e9d4914SAndroid Build Coastguard Workerend of the line is ignored.
783*2e9d4914SAndroid Build Coastguard Worker
784*2e9d4914SAndroid Build Coastguard Worker</li></ul>
785*2e9d4914SAndroid Build Coastguard Worker
786*2e9d4914SAndroid Build Coastguard Worker<p>As expected, comment delimiters appearing within quoted strings are
787*2e9d4914SAndroid Build Coastguard Workertreated as literal text.
788*2e9d4914SAndroid Build Coastguard Worker</p>
789*2e9d4914SAndroid Build Coastguard Worker<p>Comments are ignored when the configuration is read in, so they are
790*2e9d4914SAndroid Build Coastguard Workernot treated as part of the configuration. Therefore if the
791*2e9d4914SAndroid Build Coastguard Workerconfiguration is written back out to a stream, any comments that were
792*2e9d4914SAndroid Build Coastguard Workerpresent in the original configuration will be lost.
793*2e9d4914SAndroid Build Coastguard Worker</p>
794*2e9d4914SAndroid Build Coastguard Worker
795*2e9d4914SAndroid Build Coastguard Worker<hr>
796*2e9d4914SAndroid Build Coastguard Worker<a name="Include-Directives"></a>
797*2e9d4914SAndroid Build Coastguard Worker<div class="header">
798*2e9d4914SAndroid Build Coastguard Worker<p>
799*2e9d4914SAndroid Build Coastguard WorkerPrevious: <a href="#Comments" accesskey="p" rel="prev">Comments</a>, Up: <a href="#Configuration-Files" accesskey="u" rel="up">Configuration Files</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
800*2e9d4914SAndroid Build Coastguard Worker</div>
801*2e9d4914SAndroid Build Coastguard Worker<a name="Include-Directives-1"></a>
802*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">2.11 Include Directives</h3>
803*2e9d4914SAndroid Build Coastguard Worker
804*2e9d4914SAndroid Build Coastguard Worker<a name="index-include-directive"></a>
805*2e9d4914SAndroid Build Coastguard Worker<p>A configuration file may &ldquo;include&rdquo; the contents of other files
806*2e9d4914SAndroid Build Coastguard Workerusing an <i>include directive</i>. This directive has the effect of
807*2e9d4914SAndroid Build Coastguard Workerinlining the contents of the named file(s) at the point of inclusion.
808*2e9d4914SAndroid Build Coastguard Worker</p>
809*2e9d4914SAndroid Build Coastguard Worker<p>An include directive must appear on its own line in the input. It has
810*2e9d4914SAndroid Build Coastguard Workerthe form:
811*2e9d4914SAndroid Build Coastguard Worker</p>
812*2e9d4914SAndroid Build Coastguard Worker<p><b>@include &quot;</b><i>path</i><b>&quot;</b>
813*2e9d4914SAndroid Build Coastguard Worker</p>
814*2e9d4914SAndroid Build Coastguard Worker<a name="index-include-function"></a>
815*2e9d4914SAndroid Build Coastguard Worker<p>The interpretation of <i>path</i> depends on the currently registered
816*2e9d4914SAndroid Build Coastguard Worker<i>include function</i>. The default include function prepends the include
817*2e9d4914SAndroid Build Coastguard Workerdirectory, if any, to <i>path</i>, and then interprets the result as a single,
818*2e9d4914SAndroid Build Coastguard Workerliteral file path. The application may supply its own include function which
819*2e9d4914SAndroid Build Coastguard Workerdoes variable substitution, wildcard expansion, or other transformations,
820*2e9d4914SAndroid Build Coastguard Workerreturning a list of zero or more paths to files whose contents should be inlined
821*2e9d4914SAndroid Build Coastguard Workerat the point of inclusion.
822*2e9d4914SAndroid Build Coastguard Worker</p>
823*2e9d4914SAndroid Build Coastguard Worker<p>Any backslashes or double quotes in the path must be escaped as
824*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>\\</samp>&rsquo; and &lsquo;<samp>\&quot;</samp>&rsquo;, respectively.
825*2e9d4914SAndroid Build Coastguard Worker</p>
826*2e9d4914SAndroid Build Coastguard Worker<p>For example, consider the following two configuration files:
827*2e9d4914SAndroid Build Coastguard Worker</p>
828*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
829*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
830*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample"># file: quote.cfg
831*2e9d4914SAndroid Build Coastguard Workerquote = &quot;Criticism may not be agreeable, but it is necessary.&quot;
832*2e9d4914SAndroid Build Coastguard Worker        &quot; It fulfils the same function as pain in the human&quot;
833*2e9d4914SAndroid Build Coastguard Worker        &quot; body. It calls attention to an unhealthy state of&quot;
834*2e9d4914SAndroid Build Coastguard Worker        &quot; things.\n&quot;
835*2e9d4914SAndroid Build Coastguard Worker        &quot;\t--Winston Churchill&quot;;
836*2e9d4914SAndroid Build Coastguard Worker</pre></div>
837*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
838*2e9d4914SAndroid Build Coastguard Worker
839*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
840*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
841*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample"># file: test.cfg
842*2e9d4914SAndroid Build Coastguard Workerinfo: {
843*2e9d4914SAndroid Build Coastguard Worker  name = &quot;Winston Churchill&quot;;
844*2e9d4914SAndroid Build Coastguard Worker  @include &quot;quote.cfg&quot;
845*2e9d4914SAndroid Build Coastguard Worker  country = &quot;UK&quot;;
846*2e9d4914SAndroid Build Coastguard Worker};
847*2e9d4914SAndroid Build Coastguard Worker</pre></div>
848*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
849*2e9d4914SAndroid Build Coastguard Worker
850*2e9d4914SAndroid Build Coastguard Worker<p>The resulting configuration will be equivalent to one in which the
851*2e9d4914SAndroid Build Coastguard Workercontents of the file &lsquo;<samp>quote.cfg</samp>&rsquo; appeared at the point where the
852*2e9d4914SAndroid Build Coastguard Workerinclude directive is placed.
853*2e9d4914SAndroid Build Coastguard Worker</p>
854*2e9d4914SAndroid Build Coastguard Worker<p>Include files may be nested to a maximum of 10 levels; exceeding this
855*2e9d4914SAndroid Build Coastguard Workerlimit results in a parse error.
856*2e9d4914SAndroid Build Coastguard Worker</p>
857*2e9d4914SAndroid Build Coastguard Worker<p>When the path argument to an <b>@include</b> directive is a relative
858*2e9d4914SAndroid Build Coastguard Workerpath, then it will be interpreted as being relative to the include
859*2e9d4914SAndroid Build Coastguard Workerdirectory that has been been set by means of
860*2e9d4914SAndroid Build Coastguard Worker<code>config_set_include_dir()</code>. If no include directory has been set,
861*2e9d4914SAndroid Build Coastguard Workerthen it will be taken as being relative to the program&rsquo;s current
862*2e9d4914SAndroid Build Coastguard Workerworking directory.
863*2e9d4914SAndroid Build Coastguard Worker</p>
864*2e9d4914SAndroid Build Coastguard Worker<p>Like comments, include directives are not part of the configuration
865*2e9d4914SAndroid Build Coastguard Workerfile syntax. They are processed before the configuration itself is
866*2e9d4914SAndroid Build Coastguard Workerparsed. Therefore, they are not preserved when the configuration is
867*2e9d4914SAndroid Build Coastguard Workerwritten back out to a stream. There is presently no support for
868*2e9d4914SAndroid Build Coastguard Workerprogrammatically inserting include directives into a configuration.
869*2e9d4914SAndroid Build Coastguard Worker</p>
870*2e9d4914SAndroid Build Coastguard Worker<hr>
871*2e9d4914SAndroid Build Coastguard Worker<a name="The-C-API"></a>
872*2e9d4914SAndroid Build Coastguard Worker<div class="header">
873*2e9d4914SAndroid Build Coastguard Worker<p>
874*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#The-C_002b_002b-API" accesskey="n" rel="next">The C++ API</a>, Previous: <a href="#Configuration-Files" accesskey="p" rel="prev">Configuration Files</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
875*2e9d4914SAndroid Build Coastguard Worker</div>
876*2e9d4914SAndroid Build Coastguard Worker<a name="The-C-API-1"></a>
877*2e9d4914SAndroid Build Coastguard Worker<h2 class="chapter">3 The C API</h2>
878*2e9d4914SAndroid Build Coastguard Worker
879*2e9d4914SAndroid Build Coastguard Worker<a name="index-config_005ft"></a>
880*2e9d4914SAndroid Build Coastguard Worker<a name="index-config_005fsetting_005ft"></a>
881*2e9d4914SAndroid Build Coastguard Worker<p>This chapter describes the C library API. The type <i>config_t</i>
882*2e9d4914SAndroid Build Coastguard Workerrepresents a configuration, and the type <i>config_setting_t</i> represents
883*2e9d4914SAndroid Build Coastguard Workera configuration setting.
884*2e9d4914SAndroid Build Coastguard Worker</p>
885*2e9d4914SAndroid Build Coastguard Worker<p>The boolean values <code>CONFIG_TRUE</code> and <code>CONFIG_FALSE</code> are
886*2e9d4914SAndroid Build Coastguard Workermacros defined as <code>(1)</code> and <code>(0)</code>, respectively.
887*2e9d4914SAndroid Build Coastguard Worker</p>
888*2e9d4914SAndroid Build Coastguard Worker<dl>
889*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005finit"></a>Function: <em>void</em> <strong>config_init</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
890*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fdestroy"></a>Function: <em>void</em> <strong>config_destroy</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
891*2e9d4914SAndroid Build Coastguard Worker<dd>
892*2e9d4914SAndroid Build Coastguard Worker<p>These functions initialize and destroy the configuration object <var>config</var>.
893*2e9d4914SAndroid Build Coastguard Worker</p>
894*2e9d4914SAndroid Build Coastguard Worker<p><code>config_init()</code> initializes the <i>config_t</i> structure pointed to by
895*2e9d4914SAndroid Build Coastguard Worker<var>config</var> as a new, empty configuration.
896*2e9d4914SAndroid Build Coastguard Worker</p>
897*2e9d4914SAndroid Build Coastguard Worker<p><code>config_destroy()</code> destroys the configuration <var>config</var>,
898*2e9d4914SAndroid Build Coastguard Workerdeallocating all memory associated with the configuration, but does not
899*2e9d4914SAndroid Build Coastguard Workerattempt to deallocate the <i>config_t</i> structure itself.
900*2e9d4914SAndroid Build Coastguard Worker</p>
901*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
902*2e9d4914SAndroid Build Coastguard Worker
903*2e9d4914SAndroid Build Coastguard Worker<dl>
904*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fclear"></a>Function: <em>void</em> <strong>config_clear</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
905*2e9d4914SAndroid Build Coastguard Worker<dd>
906*2e9d4914SAndroid Build Coastguard Worker<p><b>Since <i>v1.7</i></b>
907*2e9d4914SAndroid Build Coastguard Worker</p>
908*2e9d4914SAndroid Build Coastguard Worker<p>This function clears the configuration <var>config</var>. All child settings of the
909*2e9d4914SAndroid Build Coastguard Workerroot setting are recursively destroyed. All other attributes of the configuration
910*2e9d4914SAndroid Build Coastguard Workerare left unchanged.
911*2e9d4914SAndroid Build Coastguard Worker</p>
912*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
913*2e9d4914SAndroid Build Coastguard Worker
914*2e9d4914SAndroid Build Coastguard Worker<dl>
915*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fread"></a>Function: <em>int</em> <strong>config_read</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, FILE&nbsp;*&nbsp;<var>stream</var><!-- /@w -->)</em></dt>
916*2e9d4914SAndroid Build Coastguard Worker<dd>
917*2e9d4914SAndroid Build Coastguard Worker<p>This function reads and parses a configuration from the given
918*2e9d4914SAndroid Build Coastguard Worker<var>stream</var> into the configuration object <var>config</var>. It returns
919*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_TRUE</code> on success, or <code>CONFIG_FALSE</code> on failure; the
920*2e9d4914SAndroid Build Coastguard Worker<code>config_error_text()</code>, <code>config_error_file()</code>,
921*2e9d4914SAndroid Build Coastguard Worker<code>config_error_line()</code>, and <code>config_error_type()</code> functions,
922*2e9d4914SAndroid Build Coastguard Workerdescribed below, can be used to obtain information about the error.
923*2e9d4914SAndroid Build Coastguard Worker</p>
924*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
925*2e9d4914SAndroid Build Coastguard Worker
926*2e9d4914SAndroid Build Coastguard Worker<dl>
927*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fread_005ffile"></a>Function: <em>int</em> <strong>config_read_file</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>filename</var><!-- /@w -->)</em></dt>
928*2e9d4914SAndroid Build Coastguard Worker<dd>
929*2e9d4914SAndroid Build Coastguard Worker<p>This function reads and parses a configuration from the file named
930*2e9d4914SAndroid Build Coastguard Worker<var>filename</var> into the configuration object <var>config</var>. It returns
931*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_TRUE</code> on success, or <code>CONFIG_FALSE</code> on failure; the
932*2e9d4914SAndroid Build Coastguard Worker<code>config_error_text()</code> and <code>config_error_line()</code> functions,
933*2e9d4914SAndroid Build Coastguard Workerdescribed below, can be used to obtain information about the error.
934*2e9d4914SAndroid Build Coastguard Worker</p>
935*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
936*2e9d4914SAndroid Build Coastguard Worker
937*2e9d4914SAndroid Build Coastguard Worker<dl>
938*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fread_005fstring"></a>Function: <em>int</em> <strong>config_read_string</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>str</var><!-- /@w -->)</em></dt>
939*2e9d4914SAndroid Build Coastguard Worker<dd>
940*2e9d4914SAndroid Build Coastguard Worker<p>This function reads and parses a configuration from the string
941*2e9d4914SAndroid Build Coastguard Worker<var>str</var> into the configuration object <var>config</var>. It returns
942*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_TRUE</code> on success, or <code>CONFIG_FALSE</code> on failure; the
943*2e9d4914SAndroid Build Coastguard Worker<code>config_error_text()</code> and <code>config_error_line()</code> functions,
944*2e9d4914SAndroid Build Coastguard Workerdescribed below, can be used to obtain information about the error.
945*2e9d4914SAndroid Build Coastguard Worker</p>
946*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
947*2e9d4914SAndroid Build Coastguard Worker
948*2e9d4914SAndroid Build Coastguard Worker<dl>
949*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fwrite"></a>Function: <em>void</em> <strong>config_write</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, FILE&nbsp;*&nbsp;<var>stream</var><!-- /@w -->)</em></dt>
950*2e9d4914SAndroid Build Coastguard Worker<dd>
951*2e9d4914SAndroid Build Coastguard Worker<p>This function writes the configuration <var>config</var> to the given
952*2e9d4914SAndroid Build Coastguard Worker<var>stream</var>.
953*2e9d4914SAndroid Build Coastguard Worker</p>
954*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
955*2e9d4914SAndroid Build Coastguard Worker
956*2e9d4914SAndroid Build Coastguard Worker<dl>
957*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fwrite_005ffile"></a>Function: <em>int</em> <strong>config_write_file</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>filename</var><!-- /@w -->)</em></dt>
958*2e9d4914SAndroid Build Coastguard Worker<dd>
959*2e9d4914SAndroid Build Coastguard Worker<p>This function writes the configuration <var>config</var> to the file named
960*2e9d4914SAndroid Build Coastguard Worker<var>filename</var>. It returns <code>CONFIG_TRUE</code> on success, or
961*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_FALSE</code> on failure.
962*2e9d4914SAndroid Build Coastguard Worker</p>
963*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
964*2e9d4914SAndroid Build Coastguard Worker
965*2e9d4914SAndroid Build Coastguard Worker<dl>
966*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005ferror_005ftext"></a>Function: <em>const char *</em> <strong>config_error_text</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
967*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005ferror_005ffile"></a>Function: <em>const char *</em> <strong>config_error_file</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
968*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005ferror_005fline"></a>Function: <em>int</em> <strong>config_error_line</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
969*2e9d4914SAndroid Build Coastguard Worker<dd>
970*2e9d4914SAndroid Build Coastguard Worker<p>These functions, which are implemented as macros, return the text,
971*2e9d4914SAndroid Build Coastguard Workerfilename, and line number of the parse error, if one occurred during a
972*2e9d4914SAndroid Build Coastguard Workercall to <code>config_read()</code>, <code>config_read_string()</code>, or
973*2e9d4914SAndroid Build Coastguard Worker<code>config_read_file()</code>. Storage for the strings returned by
974*2e9d4914SAndroid Build Coastguard Worker<code>config_error_text()</code> and <code>config_error_file()</code> are managed
975*2e9d4914SAndroid Build Coastguard Workerby the library and released automatically when the configuration is
976*2e9d4914SAndroid Build Coastguard Workerdestroyed; these strings must not be freed by the caller. If the error
977*2e9d4914SAndroid Build Coastguard Workeroccurred in text that was read from a string or stream,
978*2e9d4914SAndroid Build Coastguard Worker<code>config_error_file()</code> will return NULL.
979*2e9d4914SAndroid Build Coastguard Worker</p>
980*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
981*2e9d4914SAndroid Build Coastguard Worker
982*2e9d4914SAndroid Build Coastguard Worker<dl>
983*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005ferror_005ftype"></a>Function: <em>config_error_t</em> <strong>config_error_type</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
984*2e9d4914SAndroid Build Coastguard Worker<dd><a name="index-config_005ferror_005ft"></a>
985*2e9d4914SAndroid Build Coastguard Worker<p>This function, which is implemented as a macro, returns the type of
986*2e9d4914SAndroid Build Coastguard Workererror that occurred during the last call to one of the read or write
987*2e9d4914SAndroid Build Coastguard Workerfunctions. The <var>config_error_t</var> type is an enumeration with the
988*2e9d4914SAndroid Build Coastguard Workerfollowing values: <code>CONFIG_ERR_NONE</code>, <code>CONFIG_ERR_FILE_IO</code>,
989*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_ERR_PARSE</code>. These represent success, a file I/O error,
990*2e9d4914SAndroid Build Coastguard Workerand a parsing error, respectively.
991*2e9d4914SAndroid Build Coastguard Worker</p>
992*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
993*2e9d4914SAndroid Build Coastguard Worker
994*2e9d4914SAndroid Build Coastguard Worker<dl>
995*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005finclude_005fdir"></a>Function: <em>void</em> <strong>config_set_include_dir</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*<var><span class="nolinebreak">include_dir</span></var><!-- /@w -->)</em></dt>
996*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fget_005finclude_005fdir"></a>Function: <em>const char *</em> <strong>config_get_include_dir</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->)</em></dt>
997*2e9d4914SAndroid Build Coastguard Worker<dd>
998*2e9d4914SAndroid Build Coastguard Worker<p><code>config_set_include_dir()</code> specifies the include directory,
999*2e9d4914SAndroid Build Coastguard Worker<var>include_dir</var>, relative to which the files specified in
1000*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>@include</samp>&rsquo; directives will be located for the configuration
1001*2e9d4914SAndroid Build Coastguard Worker<var>config</var>. By default, there is no include directory, and all
1002*2e9d4914SAndroid Build Coastguard Workerinclude files are expected to be relative to the current working
1003*2e9d4914SAndroid Build Coastguard Workerdirectory. If <var>include_dir</var> is <code>NULL</code>, the default behavior
1004*2e9d4914SAndroid Build Coastguard Workeris reinstated.
1005*2e9d4914SAndroid Build Coastguard Worker</p>
1006*2e9d4914SAndroid Build Coastguard Worker<p>For example, if the include directory is set to <samp>/usr/local/etc</samp>,
1007*2e9d4914SAndroid Build Coastguard Workerthe include directive &lsquo;<samp>@include &quot;configs/extra.cfg&quot;</samp>&rsquo; would include the
1008*2e9d4914SAndroid Build Coastguard Workerfile <samp>/usr/local/etc/configs/extra.cfg</samp>.
1009*2e9d4914SAndroid Build Coastguard Worker</p>
1010*2e9d4914SAndroid Build Coastguard Worker<p><code>config_get_include_dir()</code> returns the current include directory for the
1011*2e9d4914SAndroid Build Coastguard Workerconfiguration <var>config</var>, or <code>NULL</code> if none is set.
1012*2e9d4914SAndroid Build Coastguard Worker</p>
1013*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1014*2e9d4914SAndroid Build Coastguard Worker
1015*2e9d4914SAndroid Build Coastguard Worker<dl>
1016*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005finclude_005ffunc"></a>Function: <em>void</em> <strong>config_set_include_func</strong> <em>(<span class="nolinebreak">config_include_fn_t</span>&nbsp;<var>func</var><!-- /@w -->)</em></dt>
1017*2e9d4914SAndroid Build Coastguard Worker<dd>
1018*2e9d4914SAndroid Build Coastguard Worker<p><b>Since <i>v1.7</i></b>
1019*2e9d4914SAndroid Build Coastguard Worker</p>
1020*2e9d4914SAndroid Build Coastguard Worker<p>Specifies the include function <var>func</var> to use when processing
1021*2e9d4914SAndroid Build Coastguard Workerinclude directives. If <var>func</var> is <code>NULL</code>, the default include function,
1022*2e9d4914SAndroid Build Coastguard Worker<code>config_default_include_func()</code>, will be reinstated.
1023*2e9d4914SAndroid Build Coastguard Worker</p>
1024*2e9d4914SAndroid Build Coastguard Worker<a name="index-config_005finclude_005ffn_005ft"></a>
1025*2e9d4914SAndroid Build Coastguard Worker<p>The type <i>config_include_fn_t</i> is a type alias
1026*2e9d4914SAndroid Build Coastguard Workerfor a function whose signature is:
1027*2e9d4914SAndroid Build Coastguard Worker</p>
1028*2e9d4914SAndroid Build Coastguard Worker<dl>
1029*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-func"></a>Function: <em>const&nbsp;char&nbsp;**<!-- /@w --></em> <strong>func</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*<var><span class="nolinebreak">include_dir</span></var><!-- /@w -->, const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, const&nbsp;char&nbsp;**<var>error</var><!-- /@w -->)</em></dt>
1030*2e9d4914SAndroid Build Coastguard Worker<dd>
1031*2e9d4914SAndroid Build Coastguard Worker<p>The function receives the configuration <var>config</var>, the
1032*2e9d4914SAndroid Build Coastguard Workerconfiguration&rsquo;s current include directory <var>include_dir</var>, the
1033*2e9d4914SAndroid Build Coastguard Workerargument to the include directive <var>path</var>; and a pointer at which
1034*2e9d4914SAndroid Build Coastguard Workerto return an error message <var>error</var>.
1035*2e9d4914SAndroid Build Coastguard Worker</p>
1036*2e9d4914SAndroid Build Coastguard Worker<p>On success, the function should return a <code>NULL</code>-terminated array
1037*2e9d4914SAndroid Build Coastguard Workerof paths. Any relative paths must be relative to the program&rsquo;s current
1038*2e9d4914SAndroid Build Coastguard Workerworking directory. The contents of these files will be inlined at the point
1039*2e9d4914SAndroid Build Coastguard Workerof inclusion, in the order that the paths appear in the
1040*2e9d4914SAndroid Build Coastguard Workerarray. Both the array and its elements should be heap allocated; the
1041*2e9d4914SAndroid Build Coastguard Workerlibrary will take ownership of and eventually free the strings in the
1042*2e9d4914SAndroid Build Coastguard Workerarray and the array itself.
1043*2e9d4914SAndroid Build Coastguard Worker</p>
1044*2e9d4914SAndroid Build Coastguard Worker<p>On failure, the function should return <code>NULL</code> and set <var>*error</var> to a
1045*2e9d4914SAndroid Build Coastguard Workerstatic error string which should be used as the parse error for the
1046*2e9d4914SAndroid Build Coastguard Workerconfiguration; the library does not take ownership of or free this string.
1047*2e9d4914SAndroid Build Coastguard Worker</p>
1048*2e9d4914SAndroid Build Coastguard Worker<p>The default include function, <code>config_default_include_func()</code>,
1049*2e9d4914SAndroid Build Coastguard Workersimply returns a <code>NULL</code>-terminated array containing either a copy
1050*2e9d4914SAndroid Build Coastguard Workerof <var>path</var> if it&rsquo;s an absolute path, or a concatenation of
1051*2e9d4914SAndroid Build Coastguard Worker<var>include_dir</var> and <var>path</var> if it&rsquo;s a relative path.
1052*2e9d4914SAndroid Build Coastguard Worker</p>
1053*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1054*2e9d4914SAndroid Build Coastguard Worker
1055*2e9d4914SAndroid Build Coastguard Worker<p>Application-supplied include functions can perform custom tasks like wildcard
1056*2e9d4914SAndroid Build Coastguard Workerexpansion or variable substitution. For example, consider the include directive:
1057*2e9d4914SAndroid Build Coastguard Worker</p>
1058*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
1059*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
1060*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">@include &quot;configs/*.cfg&quot;
1061*2e9d4914SAndroid Build Coastguard Worker</pre></div>
1062*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
1063*2e9d4914SAndroid Build Coastguard Worker
1064*2e9d4914SAndroid Build Coastguard Worker<p>The include function would be invoked with the path &lsquo;<samp>configs/*.cfg</samp>&rsquo; and
1065*2e9d4914SAndroid Build Coastguard Workercould do wildcard expansion on that path, returning a list of paths to files
1066*2e9d4914SAndroid Build Coastguard Workerwith the file extension &lsquo;<samp>.cfg</samp>&rsquo; in the subdirectory &lsquo;<samp>configs</samp>&rsquo;. Each of
1067*2e9d4914SAndroid Build Coastguard Workerthese files would then be inlined at the location of the include directive.
1068*2e9d4914SAndroid Build Coastguard Worker</p>
1069*2e9d4914SAndroid Build Coastguard Worker<p>Tasks like wildcard expansion and variable substitution are non-trivial to
1070*2e9d4914SAndroid Build Coastguard Workerimplement and typically require platform-specific code. In the interests of
1071*2e9d4914SAndroid Build Coastguard Workerkeeping the library as compact and platform-independent as possible,
1072*2e9d4914SAndroid Build Coastguard Workerimplementations of such include functions are not included.
1073*2e9d4914SAndroid Build Coastguard Worker</p>
1074*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1075*2e9d4914SAndroid Build Coastguard Worker
1076*2e9d4914SAndroid Build Coastguard Worker<dl>
1077*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fget_005ffloat_005fprecision_0028config_005ft-_002aconfig_0029"></a>Function: <em>unsigned short</em> <strong>config_get_float_precision(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->)</strong></dt>
1078*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005ffloat_005fprecision_0028config_005ft-_002aconfig_002c"></a>Function: <em>void</em> <strong>config_set_float_precision(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->,</strong> <em>unsigned&nbsp;short&nbsp;<var>digits</var><!-- /@w -->)</em></dt>
1079*2e9d4914SAndroid Build Coastguard Worker<dd>
1080*2e9d4914SAndroid Build Coastguard Worker<p><b>Since <i>v1.6</i></b>
1081*2e9d4914SAndroid Build Coastguard Worker</p>
1082*2e9d4914SAndroid Build Coastguard Worker<p>These functions get and set the number of decimal digits to output after the
1083*2e9d4914SAndroid Build Coastguard Workerradix character when writing the configuration to a file or stream.
1084*2e9d4914SAndroid Build Coastguard Worker</p>
1085*2e9d4914SAndroid Build Coastguard Worker<p>Valid values for <var>digits</var> range from 0 (no decimals) to about 15
1086*2e9d4914SAndroid Build Coastguard Worker(implementation defined). This parameter has no effect on parsing.
1087*2e9d4914SAndroid Build Coastguard Worker</p>
1088*2e9d4914SAndroid Build Coastguard Worker<p>The default float precision is 6.
1089*2e9d4914SAndroid Build Coastguard Worker</p>
1090*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1091*2e9d4914SAndroid Build Coastguard Worker
1092*2e9d4914SAndroid Build Coastguard Worker<dl>
1093*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fget_005foptions"></a>Function: <em>int</em> <strong>config_get_options</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->)</em></dt>
1094*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005foptions"></a>Function: <em>void</em> <strong>config_set_options</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->, int&nbsp;<var>options</var><!-- /@w -->)</em></dt>
1095*2e9d4914SAndroid Build Coastguard Worker<dd>
1096*2e9d4914SAndroid Build Coastguard Worker<p>These functions get and set the options for the configuration
1097*2e9d4914SAndroid Build Coastguard Worker<var>config</var>. The options affect how configurations are read and
1098*2e9d4914SAndroid Build Coastguard Workerwritten. The following options are defined:
1099*2e9d4914SAndroid Build Coastguard Worker</p>
1100*2e9d4914SAndroid Build Coastguard Worker<dl compact="compact">
1101*2e9d4914SAndroid Build Coastguard Worker<dt><code>CONFIG_OPTION_AUTOCONVERT</code></dt>
1102*2e9d4914SAndroid Build Coastguard Worker<dd><p>Turning this option on enables number auto-conversion for
1103*2e9d4914SAndroid Build Coastguard Workerthe configuration. When this feature is enabled, an attempt to retrieve a
1104*2e9d4914SAndroid Build Coastguard Workerfloating point setting&rsquo;s value into an integer (or vice versa), or
1105*2e9d4914SAndroid Build Coastguard Workerstore an integer to a floating point setting&rsquo;s value (or vice versa)
1106*2e9d4914SAndroid Build Coastguard Workerwill cause the library to silently perform the necessary conversion
1107*2e9d4914SAndroid Build Coastguard Worker(possibly leading to loss of data), rather than reporting failure. By
1108*2e9d4914SAndroid Build Coastguard Workerdefault this option is turned off.
1109*2e9d4914SAndroid Build Coastguard Worker</p>
1110*2e9d4914SAndroid Build Coastguard Worker</dd>
1111*2e9d4914SAndroid Build Coastguard Worker<dt><code>CONFIG_OPTION_SEMICOLON_SEPARATORS</code></dt>
1112*2e9d4914SAndroid Build Coastguard Worker<dd><p>This option controls whether a semicolon (&lsquo;;&rsquo;) is output after each setting
1113*2e9d4914SAndroid Build Coastguard Workerwhen the configuration is written to a file or stream. (The semicolon
1114*2e9d4914SAndroid Build Coastguard Workerseparators are optional in the configuration syntax.) By default this
1115*2e9d4914SAndroid Build Coastguard Workeroption is turned on.
1116*2e9d4914SAndroid Build Coastguard Worker</p>
1117*2e9d4914SAndroid Build Coastguard Worker</dd>
1118*2e9d4914SAndroid Build Coastguard Worker<dt><code>CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS</code></dt>
1119*2e9d4914SAndroid Build Coastguard Worker<dd><p>This option controls whether a colon (&lsquo;:&rsquo;) is output between each
1120*2e9d4914SAndroid Build Coastguard Workergroup setting&rsquo;s name and its value when the configuration is written to
1121*2e9d4914SAndroid Build Coastguard Workera file or stream. If the option is turned off, an equals sign (&lsquo;=&rsquo;) is
1122*2e9d4914SAndroid Build Coastguard Workeroutput instead. (These tokens are interchangeable in the configuration
1123*2e9d4914SAndroid Build Coastguard Workersyntax.) By default this option is turned on.
1124*2e9d4914SAndroid Build Coastguard Worker</p>
1125*2e9d4914SAndroid Build Coastguard Worker</dd>
1126*2e9d4914SAndroid Build Coastguard Worker<dt><code>CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS</code></dt>
1127*2e9d4914SAndroid Build Coastguard Worker<dd><p>This option controls whether a colon (&lsquo;:&rsquo;) is output between each
1128*2e9d4914SAndroid Build Coastguard Workernon-group setting&rsquo;s name and its value when the configuration is written
1129*2e9d4914SAndroid Build Coastguard Workerto a file or stream. If the option is turned off, an equals sign (&lsquo;=&rsquo;)
1130*2e9d4914SAndroid Build Coastguard Workeris output instead. (These tokens are interchangeable in the configuration
1131*2e9d4914SAndroid Build Coastguard Workersyntax.) By default this option is turned off.
1132*2e9d4914SAndroid Build Coastguard Worker</p>
1133*2e9d4914SAndroid Build Coastguard Worker</dd>
1134*2e9d4914SAndroid Build Coastguard Worker<dt><code>CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE</code></dt>
1135*2e9d4914SAndroid Build Coastguard Worker<dd><p>This option controls whether an open brace (&lsquo;{&rsquo;) will be written on its own
1136*2e9d4914SAndroid Build Coastguard Workerline when the configuration is written to a file or stream. If the option is
1137*2e9d4914SAndroid Build Coastguard Workerturned off, the brace will be written at the end of the previous line.
1138*2e9d4914SAndroid Build Coastguard WorkerBy default this option is turned on.
1139*2e9d4914SAndroid Build Coastguard Worker</p>
1140*2e9d4914SAndroid Build Coastguard Worker</dd>
1141*2e9d4914SAndroid Build Coastguard Worker<dt><code>CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION</code></dt>
1142*2e9d4914SAndroid Build Coastguard Worker<dd><p>(<b>Since <i>v1.7</i></b>)
1143*2e9d4914SAndroid Build Coastguard WorkerThis option controls whether scientific notation may be used as appropriate
1144*2e9d4914SAndroid Build Coastguard Workerwhen writing floating point values (corresponding to <code>printf()</code>
1145*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>%g</samp>&rsquo; format) or should never be used (corresponding to <code>printf()</code>
1146*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>%f</samp>&rsquo; format). By default this option is turned off.
1147*2e9d4914SAndroid Build Coastguard Worker</p>
1148*2e9d4914SAndroid Build Coastguard Worker</dd>
1149*2e9d4914SAndroid Build Coastguard Worker<dt><code>CONFIG_OPTION_FSYNC</code></dt>
1150*2e9d4914SAndroid Build Coastguard Worker<dd><p>(<b>Since <i>v1.7.1</i></b>)
1151*2e9d4914SAndroid Build Coastguard WorkerThis option controls whether the <code>config_write_file()</code> function performs
1152*2e9d4914SAndroid Build Coastguard Workeran <i>fsync</i> operation after writing the configuration and before closing the
1153*2e9d4914SAndroid Build Coastguard Workerfile. By default this option is turned off.
1154*2e9d4914SAndroid Build Coastguard Worker</p></dd>
1155*2e9d4914SAndroid Build Coastguard Worker</dl>
1156*2e9d4914SAndroid Build Coastguard Worker
1157*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1158*2e9d4914SAndroid Build Coastguard Worker
1159*2e9d4914SAndroid Build Coastguard Worker<dl>
1160*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fget_005foption"></a>Function: <em>int</em> <strong>config_get_option</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->, int&nbsp;<var>option</var><!-- /@w -->)</em></dt>
1161*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005foption"></a>Function: <em>void</em> <strong>config_set_option</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->, int&nbsp;<var>option</var><!-- /@w -->, int&nbsp;<var>flag</var><!-- /@w -->)</em></dt>
1162*2e9d4914SAndroid Build Coastguard Worker<dd>
1163*2e9d4914SAndroid Build Coastguard Worker<p><b>Since <i>v1.7</i></b>
1164*2e9d4914SAndroid Build Coastguard Worker</p>
1165*2e9d4914SAndroid Build Coastguard Worker<p>These functions get and set the given <var>option</var> of the configuration
1166*2e9d4914SAndroid Build Coastguard Worker<var>config</var>. The option is enabled if <var>flag</var> is <code>CONFIG_TRUE</code> and
1167*2e9d4914SAndroid Build Coastguard Workerdisabled if it is <code>CONFIG_FALSE</code>.
1168*2e9d4914SAndroid Build Coastguard Worker</p>
1169*2e9d4914SAndroid Build Coastguard Worker<p>See <code>config_set_options()</code> above for the list of available options.
1170*2e9d4914SAndroid Build Coastguard Worker</p>
1171*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1172*2e9d4914SAndroid Build Coastguard Worker
1173*2e9d4914SAndroid Build Coastguard Worker
1174*2e9d4914SAndroid Build Coastguard Worker<dl>
1175*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fget_005fauto_005fconvert"></a>Function: <em>int</em> <strong>config_get_auto_convert</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->)</em></dt>
1176*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005fauto_005fconvert"></a>Function: <em>void</em> <strong>config_set_auto_convert</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->, int&nbsp;<var>flag</var><!-- /@w -->)</em></dt>
1177*2e9d4914SAndroid Build Coastguard Worker<dd>
1178*2e9d4914SAndroid Build Coastguard Worker<p>These functions get and set the <code>CONFIG_OPTION_AUTO_CONVERT</code>
1179*2e9d4914SAndroid Build Coastguard Workeroption. They are obsoleted by the <code>config_set_option()</code> and
1180*2e9d4914SAndroid Build Coastguard Worker<code>config_get_option()</code> functions described above.
1181*2e9d4914SAndroid Build Coastguard Worker</p>
1182*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1183*2e9d4914SAndroid Build Coastguard Worker
1184*2e9d4914SAndroid Build Coastguard Worker<dl>
1185*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fget_005fdefault_005fformat"></a>Function: <em>short</em> <strong>config_get_default_format</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
1186*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005fdefault_005fformat"></a>Function: <em>void</em> <strong>config_set_default_format</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, short&nbsp;<var>format</var><!-- /@w -->)</em></dt>
1187*2e9d4914SAndroid Build Coastguard Worker<dd>
1188*2e9d4914SAndroid Build Coastguard Worker<p>These functions, which are implemented as macros, get and set the
1189*2e9d4914SAndroid Build Coastguard Workerdefault external format for settings in the configuration
1190*2e9d4914SAndroid Build Coastguard Worker<var>config</var>. If a non-default format has not been set for a setting
1191*2e9d4914SAndroid Build Coastguard Workerwith <code>config_setting_set_format()</code>, this configuration-wide
1192*2e9d4914SAndroid Build Coastguard Workerdefault format will be used instead when that setting is written to a
1193*2e9d4914SAndroid Build Coastguard Workerfile or stream.
1194*2e9d4914SAndroid Build Coastguard Worker</p>
1195*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1196*2e9d4914SAndroid Build Coastguard Worker
1197*2e9d4914SAndroid Build Coastguard Worker<dl>
1198*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fget_005ftab_005fwidth"></a>Function: <em>unsigned short</em> <strong>config_get_tab_width</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
1199*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005ftab_005fwidth"></a>Function: <em>void</em> <strong>config_set_tab_width</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, unsigned&nbsp;short&nbsp;<var>width</var><!-- /@w -->)</em></dt>
1200*2e9d4914SAndroid Build Coastguard Worker<dd>
1201*2e9d4914SAndroid Build Coastguard Worker<p>These functions, which are implemented as macros, get and set the tab
1202*2e9d4914SAndroid Build Coastguard Workerwidth for the configuration <var>config</var>. The tab width affects the
1203*2e9d4914SAndroid Build Coastguard Workerformatting of the configuration when it is written to a file or
1204*2e9d4914SAndroid Build Coastguard Workerstream: each level of nesting is indented by <var>width</var> spaces, or
1205*2e9d4914SAndroid Build Coastguard Workerby a single tab character if <var>width</var> is 0. The tab width has no
1206*2e9d4914SAndroid Build Coastguard Workereffect on parsing.
1207*2e9d4914SAndroid Build Coastguard Worker</p>
1208*2e9d4914SAndroid Build Coastguard Worker<p>Valid tab widths range from 0 to 15. The default tab width is 2.
1209*2e9d4914SAndroid Build Coastguard Worker</p>
1210*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1211*2e9d4914SAndroid Build Coastguard Worker
1212*2e9d4914SAndroid Build Coastguard Worker<dl>
1213*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005flookup_005fint"></a>Function: <em>int</em> <strong>config_lookup_int</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->, int&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1214*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005flookup_005fint64"></a>Function: <em>int</em> <strong>config_lookup_int64</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->, long&nbsp;long&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1215*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005flookup_005ffloat"></a>Function: <em>int</em> <strong>config_lookup_float</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->, double&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1216*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005flookup_005fbool"></a>Function: <em>int</em> <strong>config_lookup_bool</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->, int&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1217*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005flookup_005fstring"></a>Function: <em>int</em> <strong>config_lookup_string</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->, const&nbsp;char&nbsp;**&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1218*2e9d4914SAndroid Build Coastguard Worker<dd>
1219*2e9d4914SAndroid Build Coastguard Worker<p>These functions look up the value of the setting in the configuration
1220*2e9d4914SAndroid Build Coastguard Worker<var>config</var> specified by the path <var>path</var>. They store the value of
1221*2e9d4914SAndroid Build Coastguard Workerthe setting at <var>value</var> and return <code>CONFIG_TRUE</code> on
1222*2e9d4914SAndroid Build Coastguard Workersuccess. If the setting was not found or if the type of the value did
1223*2e9d4914SAndroid Build Coastguard Workernot match the type requested, they leave the data pointed to by
1224*2e9d4914SAndroid Build Coastguard Worker<var>value</var> unmodified and return <code>CONFIG_FALSE</code>.
1225*2e9d4914SAndroid Build Coastguard Worker</p>
1226*2e9d4914SAndroid Build Coastguard Worker<p>Storage for the string returned by <code>config_lookup_string()</code> is
1227*2e9d4914SAndroid Build Coastguard Workermanaged by the library and released automatically when the setting is
1228*2e9d4914SAndroid Build Coastguard Workerdestroyed or when the setting&rsquo;s value is changed; the string must not
1229*2e9d4914SAndroid Build Coastguard Workerbe freed by the caller.
1230*2e9d4914SAndroid Build Coastguard Worker</p>
1231*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1232*2e9d4914SAndroid Build Coastguard Worker
1233*2e9d4914SAndroid Build Coastguard Worker<dl>
1234*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005flookup"></a>Function: <em>config_setting_t *</em> <strong>config_lookup</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->)</em></dt>
1235*2e9d4914SAndroid Build Coastguard Worker<dd>
1236*2e9d4914SAndroid Build Coastguard Worker<p>This function locates the setting in the configuration <var>config</var>
1237*2e9d4914SAndroid Build Coastguard Workerspecified by the path <var>path</var>. It returns a pointer to the
1238*2e9d4914SAndroid Build Coastguard Worker<code>config_setting_t</code> structure on success, or <code>NULL</code> if the
1239*2e9d4914SAndroid Build Coastguard Workersetting was not found.
1240*2e9d4914SAndroid Build Coastguard Worker</p>
1241*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1242*2e9d4914SAndroid Build Coastguard Worker
1243*2e9d4914SAndroid Build Coastguard Worker<dl>
1244*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005flookup"></a>Function: <em>config_setting_t *</em> <strong>config_setting_lookup</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->)</em></dt>
1245*2e9d4914SAndroid Build Coastguard Worker<dd>
1246*2e9d4914SAndroid Build Coastguard Worker<p>This function locates a setting by a path <var>path</var> relative to
1247*2e9d4914SAndroid Build Coastguard Workerthe setting <var>setting</var>. It returns a pointer to the
1248*2e9d4914SAndroid Build Coastguard Worker<code>config_setting_t</code> structure on success, or <code>NULL</code> if the
1249*2e9d4914SAndroid Build Coastguard Workersetting was not found.
1250*2e9d4914SAndroid Build Coastguard Worker</p>
1251*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1252*2e9d4914SAndroid Build Coastguard Worker
1253*2e9d4914SAndroid Build Coastguard Worker<dl>
1254*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fint"></a>Function: <em>int</em> <strong>config_setting_get_int</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1255*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fint64"></a>Function: <em>long long</em> <strong>config_setting_get_int64</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1256*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005ffloat"></a>Function: <em>double</em> <strong>config_setting_get_float</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1257*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fbool"></a>Function: <em>int</em> <strong>config_setting_get_bool</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1258*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fstring"></a>Function: <em>const char *</em> <strong>config_setting_get_string</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1259*2e9d4914SAndroid Build Coastguard Worker<dd>
1260*2e9d4914SAndroid Build Coastguard Worker<p>These functions return the value of the given <var>setting</var>. If the
1261*2e9d4914SAndroid Build Coastguard Workertype of the setting does not match the type requested, a 0 or
1262*2e9d4914SAndroid Build Coastguard Worker<code>NULL</code> value is returned. Storage for the string returned by
1263*2e9d4914SAndroid Build Coastguard Worker<code>config_setting_get_string()</code> is managed by the library and
1264*2e9d4914SAndroid Build Coastguard Workerreleased automatically when the setting is destroyed or when the
1265*2e9d4914SAndroid Build Coastguard Workersetting&rsquo;s value is changed; the string must not be freed by the
1266*2e9d4914SAndroid Build Coastguard Workercaller.
1267*2e9d4914SAndroid Build Coastguard Worker</p>
1268*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1269*2e9d4914SAndroid Build Coastguard Worker<dl>
1270*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fint"></a>Function: <em>int</em> <strong>config_setting_set_int</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1271*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fint64"></a>Function: <em>int</em> <strong>config_setting_set_int64</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, long&nbsp;long&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1272*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005ffloat"></a>Function: <em>int</em> <strong>config_setting_set_float</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, double&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1273*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fbool"></a>Function: <em>int</em> <strong>config_setting_set_bool</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1274*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fstring"></a>Function: <em>int</em> <strong>config_setting_set_string</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1275*2e9d4914SAndroid Build Coastguard Worker<dd>
1276*2e9d4914SAndroid Build Coastguard Worker<p>These functions set the value of the given <var>setting</var> to
1277*2e9d4914SAndroid Build Coastguard Worker<var>value</var>. On success, they return <code>CONFIG_TRUE</code>. If
1278*2e9d4914SAndroid Build Coastguard Workerthe setting does not match the type of the value, they return
1279*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_FALSE</code>. <code>config_setting_set_string()</code> makes a copy
1280*2e9d4914SAndroid Build Coastguard Workerof the passed string <var>value</var>, so it may be subsequently freed or
1281*2e9d4914SAndroid Build Coastguard Workermodified by the caller without affecting the value of the setting.
1282*2e9d4914SAndroid Build Coastguard Worker</p>
1283*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1284*2e9d4914SAndroid Build Coastguard Worker
1285*2e9d4914SAndroid Build Coastguard Worker<dl>
1286*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005flookup_005fint"></a>Function: <em>int</em> <strong>config_setting_lookup_int</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>name</var><!-- /@w -->, int&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1287*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005flookup_005fint64"></a>Function: <em>int</em> <strong>config_setting_lookup_int64</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>name</var><!-- /@w -->, long&nbsp;long&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1288*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005flookup_005ffloat"></a>Function: <em>int</em> <strong>config_setting_lookup_float</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>name</var><!-- /@w -->, double&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1289*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005flookup_005fbool"></a>Function: <em>int</em> <strong>config_setting_lookup_bool</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>name</var><!-- /@w -->, int&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1290*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005flookup_005fstring"></a>Function: <em>int</em> <strong>config_setting_lookup_string</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>name</var><!-- /@w -->, const&nbsp;char&nbsp;**&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1291*2e9d4914SAndroid Build Coastguard Worker<dd>
1292*2e9d4914SAndroid Build Coastguard Worker<p>These functions look up the value of the child setting named
1293*2e9d4914SAndroid Build Coastguard Worker<var>name</var> of the setting <var>setting</var>. They store the value at
1294*2e9d4914SAndroid Build Coastguard Worker<var>value</var> and return <code>CONFIG_TRUE</code> on success. If the setting
1295*2e9d4914SAndroid Build Coastguard Workerwas not found or if the type of the value did not match the type
1296*2e9d4914SAndroid Build Coastguard Workerrequested, they leave the data pointed to by <var>value</var> unmodified
1297*2e9d4914SAndroid Build Coastguard Workerand return <code>CONFIG_FALSE</code>.
1298*2e9d4914SAndroid Build Coastguard Worker</p>
1299*2e9d4914SAndroid Build Coastguard Worker<p>Storage for the string returned by <code>config_setting_lookup_string()</code> is
1300*2e9d4914SAndroid Build Coastguard Workermanaged by the library and released automatically when the setting is
1301*2e9d4914SAndroid Build Coastguard Workerdestroyed or when the setting&rsquo;s value is changed; the string must not
1302*2e9d4914SAndroid Build Coastguard Workerbe freed by the caller.
1303*2e9d4914SAndroid Build Coastguard Worker</p>
1304*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1305*2e9d4914SAndroid Build Coastguard Worker
1306*2e9d4914SAndroid Build Coastguard Worker<dl>
1307*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fformat"></a>Function: <em>short</em> <strong>config_setting_get_format</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1308*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fformat"></a>Function: <em>int</em> <strong>config_setting_set_format</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, short&nbsp;<var>format</var><!-- /@w -->)</em></dt>
1309*2e9d4914SAndroid Build Coastguard Worker<dd>
1310*2e9d4914SAndroid Build Coastguard Worker<p>These functions get and set the external format for the setting <var>setting</var>.
1311*2e9d4914SAndroid Build Coastguard Worker</p>
1312*2e9d4914SAndroid Build Coastguard Worker<a name="index-SettingFormat"></a>
1313*2e9d4914SAndroid Build Coastguard Worker<a name="index-format"></a>
1314*2e9d4914SAndroid Build Coastguard Worker
1315*2e9d4914SAndroid Build Coastguard Worker<p>The <var>format</var> must be one of the constants
1316*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_FORMAT_DEFAULT</code> or <code>CONFIG_FORMAT_HEX</code>. All settings
1317*2e9d4914SAndroid Build Coastguard Workersupport the <code>CONFIG_FORMAT_DEFAULT</code> format. The
1318*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_FORMAT_HEX</code> format specifies hexadecimal formatting for
1319*2e9d4914SAndroid Build Coastguard Workerinteger values, and hence only applies to settings of type
1320*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_TYPE_INT</code> and <code>CONFIG_TYPE_INT64</code>.  If <var>format</var>
1321*2e9d4914SAndroid Build Coastguard Workeris invalid for the given setting, it is ignored.
1322*2e9d4914SAndroid Build Coastguard Worker</p>
1323*2e9d4914SAndroid Build Coastguard Worker<p>If a non-default format has not been set for the setting, <code>config_setting_get_format()</code> returns the default format for the configuration, as set by <code>config_set_default_format()</code>.
1324*2e9d4914SAndroid Build Coastguard Worker</p>
1325*2e9d4914SAndroid Build Coastguard Worker<p><code>config_setting_set_format()</code> returns <code>CONFIG_TRUE</code> on
1326*2e9d4914SAndroid Build Coastguard Workersuccess and <code>CONFIG_FALSE</code> on failure.
1327*2e9d4914SAndroid Build Coastguard Worker</p>
1328*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1329*2e9d4914SAndroid Build Coastguard Worker
1330*2e9d4914SAndroid Build Coastguard Worker
1331*2e9d4914SAndroid Build Coastguard Worker<dl>
1332*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fmember"></a>Function: <em>config_setting_t *</em> <strong>config_setting_get_member</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>name</var><!-- /@w -->)</em></dt>
1333*2e9d4914SAndroid Build Coastguard Worker<dd>
1334*2e9d4914SAndroid Build Coastguard Worker<p>This function fetches the child setting named <var>name</var> from the group
1335*2e9d4914SAndroid Build Coastguard Worker<var>setting</var>. It returns the requested setting on success, or
1336*2e9d4914SAndroid Build Coastguard Worker<code>NULL</code> if the setting was not found or if <var>setting</var> is not a
1337*2e9d4914SAndroid Build Coastguard Workergroup.
1338*2e9d4914SAndroid Build Coastguard Worker</p>
1339*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1340*2e9d4914SAndroid Build Coastguard Worker
1341*2e9d4914SAndroid Build Coastguard Worker<dl>
1342*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005felem"></a>Function: <em>config_setting_t *</em> <strong>config_setting_get_elem</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, unsigned&nbsp;int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1343*2e9d4914SAndroid Build Coastguard Worker<dd>
1344*2e9d4914SAndroid Build Coastguard Worker<p>This function fetches the element at the given index <var>index</var> in the
1345*2e9d4914SAndroid Build Coastguard Workersetting <var>setting</var>, which must be an array, list, or group. It returns the
1346*2e9d4914SAndroid Build Coastguard Workerrequested setting on success, or <code>NULL</code> if <var>index</var> is out of
1347*2e9d4914SAndroid Build Coastguard Workerrange or if <var>setting</var> is not an array, list, or group.
1348*2e9d4914SAndroid Build Coastguard Worker</p>
1349*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1350*2e9d4914SAndroid Build Coastguard Worker
1351*2e9d4914SAndroid Build Coastguard Worker<dl>
1352*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fint_005felem"></a>Function: <em>int</em> <strong>config_setting_get_int_elem</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1353*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fint64_005felem"></a>Function: <em>long long</em> <strong>config_setting_get_int64_elem</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1354*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005ffloat_005felem"></a>Function: <em>double</em> <strong>config_setting_get_float_elem</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1355*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fbool_005felem"></a>Function: <em>int</em> <strong>config_setting_get_bool_elem</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1356*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fstring_005felem"></a>Function: <em>const char *</em> <strong>config_setting_get_string_elem</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1357*2e9d4914SAndroid Build Coastguard Worker<dd>
1358*2e9d4914SAndroid Build Coastguard Worker<p>These functions return the value at the specified index <var>index</var> in the
1359*2e9d4914SAndroid Build Coastguard Workersetting <var>setting</var>. If the setting is not an array or list, or if
1360*2e9d4914SAndroid Build Coastguard Workerthe type of the element does not match the type requested, or if
1361*2e9d4914SAndroid Build Coastguard Worker<var>index</var> is out of range, they return 0 or <code>NULL</code>. Storage for
1362*2e9d4914SAndroid Build Coastguard Workerthe string returned by <code>config_setting_get_string_elem()</code> is
1363*2e9d4914SAndroid Build Coastguard Workermanaged by the library and released automatically when the setting is
1364*2e9d4914SAndroid Build Coastguard Workerdestroyed or when its value is changed; the string must not be freed
1365*2e9d4914SAndroid Build Coastguard Workerby the caller.
1366*2e9d4914SAndroid Build Coastguard Worker</p></dd></dl>
1367*2e9d4914SAndroid Build Coastguard Worker
1368*2e9d4914SAndroid Build Coastguard Worker<dl>
1369*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fint_005felem"></a>Function: <em>config_setting_t *</em> <strong>config_setting_set_int_elem</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->, int&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1370*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fint64_005felem"></a>Function: <em>config_setting_t *</em> <strong>config_setting_set_int64_elem</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->, long&nbsp;long&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1371*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005ffloat_005felem"></a>Function: <em>config_setting_t *</em> <strong>config_setting_set_float_elem</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->, double&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1372*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fbool_005felem"></a>Function: <em>config_setting_t *</em> <strong>config_setting_set_bool_elem</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->, int&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1373*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fstring_005felem"></a>Function: <em>config_setting_t *</em> <strong>config_setting_set_string_elem</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>value</var><!-- /@w -->)</em></dt>
1374*2e9d4914SAndroid Build Coastguard Worker<dd>
1375*2e9d4914SAndroid Build Coastguard Worker<p>These functions set the value at the specified index <var>index</var> in the
1376*2e9d4914SAndroid Build Coastguard Workersetting <var>setting</var> to <var>value</var>. If <var>index</var> is negative, a
1377*2e9d4914SAndroid Build Coastguard Workernew element is added to the end of the array or list. On success,
1378*2e9d4914SAndroid Build Coastguard Workerthese functions return a pointer to the setting representing the
1379*2e9d4914SAndroid Build Coastguard Workerelement. If the setting is not an array or list, or if the setting is
1380*2e9d4914SAndroid Build Coastguard Workeran array and the type of the array does not match the type of the
1381*2e9d4914SAndroid Build Coastguard Workervalue, or if <var>index</var> is out of range, they return
1382*2e9d4914SAndroid Build Coastguard Worker<code>NULL</code>. <code>config_setting_set_string_elem()</code> makes a copy of
1383*2e9d4914SAndroid Build Coastguard Workerthe passed string <var>value</var>, so it may be subsequently freed or
1384*2e9d4914SAndroid Build Coastguard Workermodified by the caller without affecting the value of the setting.
1385*2e9d4914SAndroid Build Coastguard Worker</p></dd></dl>
1386*2e9d4914SAndroid Build Coastguard Worker
1387*2e9d4914SAndroid Build Coastguard Worker<dl>
1388*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fadd"></a>Function: <em>config_setting_t *</em> <strong>config_setting_add</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>parent</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>name</var><!-- /@w -->, int&nbsp;<var>type</var><!-- /@w -->)</em></dt>
1389*2e9d4914SAndroid Build Coastguard Worker<dd>
1390*2e9d4914SAndroid Build Coastguard Worker<p>This function adds a new child setting or element to the setting
1391*2e9d4914SAndroid Build Coastguard Worker<var>parent</var>, which must be a group, array, or list. If <var>parent</var>
1392*2e9d4914SAndroid Build Coastguard Workeris an array or list, the <var>name</var> parameter is ignored and may be
1393*2e9d4914SAndroid Build Coastguard Worker<code>NULL</code>.
1394*2e9d4914SAndroid Build Coastguard Worker</p>
1395*2e9d4914SAndroid Build Coastguard Worker<p>The function returns the new setting on success, or <code>NULL</code> if
1396*2e9d4914SAndroid Build Coastguard Worker<var>parent</var> is not a group, array, or list; or if there is already a
1397*2e9d4914SAndroid Build Coastguard Workerchild setting of <var>parent</var> named <var>name</var>; or if <var>type</var> is
1398*2e9d4914SAndroid Build Coastguard Workerinvalid. If <var>type</var> is a scalar type, the new setting will have a
1399*2e9d4914SAndroid Build Coastguard Workerdefault value of 0, 0.0, <code>false</code>, or <code>NULL</code>, as appropriate.
1400*2e9d4914SAndroid Build Coastguard Worker</p></dd></dl>
1401*2e9d4914SAndroid Build Coastguard Worker
1402*2e9d4914SAndroid Build Coastguard Worker<dl>
1403*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fremove"></a>Function: <em>int</em> <strong>config_setting_remove</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>parent</var><!-- /@w -->, const&nbsp;char&nbsp;*&nbsp;<var>name</var><!-- /@w -->)</em></dt>
1404*2e9d4914SAndroid Build Coastguard Worker<dd>
1405*2e9d4914SAndroid Build Coastguard Worker<p>This function removes and destroys the setting named <var>name</var> from
1406*2e9d4914SAndroid Build Coastguard Workerthe parent setting <var>parent</var>, which must be a group. Any child
1407*2e9d4914SAndroid Build Coastguard Workersettings of the setting are recursively destroyed as well.
1408*2e9d4914SAndroid Build Coastguard Worker</p>
1409*2e9d4914SAndroid Build Coastguard Worker<p>The <var>name</var> parameter can also specify a setting <i>path</i> relative to
1410*2e9d4914SAndroid Build Coastguard Workerthe provided <var>parent</var>.
1411*2e9d4914SAndroid Build Coastguard Worker(In that case, the setting will be looked up and removed.)
1412*2e9d4914SAndroid Build Coastguard Worker</p>
1413*2e9d4914SAndroid Build Coastguard Worker<p>The function returns <code>CONFIG_TRUE</code> on success. If <var>parent</var> is
1414*2e9d4914SAndroid Build Coastguard Workernot a group, or if it has no setting with the given name, it returns
1415*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_FALSE</code>.
1416*2e9d4914SAndroid Build Coastguard Worker</p>
1417*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1418*2e9d4914SAndroid Build Coastguard Worker
1419*2e9d4914SAndroid Build Coastguard Worker<dl>
1420*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fremove_005felem"></a>Function: <em>int</em> <strong>config_setting_remove_elem</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>parent</var><!-- /@w -->, unsigned&nbsp;int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1421*2e9d4914SAndroid Build Coastguard Worker<dd>
1422*2e9d4914SAndroid Build Coastguard Worker<p>This function removes the child setting at the given index <var>index</var> from
1423*2e9d4914SAndroid Build Coastguard Workerthe setting <var>parent</var>, which must be a group, list, or array. Any
1424*2e9d4914SAndroid Build Coastguard Workerchild settings of the removed setting are recursively destroyed as
1425*2e9d4914SAndroid Build Coastguard Workerwell.
1426*2e9d4914SAndroid Build Coastguard Worker</p>
1427*2e9d4914SAndroid Build Coastguard Worker<p>The function returns <code>CONFIG_TRUE</code> on success. If <var>parent</var> is
1428*2e9d4914SAndroid Build Coastguard Workernot a group, list, or array, or if <var>index</var> is out of range, it returns
1429*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_FALSE</code>.
1430*2e9d4914SAndroid Build Coastguard Worker</p>
1431*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1432*2e9d4914SAndroid Build Coastguard Worker
1433*2e9d4914SAndroid Build Coastguard Worker<dl>
1434*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005froot_005fsetting"></a>Function: <em>config_setting_t *</em> <strong>config_root_setting</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
1435*2e9d4914SAndroid Build Coastguard Worker<dd>
1436*2e9d4914SAndroid Build Coastguard Worker<p>This function, which is implemented as a macro, returns the root setting for the configuration <var>config</var>. The root setting is a group.
1437*2e9d4914SAndroid Build Coastguard Worker</p>
1438*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1439*2e9d4914SAndroid Build Coastguard Worker
1440*2e9d4914SAndroid Build Coastguard Worker<dl>
1441*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fname"></a>Function: <em>const char *</em> <strong>config_setting_name</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1442*2e9d4914SAndroid Build Coastguard Worker<dd>
1443*2e9d4914SAndroid Build Coastguard Worker<p>This function returns the name of the given <var>setting</var>, or
1444*2e9d4914SAndroid Build Coastguard Worker<code>NULL</code> if the setting has no name. Storage for the returned
1445*2e9d4914SAndroid Build Coastguard Workerstring is managed by the library and released automatically when the
1446*2e9d4914SAndroid Build Coastguard Workersetting is destroyed; the string must not be freed by the caller.
1447*2e9d4914SAndroid Build Coastguard Worker</p>
1448*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1449*2e9d4914SAndroid Build Coastguard Worker
1450*2e9d4914SAndroid Build Coastguard Worker<dl>
1451*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fparent"></a>Function: <em>config_setting_t *</em> <strong>config_setting_parent</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1452*2e9d4914SAndroid Build Coastguard Worker<dd>
1453*2e9d4914SAndroid Build Coastguard Worker<p>This function returns the parent setting of the given <var>setting</var>,
1454*2e9d4914SAndroid Build Coastguard Workeror <code>NULL</code> if <var>setting</var> is the root setting.
1455*2e9d4914SAndroid Build Coastguard Worker</p>
1456*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1457*2e9d4914SAndroid Build Coastguard Worker
1458*2e9d4914SAndroid Build Coastguard Worker<dl>
1459*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fis_005froot"></a>Function: <em>int</em> <strong>config_setting_is_root</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1460*2e9d4914SAndroid Build Coastguard Worker<dd>
1461*2e9d4914SAndroid Build Coastguard Worker<p>This function returns <code>CONFIG_TRUE</code> if the given <var>setting</var> is
1462*2e9d4914SAndroid Build Coastguard Workerthe root setting, and <code>CONFIG_FALSE</code> otherwise.
1463*2e9d4914SAndroid Build Coastguard Worker</p>
1464*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1465*2e9d4914SAndroid Build Coastguard Worker
1466*2e9d4914SAndroid Build Coastguard Worker<dl>
1467*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005findex"></a>Function: <em>int</em> <strong>config_setting_index</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1468*2e9d4914SAndroid Build Coastguard Worker<dd>
1469*2e9d4914SAndroid Build Coastguard Worker<p>This function returns the index of the given <var>setting</var> within its
1470*2e9d4914SAndroid Build Coastguard Workerparent setting. If <var>setting</var> is the root setting, this function
1471*2e9d4914SAndroid Build Coastguard Workerreturns -1.
1472*2e9d4914SAndroid Build Coastguard Worker</p>
1473*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1474*2e9d4914SAndroid Build Coastguard Worker
1475*2e9d4914SAndroid Build Coastguard Worker<dl>
1476*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005flength"></a>Function: <em>int</em> <strong>config_setting_length</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1477*2e9d4914SAndroid Build Coastguard Worker<dd>
1478*2e9d4914SAndroid Build Coastguard Worker<p>This function returns the number of settings in a group, or the number of
1479*2e9d4914SAndroid Build Coastguard Workerelements in a list or array. For other types of settings, it returns
1480*2e9d4914SAndroid Build Coastguard Worker0.
1481*2e9d4914SAndroid Build Coastguard Worker</p>
1482*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1483*2e9d4914SAndroid Build Coastguard Worker
1484*2e9d4914SAndroid Build Coastguard Worker<dl>
1485*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005ftype"></a>Function: <em>int</em> <strong>config_setting_type</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1486*2e9d4914SAndroid Build Coastguard Worker<dd>
1487*2e9d4914SAndroid Build Coastguard Worker<p>This function returns the type of the given <var>setting</var>. The return
1488*2e9d4914SAndroid Build Coastguard Workervalue is one of the constants
1489*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_TYPE_INT</code>, <code>CONFIG_TYPE_INT64</code>, <code>CONFIG_TYPE_FLOAT</code>,
1490*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_TYPE_STRING</code>, <code>CONFIG_TYPE_BOOL</code>,
1491*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_TYPE_ARRAY</code>, <code>CONFIG_TYPE_LIST</code>, or <code>CONFIG_TYPE_GROUP</code>.
1492*2e9d4914SAndroid Build Coastguard Worker</p>
1493*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1494*2e9d4914SAndroid Build Coastguard Worker
1495*2e9d4914SAndroid Build Coastguard Worker<dl>
1496*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fis_005fgroup"></a>Function: <em>int</em> <strong>config_setting_is_group</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1497*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fis_005farray"></a>Function: <em>int</em> <strong>config_setting_is_array</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1498*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fis_005flist"></a>Function: <em>int</em> <strong>config_setting_is_list</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1499*2e9d4914SAndroid Build Coastguard Worker<dd>
1500*2e9d4914SAndroid Build Coastguard Worker<p>These convenience functions, which are implemented as macros, test if
1501*2e9d4914SAndroid Build Coastguard Workerthe setting <var>setting</var> is of a given type. They return
1502*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_TRUE</code> or <code>CONFIG_FALSE</code>.
1503*2e9d4914SAndroid Build Coastguard Worker</p>
1504*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1505*2e9d4914SAndroid Build Coastguard Worker
1506*2e9d4914SAndroid Build Coastguard Worker<dl>
1507*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fis_005faggregate"></a>Function: <em>int</em> <strong>config_setting_is_aggregate</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1508*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fis_005fscalar"></a>Function: <em>int</em> <strong>config_setting_is_scalar</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1509*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fis_005fnumber"></a>Function: <em>int</em> <strong>config_setting_is_number</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1510*2e9d4914SAndroid Build Coastguard Worker<dd>
1511*2e9d4914SAndroid Build Coastguard Worker<a name="index-aggregate-value"></a>
1512*2e9d4914SAndroid Build Coastguard Worker<p>These convenience functions, some of which are implemented as macros, test if
1513*2e9d4914SAndroid Build Coastguard Workerthe setting <var>setting</var> is of an aggregate type (a group, array, or
1514*2e9d4914SAndroid Build Coastguard Workerlist), of a scalar type (integer, 64-bit integer, floating point,
1515*2e9d4914SAndroid Build Coastguard Workerboolean, or string), and of a number (integer, 64-bit integer, or
1516*2e9d4914SAndroid Build Coastguard Workerfloating point), respectively. They return <code>CONFIG_TRUE</code> or
1517*2e9d4914SAndroid Build Coastguard Worker<code>CONFIG_FALSE</code>.
1518*2e9d4914SAndroid Build Coastguard Worker</p>
1519*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1520*2e9d4914SAndroid Build Coastguard Worker
1521*2e9d4914SAndroid Build Coastguard Worker<dl>
1522*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fsource_005ffile"></a>Function: <em>const char *</em> <strong>config_setting_source_file</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1523*2e9d4914SAndroid Build Coastguard Worker<dd>
1524*2e9d4914SAndroid Build Coastguard Worker<p>This function returns the name of the file from which the setting
1525*2e9d4914SAndroid Build Coastguard Worker<var>setting</var> was read, or NULL if the setting was not read from a
1526*2e9d4914SAndroid Build Coastguard Workerfile. This information is useful for reporting application-level
1527*2e9d4914SAndroid Build Coastguard Workererrors. Storage for the returned string is managed by the library and
1528*2e9d4914SAndroid Build Coastguard Workerreleased automatically when the configuration is destroyed; the
1529*2e9d4914SAndroid Build Coastguard Workerstring must not be freed by the caller.
1530*2e9d4914SAndroid Build Coastguard Worker</p>
1531*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1532*2e9d4914SAndroid Build Coastguard Worker
1533*2e9d4914SAndroid Build Coastguard Worker<dl>
1534*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fsource_005fline"></a>Function: <em>unsigned int</em> <strong>config_setting_source_line</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1535*2e9d4914SAndroid Build Coastguard Worker<dd>
1536*2e9d4914SAndroid Build Coastguard Worker<p>This function returns the line number of the configuration file or
1537*2e9d4914SAndroid Build Coastguard Workerstream at which the setting <var>setting</var> was read, or 0 if no line
1538*2e9d4914SAndroid Build Coastguard Workernumber is available. This information is useful for reporting
1539*2e9d4914SAndroid Build Coastguard Workerapplication-level errors.
1540*2e9d4914SAndroid Build Coastguard Worker</p>
1541*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1542*2e9d4914SAndroid Build Coastguard Worker
1543*2e9d4914SAndroid Build Coastguard Worker<dl>
1544*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005fhook"></a>Function: <em>void</em> <strong>config_set_hook</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, void&nbsp;*&nbsp;<var>hook</var><!-- /@w -->)</em></dt>
1545*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fget_005fhook"></a>Function: <em>void *</em> <strong>config_get_hook</strong> <em>(const&nbsp;<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->)</em></dt>
1546*2e9d4914SAndroid Build Coastguard Worker<dd>
1547*2e9d4914SAndroid Build Coastguard Worker<p><b>Since <i>v1.7</i></b>
1548*2e9d4914SAndroid Build Coastguard Worker</p>
1549*2e9d4914SAndroid Build Coastguard Worker<a name="index-hook"></a>
1550*2e9d4914SAndroid Build Coastguard Worker<p>These functions make it possible to attach arbitrary data to a configuration
1551*2e9d4914SAndroid Build Coastguard Workerstructure, for instance a &ldquo;wrapper&rdquo; or &ldquo;peer&rdquo; object written in
1552*2e9d4914SAndroid Build Coastguard Workeranother programming language.
1553*2e9d4914SAndroid Build Coastguard Worker</p>
1554*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1555*2e9d4914SAndroid Build Coastguard Worker
1556*2e9d4914SAndroid Build Coastguard Worker<dl>
1557*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fset_005fhook"></a>Function: <em>void</em> <strong>config_setting_set_hook</strong> <em>(<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->, void&nbsp;*&nbsp;<var>hook</var><!-- /@w -->)</em></dt>
1558*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fsetting_005fget_005fhook"></a>Function: <em>void *</em> <strong>config_setting_get_hook</strong> <em>(const&nbsp;<span class="nolinebreak">config_setting_t</span>&nbsp;*&nbsp;<var>setting</var><!-- /@w -->)</em></dt>
1559*2e9d4914SAndroid Build Coastguard Worker<dd>
1560*2e9d4914SAndroid Build Coastguard Worker<a name="index-hook-1"></a>
1561*2e9d4914SAndroid Build Coastguard Worker<p>These functions make it possible to attach arbitrary data to each
1562*2e9d4914SAndroid Build Coastguard Workersetting structure, for instance a &ldquo;wrapper&rdquo; or &ldquo;peer&rdquo; object written in
1563*2e9d4914SAndroid Build Coastguard Workeranother programming language. The destructor function, if one has been
1564*2e9d4914SAndroid Build Coastguard Workersupplied via a call to <code>config_set_destructor()</code>, will be called
1565*2e9d4914SAndroid Build Coastguard Workerby the library to dispose of this data when the setting itself is
1566*2e9d4914SAndroid Build Coastguard Workerdestroyed. There is no default destructor.
1567*2e9d4914SAndroid Build Coastguard Worker</p>
1568*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1569*2e9d4914SAndroid Build Coastguard Worker
1570*2e9d4914SAndroid Build Coastguard Worker<dl>
1571*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-config_005fset_005fdestructor"></a>Function: <em>void</em> <strong>config_set_destructor</strong> <em>(<span class="nolinebreak">config_t</span>&nbsp;*&nbsp;<var>config</var><!-- /@w -->, void&nbsp;(*&nbsp;<var>destructor</var>)(void&nbsp;*)<!-- /@w -->)</em></dt>
1572*2e9d4914SAndroid Build Coastguard Worker<dd>
1573*2e9d4914SAndroid Build Coastguard Worker<a name="index-destructor-function"></a>
1574*2e9d4914SAndroid Build Coastguard Worker<p>This function assigns the destructor function <var>destructor</var> for the
1575*2e9d4914SAndroid Build Coastguard Workerconfiguration <var>config</var>. This function accepts a single <code>void
1576*2e9d4914SAndroid Build Coastguard Worker*</code> argument and has no return value. See
1577*2e9d4914SAndroid Build Coastguard Worker<code>config_setting_set_hook()</code> above for more information.
1578*2e9d4914SAndroid Build Coastguard Worker</p>
1579*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1580*2e9d4914SAndroid Build Coastguard Worker
1581*2e9d4914SAndroid Build Coastguard Worker<hr>
1582*2e9d4914SAndroid Build Coastguard Worker<a name="The-C_002b_002b-API"></a>
1583*2e9d4914SAndroid Build Coastguard Worker<div class="header">
1584*2e9d4914SAndroid Build Coastguard Worker<p>
1585*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Example-Programs" accesskey="n" rel="next">Example Programs</a>, Previous: <a href="#The-C-API" accesskey="p" rel="prev">The C API</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
1586*2e9d4914SAndroid Build Coastguard Worker</div>
1587*2e9d4914SAndroid Build Coastguard Worker<a name="The-C_002b_002b-API-1"></a>
1588*2e9d4914SAndroid Build Coastguard Worker<h2 class="chapter">4 The C++ API</h2>
1589*2e9d4914SAndroid Build Coastguard Worker
1590*2e9d4914SAndroid Build Coastguard Worker<a name="index-Config"></a>
1591*2e9d4914SAndroid Build Coastguard Worker<a name="index-Setting"></a>
1592*2e9d4914SAndroid Build Coastguard Worker<p>This chapter describes the C++ library API. The class <code>Config</code>
1593*2e9d4914SAndroid Build Coastguard Workerrepresents a configuration, and the class <code>Setting</code> represents a
1594*2e9d4914SAndroid Build Coastguard Workerconfiguration setting. Note that by design, neither of these classes
1595*2e9d4914SAndroid Build Coastguard Workerprovides a public copy constructor or assignment operator. Therefore,
1596*2e9d4914SAndroid Build Coastguard Workerinstances of these classes may only be passed between functions via
1597*2e9d4914SAndroid Build Coastguard Workerreferences or pointers.
1598*2e9d4914SAndroid Build Coastguard Worker</p>
1599*2e9d4914SAndroid Build Coastguard Worker<a name="index-ConfigException"></a>
1600*2e9d4914SAndroid Build Coastguard Worker<p>The library defines a group of exceptions, all of which extend the
1601*2e9d4914SAndroid Build Coastguard Workercommon base exception <code>ConfigException</code>.
1602*2e9d4914SAndroid Build Coastguard Worker</p>
1603*2e9d4914SAndroid Build Coastguard Worker<a name="index-SettingTypeException"></a>
1604*2e9d4914SAndroid Build Coastguard Worker<p>A <code>SettingTypeException</code> is thrown when the type of a setting&rsquo;s
1605*2e9d4914SAndroid Build Coastguard Workervalue does not match the type requested.
1606*2e9d4914SAndroid Build Coastguard Worker</p>
1607*2e9d4914SAndroid Build Coastguard Worker<dl>
1608*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-SettingTypeException-on-SettingTypeException"></a>Method on SettingTypeException: <em></em> <strong>SettingTypeException</strong> <em>(const&nbsp;Setting&nbsp;&amp;<var>setting</var><!-- /@w -->)</em></dt>
1609*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-SettingTypeException-on-SettingTypeException-1"></a>Method on SettingTypeException: <em></em> <strong>SettingTypeException</strong> <em>(const&nbsp;Setting&nbsp;&amp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1610*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-SettingTypeException-on-SettingTypeException-2"></a>Method on SettingTypeException: <em></em> <strong>SettingTypeException</strong> <em>(const&nbsp;Setting&nbsp;&amp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->)</em></dt>
1611*2e9d4914SAndroid Build Coastguard Worker<dd>
1612*2e9d4914SAndroid Build Coastguard Worker<p>These methods construct <code>SettingTypeException</code> objects for the given <var>setting</var> and/or member <var>index</var> or <var>name</var>.
1613*2e9d4914SAndroid Build Coastguard Worker</p>
1614*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1615*2e9d4914SAndroid Build Coastguard Worker
1616*2e9d4914SAndroid Build Coastguard Worker<a name="index-SettingNotFoundException"></a>
1617*2e9d4914SAndroid Build Coastguard Worker<p>A <code>SettingNotFoundException</code> is thrown when a setting is not found.
1618*2e9d4914SAndroid Build Coastguard Worker</p>
1619*2e9d4914SAndroid Build Coastguard Worker<dl>
1620*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-SettingNotFoundException-on-SettingNotFoundException"></a>Method on SettingNotFoundException: <em></em> <strong>SettingNotFoundException</strong> <em>(const&nbsp;Setting&nbsp;&amp;<var>setting</var><!-- /@w -->, int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
1621*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-SettingNotFoundException-on-SettingNotFoundException-1"></a>Method on SettingNotFoundException: <em></em> <strong>SettingNotFoundException</strong> <em>(const&nbsp;Setting&nbsp;&amp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->)</em></dt>
1622*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-SettingNotFoundException-on-SettingNotFoundException-2"></a>Method on SettingNotFoundException: <em></em> <strong>SettingNotFoundException</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->)</em></dt>
1623*2e9d4914SAndroid Build Coastguard Worker<dd>
1624*2e9d4914SAndroid Build Coastguard Worker<p>These methods construct <code>SettingTypeException</code> objects for the given <var>setting</var> and member <var>index</var> or <var>name</var>, or path <var>path</var>.
1625*2e9d4914SAndroid Build Coastguard Worker</p>
1626*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1627*2e9d4914SAndroid Build Coastguard Worker
1628*2e9d4914SAndroid Build Coastguard Worker<a name="index-SettingNameException"></a>
1629*2e9d4914SAndroid Build Coastguard Worker<p>A <code>SettingNameException</code> is thrown when an attempt is made to add
1630*2e9d4914SAndroid Build Coastguard Workera new setting with a non-unique or invalid name.
1631*2e9d4914SAndroid Build Coastguard Worker</p>
1632*2e9d4914SAndroid Build Coastguard Worker<dl>
1633*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-SettingNameException-on-SettingNameException"></a>Method on SettingNameException: <em></em> <strong>SettingNameException</strong> <em>(const&nbsp;Setting&nbsp;&amp;<var>setting</var><!-- /@w -->, const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->)</em></dt>
1634*2e9d4914SAndroid Build Coastguard Worker<dd>
1635*2e9d4914SAndroid Build Coastguard Worker<p>This method constructs a <code>SettingNameExcpetion</code> object for the given <var>setting</var> and member name <var>name</var>.
1636*2e9d4914SAndroid Build Coastguard Worker</p>
1637*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1638*2e9d4914SAndroid Build Coastguard Worker
1639*2e9d4914SAndroid Build Coastguard Worker<a name="index-ParseException"></a>
1640*2e9d4914SAndroid Build Coastguard Worker<p>A <code>ParseException</code> is thrown when a parse error occurs while
1641*2e9d4914SAndroid Build Coastguard Workerreading a configuration from a stream.
1642*2e9d4914SAndroid Build Coastguard Worker</p>
1643*2e9d4914SAndroid Build Coastguard Worker<dl>
1644*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-ParseException-on-ParseException"></a>Method on ParseException: <em></em> <strong>ParseException</strong> <em>(const&nbsp;char&nbsp;*<var>file</var><!-- /@w -->, int&nbsp;<var>line</var><!-- /@w -->, const&nbsp;char&nbsp;*<var>error</var><!-- /@w -->)</em></dt>
1645*2e9d4914SAndroid Build Coastguard Worker<dd>
1646*2e9d4914SAndroid Build Coastguard Worker<p>This method constructs a <code>ParseException</code> object with the given filename <var>file</var>, line number <var>line</var>, and error message <var>error</var>.
1647*2e9d4914SAndroid Build Coastguard Worker</p>
1648*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1649*2e9d4914SAndroid Build Coastguard Worker
1650*2e9d4914SAndroid Build Coastguard Worker<a name="index-FileIOException"></a>
1651*2e9d4914SAndroid Build Coastguard Worker<p>A <code>FileIOException</code> is thrown when an I/O error occurs while
1652*2e9d4914SAndroid Build Coastguard Workerreading/writing a configuration from/to a file.
1653*2e9d4914SAndroid Build Coastguard Worker</p>
1654*2e9d4914SAndroid Build Coastguard Worker<a name="index-SettingException"></a>
1655*2e9d4914SAndroid Build Coastguard Worker<p><code>SettingTypeException</code>, <code>SettingNotFoundException</code>, and
1656*2e9d4914SAndroid Build Coastguard Worker<code>SettingNameException</code> all extend the common base
1657*2e9d4914SAndroid Build Coastguard Workerexception <code>SettingException</code>, which provides the following method:
1658*2e9d4914SAndroid Build Coastguard Worker</p>
1659*2e9d4914SAndroid Build Coastguard Worker<dl>
1660*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getPath-on-SettingException"></a>Method on SettingException: <em>const char *</em> <strong>getPath</strong> <em>() const</em></dt>
1661*2e9d4914SAndroid Build Coastguard Worker<dd>
1662*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the path to the setting associated with the exception, or
1663*2e9d4914SAndroid Build Coastguard Worker<code>NULL</code> if there is no applicable path.
1664*2e9d4914SAndroid Build Coastguard Worker</p>
1665*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1666*2e9d4914SAndroid Build Coastguard Worker
1667*2e9d4914SAndroid Build Coastguard Worker<p>The remainder of this chapter describes the methods for manipulating
1668*2e9d4914SAndroid Build Coastguard Workerconfigurations and configuration settings.
1669*2e9d4914SAndroid Build Coastguard Worker</p>
1670*2e9d4914SAndroid Build Coastguard Worker<dl>
1671*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-Config-on-Config"></a>Method on Config: <em></em> <strong>Config</strong> <em>()</em></dt>
1672*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-_007eConfig-on-Config"></a>Method on Config: <em></em> <strong>~Config</strong> <em>()</em></dt>
1673*2e9d4914SAndroid Build Coastguard Worker<dd>
1674*2e9d4914SAndroid Build Coastguard Worker<p>These methods create and destroy <code>Config</code> objects.
1675*2e9d4914SAndroid Build Coastguard Worker</p>
1676*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1677*2e9d4914SAndroid Build Coastguard Worker
1678*2e9d4914SAndroid Build Coastguard Worker<dl>
1679*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-clear-on-Config"></a>Method on Config: <em>void</em> <strong>clear</strong> <em>()</em></dt>
1680*2e9d4914SAndroid Build Coastguard Worker<dd>
1681*2e9d4914SAndroid Build Coastguard Worker<p><b>Since <i>v1.7</i></b>
1682*2e9d4914SAndroid Build Coastguard Worker</p>
1683*2e9d4914SAndroid Build Coastguard Worker<p>This method clears the configuration. All child settings of the root
1684*2e9d4914SAndroid Build Coastguard Workersetting are recursively destroyed. All other attributes of the
1685*2e9d4914SAndroid Build Coastguard Workerconfiguration are left unchanged.
1686*2e9d4914SAndroid Build Coastguard Worker</p>
1687*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1688*2e9d4914SAndroid Build Coastguard Worker
1689*2e9d4914SAndroid Build Coastguard Worker<dl>
1690*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-read-on-Config"></a>Method on Config: <em>void</em> <strong>read</strong> <em>(FILE&nbsp;*&nbsp;<var>stream</var><!-- /@w -->)</em></dt>
1691*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-write-on-Config"></a>Method on Config: <em>void</em> <strong>write</strong> <em>(FILE&nbsp;*&nbsp;<var>stream</var><!-- /@w -->) const</em></dt>
1692*2e9d4914SAndroid Build Coastguard Worker<dd>
1693*2e9d4914SAndroid Build Coastguard Worker<p>The <code>read()</code> method reads and parses a configuration from the given
1694*2e9d4914SAndroid Build Coastguard Worker<var>stream</var>. A <code>ParseException</code> is thrown if a parse error occurs.
1695*2e9d4914SAndroid Build Coastguard Worker</p>
1696*2e9d4914SAndroid Build Coastguard Worker<p>The <code>write()</code> method writes the configuration to the given <var>stream</var>.
1697*2e9d4914SAndroid Build Coastguard Worker</p>
1698*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1699*2e9d4914SAndroid Build Coastguard Worker
1700*2e9d4914SAndroid Build Coastguard Worker<dl>
1701*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-readFile-on-Config"></a>Method on Config: <em>void</em> <strong>readFile</strong> <em>(const&nbsp;char&nbsp;*&nbsp;<var>filename</var><!-- /@w -->)</em></dt>
1702*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-writeFile-on-Config"></a>Method on Config: <em>void</em> <strong>writeFile</strong> <em>(const&nbsp;char&nbsp;*&nbsp;<var>filename</var><!-- /@w -->) const</em></dt>
1703*2e9d4914SAndroid Build Coastguard Worker<dd>
1704*2e9d4914SAndroid Build Coastguard Worker<p>The <code>readFile()</code> method reads and parses a configuration from the
1705*2e9d4914SAndroid Build Coastguard Workerfile named <var>filename</var>. A <code>ParseException</code> is thrown if a
1706*2e9d4914SAndroid Build Coastguard Workerparse error occurs. A <code>FileIOException</code> is thrown if the file
1707*2e9d4914SAndroid Build Coastguard Workercannot be read.
1708*2e9d4914SAndroid Build Coastguard Worker</p>
1709*2e9d4914SAndroid Build Coastguard Worker<p>The <code>writeFile()</code> method writes the configuration to the file
1710*2e9d4914SAndroid Build Coastguard Workernamed <var>filename</var>. A <code>FileIOException</code> is thrown if the file cannot
1711*2e9d4914SAndroid Build Coastguard Workerbe written.
1712*2e9d4914SAndroid Build Coastguard Worker</p>
1713*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1714*2e9d4914SAndroid Build Coastguard Worker
1715*2e9d4914SAndroid Build Coastguard Worker<dl>
1716*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-readString-on-Config"></a>Method on Config: <em>void</em> <strong>readString</strong> <em>(const&nbsp;char&nbsp;*&nbsp;<var>str</var><!-- /@w -->)</em></dt>
1717*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-readString-on-Config-1"></a>Method on Config: <em>void</em> <strong>readString</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>str</var><!-- /@w -->)</em></dt>
1718*2e9d4914SAndroid Build Coastguard Worker<dd>
1719*2e9d4914SAndroid Build Coastguard Worker<p>These methods read and parse a configuration from the string
1720*2e9d4914SAndroid Build Coastguard Worker<var>str</var>. A <code>ParseException</code> is thrown if a parse error occurs.
1721*2e9d4914SAndroid Build Coastguard Worker</p>
1722*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1723*2e9d4914SAndroid Build Coastguard Worker
1724*2e9d4914SAndroid Build Coastguard Worker<dl>
1725*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getError-on-ParseException"></a>Method on ParseException: <em>const char *</em> <strong>getError</strong> <em>() const</em></dt>
1726*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getFile-on-ParseException"></a>Method on ParseException: <em>const char *</em> <strong>getFile</strong> <em>() const</em></dt>
1727*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getLine-on-ParseException"></a>Method on ParseException: <em>int</em> <strong>getLine</strong> <em>() const</em></dt>
1728*2e9d4914SAndroid Build Coastguard Worker<dd>
1729*2e9d4914SAndroid Build Coastguard Worker<p>If a call to <code>readFile()</code>, <code>readString()</code>, or <code>read()</code>
1730*2e9d4914SAndroid Build Coastguard Workerresulted in a <code>ParseException</code>, these methods can be called on
1731*2e9d4914SAndroid Build Coastguard Workerthe exception object to obtain the text, filename, and line number of
1732*2e9d4914SAndroid Build Coastguard Workerthe parse error. Storage for the strings returned by <code>getError()</code>
1733*2e9d4914SAndroid Build Coastguard Workerand <code>getFile()</code> are managed by the library; the strings must not
1734*2e9d4914SAndroid Build Coastguard Workerbe freed by the caller.
1735*2e9d4914SAndroid Build Coastguard Worker</p>
1736*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1737*2e9d4914SAndroid Build Coastguard Worker
1738*2e9d4914SAndroid Build Coastguard Worker<dl>
1739*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-setIncludeDir-on-Config"></a>Method on Config: <em>void</em> <strong>setIncludeDir</strong> <em>(const&nbsp;char&nbsp;*<var>includeDir</var><!-- /@w -->)</em></dt>
1740*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getIncludeDir-on-Config"></a>Method on Config: <em>const char *</em> <strong>getIncludeDir</strong> <em>() const</em></dt>
1741*2e9d4914SAndroid Build Coastguard Worker<dd>
1742*2e9d4914SAndroid Build Coastguard Worker<p>The <code>setIncludeDir()</code> method specifies the include directory,
1743*2e9d4914SAndroid Build Coastguard Worker<var>includeDir</var>, relative to which the files specified in
1744*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>@include</samp>&rsquo; directives will be located for the configuration. By
1745*2e9d4914SAndroid Build Coastguard Workerdefault, there is no include directory, and all include files are
1746*2e9d4914SAndroid Build Coastguard Workerexpected to be relative to the current working directory. If
1747*2e9d4914SAndroid Build Coastguard Worker<var>includeDir</var> is <code>NULL</code>, the default behavior is reinstated.
1748*2e9d4914SAndroid Build Coastguard Worker</p>
1749*2e9d4914SAndroid Build Coastguard Worker<p>For example, if the include directory is set to <samp>/usr/local/etc</samp>,
1750*2e9d4914SAndroid Build Coastguard Workerthe include directive &lsquo;<samp>@include &quot;configs/extra.cfg&quot;</samp>&rsquo; would include the
1751*2e9d4914SAndroid Build Coastguard Workerfile <samp>/usr/local/etc/configs/extra.cfg</samp>.
1752*2e9d4914SAndroid Build Coastguard Worker</p>
1753*2e9d4914SAndroid Build Coastguard Worker<p><code>getIncludeDir()</code> returns the current include directory for the
1754*2e9d4914SAndroid Build Coastguard Workerconfiguration, or <code>NULL</code> if none is set.
1755*2e9d4914SAndroid Build Coastguard Worker</p>
1756*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1757*2e9d4914SAndroid Build Coastguard Worker
1758*2e9d4914SAndroid Build Coastguard Worker<dl>
1759*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-evaluateIncludePath-on-Config"></a>Method on Config: <em>virtual const char **</em> <strong>evaluateIncludePath</strong> <em>(const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->, const&nbsp;char&nbsp;**&nbsp;<var>error</var><!-- /@w -->)</em></dt>
1760*2e9d4914SAndroid Build Coastguard Worker<dd>
1761*2e9d4914SAndroid Build Coastguard Worker<p><b>Since <i>v1.7</i></b>
1762*2e9d4914SAndroid Build Coastguard Worker</p>
1763*2e9d4914SAndroid Build Coastguard Worker<p>This method is called to evaluate the path of an <code>@include</code> directive.
1764*2e9d4914SAndroid Build Coastguard WorkerThe <var>path</var> is the literal path argument of the directive. The method may
1765*2e9d4914SAndroid Build Coastguard Workerbe overridden in a subclass to perform tasks like wildcard expansion and
1766*2e9d4914SAndroid Build Coastguard Workervariable substitution.
1767*2e9d4914SAndroid Build Coastguard Worker</p>
1768*2e9d4914SAndroid Build Coastguard Worker<p>On success, the method should return a <code>NULL</code>-terminated array of paths.
1769*2e9d4914SAndroid Build Coastguard WorkerAny relative paths must be relative to the program&rsquo;s current working directory.
1770*2e9d4914SAndroid Build Coastguard WorkerThe contents of these files will be inlined at the point of inclusion, in the
1771*2e9d4914SAndroid Build Coastguard Workerorder that the paths appear in the array. Both the array and its elements should
1772*2e9d4914SAndroid Build Coastguard Workerbe heap allocated; the library will take ownership of and eventually free the
1773*2e9d4914SAndroid Build Coastguard Workerstrings in the array and the array itself.
1774*2e9d4914SAndroid Build Coastguard Worker</p>
1775*2e9d4914SAndroid Build Coastguard Worker<p>On failure, the function should return <code>NULL</code> and set <var>*error</var> to a
1776*2e9d4914SAndroid Build Coastguard Workerstatic error string which should be used as the parse error for the
1777*2e9d4914SAndroid Build Coastguard Workerconfiguration; the library does not take ownership of or free this string.
1778*2e9d4914SAndroid Build Coastguard Worker</p>
1779*2e9d4914SAndroid Build Coastguard Worker<p>The default implementation simply returns a <code>NULL</code>-terminated array
1780*2e9d4914SAndroid Build Coastguard Workercontaining either a copy of <var>path</var> if it&rsquo;s an absolute path, or a
1781*2e9d4914SAndroid Build Coastguard Workerconcatenation of the include directory and <var>path</var> if it&rsquo;s a relative path.
1782*2e9d4914SAndroid Build Coastguard Worker</p>
1783*2e9d4914SAndroid Build Coastguard Worker<p>For more information see <code>config_set_include_func()</code> above.
1784*2e9d4914SAndroid Build Coastguard Worker</p>
1785*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1786*2e9d4914SAndroid Build Coastguard Worker
1787*2e9d4914SAndroid Build Coastguard Worker<dl>
1788*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getOptions-on-Config"></a>Method on Config: <em>int</em> <strong>getOptions</strong> <em>() const</em></dt>
1789*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-setOptions-on-Config"></a>Method on Config: <em>void</em> <strong>setOptions</strong> <em>(int <var>options</var>)</em></dt>
1790*2e9d4914SAndroid Build Coastguard Worker<dd>
1791*2e9d4914SAndroid Build Coastguard Worker<a name="index-Config_003a_003aOption"></a>
1792*2e9d4914SAndroid Build Coastguard Worker<p>These methods get and set the options for the configuration. The
1793*2e9d4914SAndroid Build Coastguard Workeroptions affect how configurations are read and written. The parameter
1794*2e9d4914SAndroid Build Coastguard Worker<var>options</var> should be a bitwise-OR of the following <var>Config::Option</var>
1795*2e9d4914SAndroid Build Coastguard Workerenumeration values:
1796*2e9d4914SAndroid Build Coastguard Worker</p>
1797*2e9d4914SAndroid Build Coastguard Worker<dl compact="compact">
1798*2e9d4914SAndroid Build Coastguard Worker<dt><code>Config::OptionAutoConvert</code></dt>
1799*2e9d4914SAndroid Build Coastguard Worker<dd><p>Turning this option on enables number auto-conversion for
1800*2e9d4914SAndroid Build Coastguard Workerthe configuration. When this feature is enabled, an attempt to retrieve a
1801*2e9d4914SAndroid Build Coastguard Workerfloating point setting&rsquo;s value into an integer (or vice versa), or
1802*2e9d4914SAndroid Build Coastguard Workerstore an integer to a floating point setting&rsquo;s value (or vice versa)
1803*2e9d4914SAndroid Build Coastguard Workerwill cause the library to silently perform the necessary conversion
1804*2e9d4914SAndroid Build Coastguard Worker(possibly leading to loss of data), rather than reporting failure. By
1805*2e9d4914SAndroid Build Coastguard Workerdefault this option is turned off.
1806*2e9d4914SAndroid Build Coastguard Worker</p>
1807*2e9d4914SAndroid Build Coastguard Worker</dd>
1808*2e9d4914SAndroid Build Coastguard Worker<dt><code>Config::OptionSemicolonSeparators</code></dt>
1809*2e9d4914SAndroid Build Coastguard Worker<dd><p>This option controls whether a semicolon (&lsquo;;&rsquo;) is output after each setting
1810*2e9d4914SAndroid Build Coastguard Workerwhen the configuration is written to a file or stream. (The semicolon
1811*2e9d4914SAndroid Build Coastguard Workerseparators are optional in the configuration syntax.) By default this
1812*2e9d4914SAndroid Build Coastguard Workeroption is turned on.
1813*2e9d4914SAndroid Build Coastguard Worker</p>
1814*2e9d4914SAndroid Build Coastguard Worker</dd>
1815*2e9d4914SAndroid Build Coastguard Worker<dt><code>Config::OptionColonAssignmentForGroups</code></dt>
1816*2e9d4914SAndroid Build Coastguard Worker<dd><p>This option controls whether a colon (&lsquo;:&rsquo;) is output between each
1817*2e9d4914SAndroid Build Coastguard Workergroup setting&rsquo;s name and its value when the configuration is written to
1818*2e9d4914SAndroid Build Coastguard Workera file or stream. If the option is turned off, an equals sign (&lsquo;=&rsquo;) is
1819*2e9d4914SAndroid Build Coastguard Workeroutput instead. (These tokens are interchangeable in the configuration
1820*2e9d4914SAndroid Build Coastguard Workersyntax.) By default this option is turned on.
1821*2e9d4914SAndroid Build Coastguard Worker</p>
1822*2e9d4914SAndroid Build Coastguard Worker</dd>
1823*2e9d4914SAndroid Build Coastguard Worker<dt><code>Config::OptionColonAssignmentForNonGroups</code></dt>
1824*2e9d4914SAndroid Build Coastguard Worker<dd><p>This option controls whether a colon (&lsquo;:&rsquo;) is output between each
1825*2e9d4914SAndroid Build Coastguard Workernon-group setting&rsquo;s name and its value when the configuration is written
1826*2e9d4914SAndroid Build Coastguard Workerto a file or stream. If the option is turned off, an equals sign (&lsquo;=&rsquo;)
1827*2e9d4914SAndroid Build Coastguard Workeris output instead. (These tokens are interchangeable in the configuration
1828*2e9d4914SAndroid Build Coastguard Workersyntax.) By default this option is turned off.
1829*2e9d4914SAndroid Build Coastguard Worker</p>
1830*2e9d4914SAndroid Build Coastguard Worker</dd>
1831*2e9d4914SAndroid Build Coastguard Worker<dt><code>Config::OptionOpenBraceOnSeparateLine</code></dt>
1832*2e9d4914SAndroid Build Coastguard Worker<dd><p>This option controls whether an open brace (&lsquo;{&rsquo;) will be written on its own
1833*2e9d4914SAndroid Build Coastguard Workerline when the configuration is written to a file or stream. If the option is
1834*2e9d4914SAndroid Build Coastguard Workerturned off, the brace will be written at the end of the previous line.
1835*2e9d4914SAndroid Build Coastguard WorkerBy default this option is turned on.
1836*2e9d4914SAndroid Build Coastguard Worker</p>
1837*2e9d4914SAndroid Build Coastguard Worker</dd>
1838*2e9d4914SAndroid Build Coastguard Worker<dt><code>Config::OptionAllowScientificNotation</code></dt>
1839*2e9d4914SAndroid Build Coastguard Worker<dd><p>(<b>Since <i>v1.7</i></b>)
1840*2e9d4914SAndroid Build Coastguard WorkerThis option controls whether scientific notation may be used as appropriate
1841*2e9d4914SAndroid Build Coastguard Workerwhen writing floating point values (corresponding to <code>printf()</code>
1842*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>%g</samp>&rsquo; format) or should never be used (corresponding to <code>printf()</code>
1843*2e9d4914SAndroid Build Coastguard Worker&lsquo;<samp>%f</samp>&rsquo; format). By default this option is turned off.
1844*2e9d4914SAndroid Build Coastguard Worker</p>
1845*2e9d4914SAndroid Build Coastguard Worker</dd>
1846*2e9d4914SAndroid Build Coastguard Worker<dt><code>Config::OptionFsync</code></dt>
1847*2e9d4914SAndroid Build Coastguard Worker<dd><p>(<b>Since <i>v1.7.1</i></b>)
1848*2e9d4914SAndroid Build Coastguard WorkerThis option controls whether the <code>writeFile()</code> method performs an <i>fsync</i>
1849*2e9d4914SAndroid Build Coastguard Workeroperation after writing the configuration and before closing the file. By
1850*2e9d4914SAndroid Build Coastguard Workerdefault this option is turned off.
1851*2e9d4914SAndroid Build Coastguard Worker</p>
1852*2e9d4914SAndroid Build Coastguard Worker</dd>
1853*2e9d4914SAndroid Build Coastguard Worker</dl>
1854*2e9d4914SAndroid Build Coastguard Worker
1855*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1856*2e9d4914SAndroid Build Coastguard Worker
1857*2e9d4914SAndroid Build Coastguard Worker<dl>
1858*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getOption-on-Config"></a>Method on Config: <em>bool</em> <strong>getOption</strong> <em>(Config::Option&nbsp;<var>option</var><!-- /@w -->) const</em></dt>
1859*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-setOption-on-Config"></a>Method on Config: <em>void</em> <strong>setOption</strong> <em>(Config::Option&nbsp;<var>option</var><!-- /@w -->, bool&nbsp;<var>flag</var><!-- /@w -->)</em></dt>
1860*2e9d4914SAndroid Build Coastguard Worker<dd>
1861*2e9d4914SAndroid Build Coastguard Worker<p><b>Since <i>v1.7</i></b>
1862*2e9d4914SAndroid Build Coastguard Worker</p>
1863*2e9d4914SAndroid Build Coastguard Worker<p>These methods get and set the option <var>option</var> for the configuration. The
1864*2e9d4914SAndroid Build Coastguard Workeroption is enabled if <var>flag</var> is <code>true</code> and disabled if it is
1865*2e9d4914SAndroid Build Coastguard Worker<code>false</code>.
1866*2e9d4914SAndroid Build Coastguard Worker</p>
1867*2e9d4914SAndroid Build Coastguard Worker<p>See <code>setOptions()</code> above for the list of available options.
1868*2e9d4914SAndroid Build Coastguard Worker</p>
1869*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1870*2e9d4914SAndroid Build Coastguard Worker
1871*2e9d4914SAndroid Build Coastguard Worker<dl>
1872*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getAutoConvert-on-Config"></a>Method on Config: <em>bool</em> <strong>getAutoConvert</strong> <em>() const</em></dt>
1873*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-setAutoConvert-on-Config"></a>Method on Config: <em>void</em> <strong>setAutoConvert</strong> <em>(bool <var>flag</var>)</em></dt>
1874*2e9d4914SAndroid Build Coastguard Worker<dd>
1875*2e9d4914SAndroid Build Coastguard Worker<p>These methods get and set the <code>OptionAutoConvert</code> option. They
1876*2e9d4914SAndroid Build Coastguard Workerare obsoleted by the <code>setOption()</code> and <code>getOption()</code>
1877*2e9d4914SAndroid Build Coastguard Workermethods described above.
1878*2e9d4914SAndroid Build Coastguard Worker</p>
1879*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1880*2e9d4914SAndroid Build Coastguard Worker
1881*2e9d4914SAndroid Build Coastguard Worker<dl>
1882*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getDefaultFormat-on-Config"></a>Method on Config: <em>Setting::Format</em> <strong>getDefaultFormat</strong> <em>() const</em></dt>
1883*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-setDefaultFormat-on-Config"></a>Method on Config: <em>void</em> <strong>setDefaultFormat</strong> <em>(Setting::Format&nbsp;<var>format</var><!-- /@w -->)</em></dt>
1884*2e9d4914SAndroid Build Coastguard Worker<dd>
1885*2e9d4914SAndroid Build Coastguard Worker<p>These methods get and set the default external format for settings in
1886*2e9d4914SAndroid Build Coastguard Workerthe configuration. If a non-default format has not been set for a
1887*2e9d4914SAndroid Build Coastguard Workersetting with <code>Setting::setFormat()</code>, this configuration-wide
1888*2e9d4914SAndroid Build Coastguard Workerdefault format will be used instead when that setting is written to a
1889*2e9d4914SAndroid Build Coastguard Workerfile or stream.
1890*2e9d4914SAndroid Build Coastguard Worker</p>
1891*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1892*2e9d4914SAndroid Build Coastguard Worker
1893*2e9d4914SAndroid Build Coastguard Worker<dl>
1894*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getTabWidth-on-Config"></a>Method on Config: <em>unsigned short</em> <strong>getTabWidth</strong> <em>() const</em></dt>
1895*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-setTabWidth-on-Config"></a>Method on Config: <em>void</em> <strong>setTabWidth</strong> <em>(unsigned&nbsp;short&nbsp;<var>width</var><!-- /@w -->)</em></dt>
1896*2e9d4914SAndroid Build Coastguard Worker<dd>
1897*2e9d4914SAndroid Build Coastguard Worker<p>These methods get and set the tab width for the configuration. The tab
1898*2e9d4914SAndroid Build Coastguard Workerwidth affects the formatting of the configuration when it is written
1899*2e9d4914SAndroid Build Coastguard Workerto a file or stream: each level of nesting is indented by <var>width</var>
1900*2e9d4914SAndroid Build Coastguard Workerspaces, or by a single tab character if <var>width</var> is 0. The tab
1901*2e9d4914SAndroid Build Coastguard Workerwidth has no effect on parsing.
1902*2e9d4914SAndroid Build Coastguard Worker</p>
1903*2e9d4914SAndroid Build Coastguard Worker<p>Valid tab widths range from 0 to 15. The default tab width is 2.
1904*2e9d4914SAndroid Build Coastguard Worker</p>
1905*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1906*2e9d4914SAndroid Build Coastguard Worker
1907*2e9d4914SAndroid Build Coastguard Worker<dl>
1908*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getFloatPrecision-on-Config"></a>Method on Config: <em>unsigned short</em> <strong>getFloatPrecision</strong> <em>() const</em></dt>
1909*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-setFloatPrecision-on-Config"></a>Method on Config: <em>void</em> <strong>setFloatPrecision</strong> <em>(unsigned&nbsp;short&nbsp;<var>width</var><!-- /@w -->)</em></dt>
1910*2e9d4914SAndroid Build Coastguard Worker<dd>
1911*2e9d4914SAndroid Build Coastguard Worker<p>These methods get and set the float precision for the configuration.
1912*2e9d4914SAndroid Build Coastguard WorkerThis parameter influences the formatting of floating point settings in
1913*2e9d4914SAndroid Build Coastguard Workerthe configuration when it is written to a file or stream.
1914*2e9d4914SAndroid Build Coastguard WorkerFloat precision has no effect on parsing.
1915*2e9d4914SAndroid Build Coastguard Worker</p>
1916*2e9d4914SAndroid Build Coastguard Worker<p>Valid precisions range from 0 to about 15 (implementation dependent),
1917*2e9d4914SAndroid Build Coastguard Workerthough the library will accept and store values up to 255.
1918*2e9d4914SAndroid Build Coastguard Worker</p>
1919*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1920*2e9d4914SAndroid Build Coastguard Worker
1921*2e9d4914SAndroid Build Coastguard Worker<dl>
1922*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getRoot-on-Config"></a>Method on Config: <em>Setting &amp;</em> <strong>getRoot</strong> <em>() const</em></dt>
1923*2e9d4914SAndroid Build Coastguard Worker<dd>
1924*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the root setting for the configuration, which is a group.
1925*2e9d4914SAndroid Build Coastguard Worker</p>
1926*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1927*2e9d4914SAndroid Build Coastguard Worker
1928*2e9d4914SAndroid Build Coastguard Worker<dl>
1929*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookup-on-Config"></a>Method on Config: <em>Setting &amp;</em> <strong>lookup</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->) const</em></dt>
1930*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookup-on-Config-1"></a>Method on Config: <em>Setting &amp;</em> <strong>lookup</strong> <em>(const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->) const</em></dt>
1931*2e9d4914SAndroid Build Coastguard Worker<dd>
1932*2e9d4914SAndroid Build Coastguard Worker<p>These methods locate the setting specified by the path <var>path</var>. If
1933*2e9d4914SAndroid Build Coastguard Workerthe requested setting is not found, a <code>SettingNotFoundException</code> is
1934*2e9d4914SAndroid Build Coastguard Workerthrown.
1935*2e9d4914SAndroid Build Coastguard Worker</p>
1936*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1937*2e9d4914SAndroid Build Coastguard Worker<dl>
1938*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-exists-on-Config"></a>Method on Config: <em>bool</em> <strong>exists</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->) const</em></dt>
1939*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-exists-on-Config-1"></a>Method on Config: <em>bool</em> <strong>exists</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->) const</em></dt>
1940*2e9d4914SAndroid Build Coastguard Worker<dd>
1941*2e9d4914SAndroid Build Coastguard Worker<p>These methods test if a setting with the given <var>path</var> exists in
1942*2e9d4914SAndroid Build Coastguard Workerthe configuration. They return <code>true</code> if the setting exists, and
1943*2e9d4914SAndroid Build Coastguard Worker<code>false</code> otherwise. These methods do not throw exceptions.
1944*2e9d4914SAndroid Build Coastguard Worker</p>
1945*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
1946*2e9d4914SAndroid Build Coastguard Worker
1947*2e9d4914SAndroid Build Coastguard Worker<dl>
1948*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, bool&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1949*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-1"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->, bool&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1950*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-2"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, int&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1951*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-3"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->, int&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1952*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-4"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, unsigned&nbsp;int&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1953*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-5"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->, unsigned&nbsp;int&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1954*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-6"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, long&nbsp;long&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1955*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-7"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->, long&nbsp;long&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1956*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-8"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, float&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1957*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-9"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->, float&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1958*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-10"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, double&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1959*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-11"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->, double&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1960*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-12"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, const&nbsp;char&nbsp;*&amp;<var>value</var><!-- /@w -->) const</em></dt>
1961*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-13"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->, const&nbsp;char&nbsp;*&amp;<var>value</var><!-- /@w -->) const</em></dt>
1962*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-14"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>path</var><!-- /@w -->, std::string&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1963*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Config-15"></a>Method on Config: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->, std::string&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
1964*2e9d4914SAndroid Build Coastguard Worker<dd>
1965*2e9d4914SAndroid Build Coastguard Worker<p>These are convenience methods for looking up the value of a setting
1966*2e9d4914SAndroid Build Coastguard Workerwith the given <var>path</var>. If the setting is found and is of an
1967*2e9d4914SAndroid Build Coastguard Workerappropriate type, the value is stored in <var>value</var> and the method
1968*2e9d4914SAndroid Build Coastguard Workerreturns <code>true</code>. Otherwise, <var>value</var> is left unmodified and the
1969*2e9d4914SAndroid Build Coastguard Workermethod returns <code>false</code>. These methods do not throw exceptions.
1970*2e9d4914SAndroid Build Coastguard Worker</p>
1971*2e9d4914SAndroid Build Coastguard Worker<p>Storage for <i>const&nbsp;char&nbsp;*</i><!-- /@w --> values is managed by the library and
1972*2e9d4914SAndroid Build Coastguard Workerreleased automatically when the setting is destroyed or when its value
1973*2e9d4914SAndroid Build Coastguard Workeris changed; the string must not be freed by the caller. For safety and
1974*2e9d4914SAndroid Build Coastguard Workerconvenience, always assigning string values to a <code>std::string</code> is
1975*2e9d4914SAndroid Build Coastguard Workersuggested.
1976*2e9d4914SAndroid Build Coastguard Worker</p>
1977*2e9d4914SAndroid Build Coastguard Worker<p>Since these methods have boolean return values and do not throw
1978*2e9d4914SAndroid Build Coastguard Workerexceptions, they can be used within boolean logic expressions. The following
1979*2e9d4914SAndroid Build Coastguard Workerexample presents a concise way to look up three values at once and
1980*2e9d4914SAndroid Build Coastguard Workerperform error handling if any of them are not found or are of the
1981*2e9d4914SAndroid Build Coastguard Workerwrong type:
1982*2e9d4914SAndroid Build Coastguard Worker</p>
1983*2e9d4914SAndroid Build Coastguard Worker<br>
1984*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
1985*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
1986*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">int var1;
1987*2e9d4914SAndroid Build Coastguard Workerdouble var2;
1988*2e9d4914SAndroid Build Coastguard Workerconst char *var3;
1989*2e9d4914SAndroid Build Coastguard Worker
1990*2e9d4914SAndroid Build Coastguard Workerif(config.lookupValue(&quot;values.var1&quot;, var1)
1991*2e9d4914SAndroid Build Coastguard Worker   &amp;&amp; config.lookupValue(&quot;values.var2&quot;, var2)
1992*2e9d4914SAndroid Build Coastguard Worker   &amp;&amp; config.lookupValue(&quot;values.var3&quot;, var3))
1993*2e9d4914SAndroid Build Coastguard Worker{
1994*2e9d4914SAndroid Build Coastguard Worker  // use var1, var2, var3
1995*2e9d4914SAndroid Build Coastguard Worker}
1996*2e9d4914SAndroid Build Coastguard Workerelse
1997*2e9d4914SAndroid Build Coastguard Worker{
1998*2e9d4914SAndroid Build Coastguard Worker  // error handling here
1999*2e9d4914SAndroid Build Coastguard Worker}
2000*2e9d4914SAndroid Build Coastguard Worker</pre></div>
2001*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
2002*2e9d4914SAndroid Build Coastguard Worker
2003*2e9d4914SAndroid Build Coastguard Worker<p>This approach also takes advantage of the short-circuit evaluation rules
2004*2e9d4914SAndroid Build Coastguard Workerof C++, e.g., if the first lookup fails (returning <code>false</code>), the
2005*2e9d4914SAndroid Build Coastguard Workerremaining lookups are skipped entirely.
2006*2e9d4914SAndroid Build Coastguard Worker</p>
2007*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2008*2e9d4914SAndroid Build Coastguard Worker
2009*2e9d4914SAndroid Build Coastguard Worker<dl>
2010*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-bool-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator bool ()</strong> <em>const</em></dt>
2011*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-int-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator int ()</strong> <em>const</em></dt>
2012*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-unsigned-int-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator unsigned int ()</strong> <em>const</em></dt>
2013*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-long-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator long ()</strong> <em>const</em></dt>
2014*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-unsigned-long-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator unsigned long ()</strong> <em>const</em></dt>
2015*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-long-long-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator long long ()</strong> <em>const</em></dt>
2016*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-unsigned-long-long-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator unsigned long long ()</strong> <em>const</em></dt>
2017*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-float-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator float ()</strong> <em>const</em></dt>
2018*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-double-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator double ()</strong> <em>const</em></dt>
2019*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-const-char-_002a-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator const char * ()</strong> <em>const</em></dt>
2020*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator-std_003a_003astring-_0028_0029-on-Setting"></a>Method on Setting: <em></em> <strong>operator std::string ()</strong> <em>const</em></dt>
2021*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-c_005fstr-on-Setting"></a>Method on Setting: <em>const char *</em> <strong>c_str</strong> <em>() const</em></dt>
2022*2e9d4914SAndroid Build Coastguard Worker<dd>
2023*2e9d4914SAndroid Build Coastguard Worker<p>These cast operators allow a <code>Setting</code> object to be assigned to a
2024*2e9d4914SAndroid Build Coastguard Workervariable of type <i>bool</i> if it is of type <code>TypeBoolean</code>;
2025*2e9d4914SAndroid Build Coastguard Worker<i>int</i>, <i>unsigned int</i>; <code>long long</code> or <code>unsigned long long</code> if
2026*2e9d4914SAndroid Build Coastguard Workerit is of type <code>TypeInt64</code>, <i>float</i> or <i>double</i> if it is of type
2027*2e9d4914SAndroid Build Coastguard Worker<code>TypeFloat</code>; or <i>const&nbsp;char&nbsp;*</i><!-- /@w --> or <i>std::string</i> if it is
2028*2e9d4914SAndroid Build Coastguard Workerof type <code>TypeString</code>.
2029*2e9d4914SAndroid Build Coastguard Worker</p>
2030*2e9d4914SAndroid Build Coastguard Worker<p>Values of type <code>TypeInt</code> or <code>TypeInt64</code> may be assigned to
2031*2e9d4914SAndroid Build Coastguard Workervariables of type <i>long</i>, or <i>unsigned long</i>, depending on the
2032*2e9d4914SAndroid Build Coastguard Workersizes of those types on the host system.
2033*2e9d4914SAndroid Build Coastguard Worker</p>
2034*2e9d4914SAndroid Build Coastguard Worker<p>Storage for <i>const&nbsp;char&nbsp;*</i><!-- /@w --> return values is managed by the
2035*2e9d4914SAndroid Build Coastguard Workerlibrary and released automatically when the setting is destroyed or
2036*2e9d4914SAndroid Build Coastguard Workerwhen its value is changed; the string must not be freed by the
2037*2e9d4914SAndroid Build Coastguard Workercaller. For safety and convenience, always assigning string return
2038*2e9d4914SAndroid Build Coastguard Workervalues to a <code>std::string</code> is suggested.
2039*2e9d4914SAndroid Build Coastguard Worker</p>
2040*2e9d4914SAndroid Build Coastguard Worker<p>The following examples demonstrate this usage:
2041*2e9d4914SAndroid Build Coastguard Worker</p>
2042*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
2043*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
2044*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">long width = config.lookup(&quot;application.window.size.w&quot;);
2045*2e9d4914SAndroid Build Coastguard Worker
2046*2e9d4914SAndroid Build Coastguard Workerbool splashScreen = config.lookup(&quot;application.splash_screen&quot;);
2047*2e9d4914SAndroid Build Coastguard Worker
2048*2e9d4914SAndroid Build Coastguard Workerstd::string title = config.lookup(&quot;application.window.title&quot;);
2049*2e9d4914SAndroid Build Coastguard Worker</pre></div>
2050*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
2051*2e9d4914SAndroid Build Coastguard Worker
2052*2e9d4914SAndroid Build Coastguard Worker<p>Note that certain conversions can lead to loss of precision or
2053*2e9d4914SAndroid Build Coastguard Workerclipping of values, e.g., assigning a negative value to an <i>unsigned
2054*2e9d4914SAndroid Build Coastguard Workerint</i> (in which case the value will be treated as 0), or a
2055*2e9d4914SAndroid Build Coastguard Workerdouble-precision value to a <i>float</i>. The library does not treat
2056*2e9d4914SAndroid Build Coastguard Workerthese lossy conversions as errors.
2057*2e9d4914SAndroid Build Coastguard Worker</p>
2058*2e9d4914SAndroid Build Coastguard Worker<p>Perhaps surprisingly, the following code in particular will cause a
2059*2e9d4914SAndroid Build Coastguard Workercompiler error:
2060*2e9d4914SAndroid Build Coastguard Worker</p>
2061*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
2062*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
2063*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">std::string title;
2064*2e9d4914SAndroid Build Coastguard Worker.
2065*2e9d4914SAndroid Build Coastguard Worker.
2066*2e9d4914SAndroid Build Coastguard Worker.
2067*2e9d4914SAndroid Build Coastguard Workertitle = config.lookup(&quot;application.window.title&quot;);
2068*2e9d4914SAndroid Build Coastguard Worker</pre></div>
2069*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
2070*2e9d4914SAndroid Build Coastguard Worker
2071*2e9d4914SAndroid Build Coastguard Worker<p>This is because the assignment operator of <code>std::string</code> is being
2072*2e9d4914SAndroid Build Coastguard Workerinvoked with a <code>Setting &amp;</code> as an argument. The compiler is unable
2073*2e9d4914SAndroid Build Coastguard Workerto make an implicit conversion because both the <code>const char *</code>
2074*2e9d4914SAndroid Build Coastguard Workerand the <code>std::string</code> cast operators of <code>Setting</code> are
2075*2e9d4914SAndroid Build Coastguard Workerequally appropriate. This is not a bug in <i>libconfig</i>; providing
2076*2e9d4914SAndroid Build Coastguard Workeronly the <code>const char *</code> cast operator would resolve this
2077*2e9d4914SAndroid Build Coastguard Workerparticular ambiguity, but would cause assignments to
2078*2e9d4914SAndroid Build Coastguard Worker<code>std::string</code> like the one in the previous example to produce a
2079*2e9d4914SAndroid Build Coastguard Workercompiler error. (To understand why, see section 11.4.1 of <i>The C++
2080*2e9d4914SAndroid Build Coastguard WorkerProgramming Language</i>.)
2081*2e9d4914SAndroid Build Coastguard Worker</p>
2082*2e9d4914SAndroid Build Coastguard Worker<p>The solution to this problem is to use an explicit conversion that
2083*2e9d4914SAndroid Build Coastguard Workeravoids the construction of an intermediate <code>std::string</code> object,
2084*2e9d4914SAndroid Build Coastguard Workeras follows:
2085*2e9d4914SAndroid Build Coastguard Worker</p>
2086*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
2087*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
2088*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">std::string title;
2089*2e9d4914SAndroid Build Coastguard Worker.
2090*2e9d4914SAndroid Build Coastguard Worker.
2091*2e9d4914SAndroid Build Coastguard Worker.
2092*2e9d4914SAndroid Build Coastguard Workertitle = (const char *)config.lookup(&quot;application.window.title&quot;);
2093*2e9d4914SAndroid Build Coastguard Worker</pre></div>
2094*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
2095*2e9d4914SAndroid Build Coastguard Worker
2096*2e9d4914SAndroid Build Coastguard Worker<p>Or, alternatively, use the <code>c_str()</code> method, which has the same effect:
2097*2e9d4914SAndroid Build Coastguard Worker</p>
2098*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
2099*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
2100*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">std::string title;
2101*2e9d4914SAndroid Build Coastguard Worker.
2102*2e9d4914SAndroid Build Coastguard Worker.
2103*2e9d4914SAndroid Build Coastguard Worker.
2104*2e9d4914SAndroid Build Coastguard Workertitle = config.lookup(&quot;application.window.title&quot;).c_str();
2105*2e9d4914SAndroid Build Coastguard Worker</pre></div>
2106*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
2107*2e9d4914SAndroid Build Coastguard Worker
2108*2e9d4914SAndroid Build Coastguard Worker<p>If the assignment is invalid due to a type mismatch, a
2109*2e9d4914SAndroid Build Coastguard Worker<code>SettingTypeException</code> is thrown.
2110*2e9d4914SAndroid Build Coastguard Worker</p>
2111*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2112*2e9d4914SAndroid Build Coastguard Worker
2113*2e9d4914SAndroid Build Coastguard Worker<dl>
2114*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_003d-on-Setting"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator=</strong> <em>(bool&nbsp;<var>value</var><!-- /@w -->)</em></dt>
2115*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_003d-on-Setting-1"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator=</strong> <em>(int&nbsp;<var>value</var><!-- /@w -->)</em></dt>
2116*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_003d-on-Setting-2"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator=</strong> <em>(long&nbsp;<var>value</var><!-- /@w -->)</em></dt>
2117*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_003d-on-Setting-3"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator=</strong> <em>(const&nbsp;long&nbsp;long&nbsp;&amp;<var>value</var><!-- /@w -->)</em></dt>
2118*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_003d-on-Setting-4"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator=</strong> <em>(float&nbsp;<var>value</var><!-- /@w -->)</em></dt>
2119*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_003d-on-Setting-5"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator=</strong> <em>(const&nbsp;double&nbsp;&amp;<var>value</var><!-- /@w -->)</em></dt>
2120*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_003d-on-Setting-6"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator=</strong> <em>(const&nbsp;char&nbsp;*<var>value</var><!-- /@w -->)</em></dt>
2121*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_003d-on-Setting-7"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator=</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>value</var><!-- /@w -->)</em></dt>
2122*2e9d4914SAndroid Build Coastguard Worker<dd>
2123*2e9d4914SAndroid Build Coastguard Worker<p>These assignment operators allow values of type <i>bool</i>, <i>int</i>,
2124*2e9d4914SAndroid Build Coastguard Worker<i>long</i>, <i>long long</i>, <i>float</i>, <i>double</i>, <i>const char *</i>, and
2125*2e9d4914SAndroid Build Coastguard Worker<i>std::string</i> to be assigned to a setting. In the case of strings,
2126*2e9d4914SAndroid Build Coastguard Workerthe library makes a copy of the passed string <var>value</var>, so it may
2127*2e9d4914SAndroid Build Coastguard Workerbe subsequently freed or modified by the caller without affecting the
2128*2e9d4914SAndroid Build Coastguard Workervalue of the setting.
2129*2e9d4914SAndroid Build Coastguard Worker</p>
2130*2e9d4914SAndroid Build Coastguard Worker<p>The following example code looks up a (presumably) integer setting
2131*2e9d4914SAndroid Build Coastguard Workerand changes its value:
2132*2e9d4914SAndroid Build Coastguard Worker</p>
2133*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
2134*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
2135*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">Setting &amp;setting = config.lookup(&quot;application.window.size.w&quot;);
2136*2e9d4914SAndroid Build Coastguard Workersetting = 1024;
2137*2e9d4914SAndroid Build Coastguard Worker</pre></div>
2138*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
2139*2e9d4914SAndroid Build Coastguard Worker
2140*2e9d4914SAndroid Build Coastguard Worker<p>If the assignment is invalid due to a type mismatch, a
2141*2e9d4914SAndroid Build Coastguard Worker<code>SettingTypeException</code> is thrown.
2142*2e9d4914SAndroid Build Coastguard Worker</p>
2143*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2144*2e9d4914SAndroid Build Coastguard Worker
2145*2e9d4914SAndroid Build Coastguard Worker<dl>
2146*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_005b_005d-on-Setting"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator[]</strong> <em>(int&nbsp;<var>index</var><!-- /@w -->) const</em></dt>
2147*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_005b_005d-on-Setting-1"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator[]</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->) const</em></dt>
2148*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-operator_005b_005d-on-Setting-2"></a>Method on Setting: <em>Setting &amp;</em> <strong>operator[]</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->) const</em></dt>
2149*2e9d4914SAndroid Build Coastguard Worker<dd>
2150*2e9d4914SAndroid Build Coastguard Worker<p>A <code>Setting</code> object may be subscripted with an integer index
2151*2e9d4914SAndroid Build Coastguard Worker<var>index</var> if it is an array or list, or with either a string
2152*2e9d4914SAndroid Build Coastguard Worker<var>name</var> or an integer index <var>index</var> if it is a group. For example,
2153*2e9d4914SAndroid Build Coastguard Workerthe following code would produce the string &lsquo;<samp>Last Name</samp>&rsquo; when
2154*2e9d4914SAndroid Build Coastguard Workerapplied to the example configuration in <a href="#Configuration-Files">Configuration Files</a>.
2155*2e9d4914SAndroid Build Coastguard Worker</p>
2156*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
2157*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
2158*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">Setting&amp; setting = config.lookup(&quot;application.misc&quot;);
2159*2e9d4914SAndroid Build Coastguard Workerconst char *s = setting[&quot;columns&quot;][0];
2160*2e9d4914SAndroid Build Coastguard Worker</pre></div>
2161*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
2162*2e9d4914SAndroid Build Coastguard Worker
2163*2e9d4914SAndroid Build Coastguard Worker<p>If the setting is not an array, list, or group, a
2164*2e9d4914SAndroid Build Coastguard Worker<code>SettingTypeException</code> is thrown. If the subscript (<var>index</var>
2165*2e9d4914SAndroid Build Coastguard Workeror <var>name</var>) does not refer to a valid element, a
2166*2e9d4914SAndroid Build Coastguard Worker<code>SettingNotFoundException</code> is thrown.
2167*2e9d4914SAndroid Build Coastguard Worker</p>
2168*2e9d4914SAndroid Build Coastguard Worker<p>Iterating over a group&rsquo;s child settings with an integer index will
2169*2e9d4914SAndroid Build Coastguard Workerreturn the settings in the same order that they appear in the
2170*2e9d4914SAndroid Build Coastguard Workerconfiguration.
2171*2e9d4914SAndroid Build Coastguard Worker</p>
2172*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2173*2e9d4914SAndroid Build Coastguard Worker
2174*2e9d4914SAndroid Build Coastguard Worker<dl>
2175*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookup-on-Setting"></a>Method on Setting: <em>Setting &amp;</em> <strong>lookup</strong> <em>(const&nbsp;char&nbsp;*&nbsp;<var>path</var><!-- /@w -->) const</em></dt>
2176*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookup-on-Setting-1"></a>Method on Setting: <em>Setting &amp;</em> <strong>lookup</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>path</var><!-- /@w -->) const</em></dt>
2177*2e9d4914SAndroid Build Coastguard Worker<dd>
2178*2e9d4914SAndroid Build Coastguard Worker<p>These methods locate a setting by a path <var>path</var> relative to
2179*2e9d4914SAndroid Build Coastguard Workerthis setting. If requested setting is not found, a
2180*2e9d4914SAndroid Build Coastguard Worker<code>SettingNotFoundException</code> is thrown.
2181*2e9d4914SAndroid Build Coastguard Worker</p>
2182*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2183*2e9d4914SAndroid Build Coastguard Worker
2184*2e9d4914SAndroid Build Coastguard Worker<dl>
2185*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, bool&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2186*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-1"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, bool&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2187*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-2"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, int&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2188*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-3"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, int&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2189*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-4"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, unsigned&nbsp;int&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2190*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-5"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, unsigned&nbsp;int&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2191*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-6"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, long&nbsp;long&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2192*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-7"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, long&nbsp;long&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2193*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-8"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, unsigned&nbsp;long&nbsp;long&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2194*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-9"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, unsigned&nbsp;long&nbsp;long&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2195*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-10"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, float&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2196*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-11"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, float&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2197*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-12"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, double&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2198*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-13"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, double&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2199*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-14"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, const&nbsp;char&nbsp;*&amp;<var>value</var><!-- /@w -->) const</em></dt>
2200*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-15"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, const&nbsp;char&nbsp;*&amp;<var>value</var><!-- /@w -->) const</em></dt>
2201*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-16"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, std::string&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2202*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-lookupValue-on-Setting-17"></a>Method on Setting: <em>bool</em> <strong>lookupValue</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, std::string&nbsp;&amp;<var>value</var><!-- /@w -->) const</em></dt>
2203*2e9d4914SAndroid Build Coastguard Worker<dd>
2204*2e9d4914SAndroid Build Coastguard Worker<p>These are convenience methods for looking up the value of a child setting
2205*2e9d4914SAndroid Build Coastguard Workerwith the given <var>name</var>. If the setting is found and is of an
2206*2e9d4914SAndroid Build Coastguard Workerappropriate type, the value is stored in <var>value</var> and the method
2207*2e9d4914SAndroid Build Coastguard Workerreturns <code>true</code>. Otherwise, <var>value</var> is left unmodified and the
2208*2e9d4914SAndroid Build Coastguard Workermethod returns <code>false</code>. These methods do not throw exceptions.
2209*2e9d4914SAndroid Build Coastguard Worker</p>
2210*2e9d4914SAndroid Build Coastguard Worker<p>Storage for <i>const&nbsp;char&nbsp;*</i><!-- /@w --> values is managed by the library and
2211*2e9d4914SAndroid Build Coastguard Workerreleased automatically when the setting is destroyed or when its value
2212*2e9d4914SAndroid Build Coastguard Workeris changed; the string must not be freed by the caller. For safety and
2213*2e9d4914SAndroid Build Coastguard Workerconvenience, always assigning string values to a <code>std::string</code> is
2214*2e9d4914SAndroid Build Coastguard Workersuggested.
2215*2e9d4914SAndroid Build Coastguard Worker</p>
2216*2e9d4914SAndroid Build Coastguard Worker<p>Since these methods have boolean return values and do not throw
2217*2e9d4914SAndroid Build Coastguard Workerexceptions, they can be used within boolean logic expressions. The following
2218*2e9d4914SAndroid Build Coastguard Workerexample presents a concise way to look up three values at once and
2219*2e9d4914SAndroid Build Coastguard Workerperform error handling if any of them are not found or are of the
2220*2e9d4914SAndroid Build Coastguard Workerwrong type:
2221*2e9d4914SAndroid Build Coastguard Worker</p>
2222*2e9d4914SAndroid Build Coastguard Worker<br>
2223*2e9d4914SAndroid Build Coastguard Worker<table class="cartouche" border="1"><tr><td>
2224*2e9d4914SAndroid Build Coastguard Worker<div class="smallexample">
2225*2e9d4914SAndroid Build Coastguard Worker<pre class="smallexample">int var1;
2226*2e9d4914SAndroid Build Coastguard Workerdouble var2;
2227*2e9d4914SAndroid Build Coastguard Workerconst char *var3;
2228*2e9d4914SAndroid Build Coastguard Worker
2229*2e9d4914SAndroid Build Coastguard Workerif(setting.lookupValue(&quot;var1&quot;, var1)
2230*2e9d4914SAndroid Build Coastguard Worker   &amp;&amp; setting.lookupValue(&quot;var2&quot;, var2)
2231*2e9d4914SAndroid Build Coastguard Worker   &amp;&amp; setting.lookupValue(&quot;var3&quot;, var3))
2232*2e9d4914SAndroid Build Coastguard Worker{
2233*2e9d4914SAndroid Build Coastguard Worker  // use var1, var2, var3
2234*2e9d4914SAndroid Build Coastguard Worker}
2235*2e9d4914SAndroid Build Coastguard Workerelse
2236*2e9d4914SAndroid Build Coastguard Worker{
2237*2e9d4914SAndroid Build Coastguard Worker  // error handling here
2238*2e9d4914SAndroid Build Coastguard Worker}
2239*2e9d4914SAndroid Build Coastguard Worker</pre></div>
2240*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
2241*2e9d4914SAndroid Build Coastguard Worker
2242*2e9d4914SAndroid Build Coastguard Worker<p>This approach also takes advantage of the short-circuit evaluation
2243*2e9d4914SAndroid Build Coastguard Workerrules of C++, e.g., if the first lookup fails (returning <code>false</code>), the
2244*2e9d4914SAndroid Build Coastguard Workerremaining lookups are skipped entirely.
2245*2e9d4914SAndroid Build Coastguard Worker</p>
2246*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2247*2e9d4914SAndroid Build Coastguard Worker
2248*2e9d4914SAndroid Build Coastguard Worker<dl>
2249*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-add-on-Setting"></a>Method on Setting: <em>Setting &amp;</em> <strong>add</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->, Setting::Type&nbsp;<var>type</var><!-- /@w -->)</em></dt>
2250*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-add-on-Setting-1"></a>Method on Setting: <em>Setting &amp;</em> <strong>add</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->, Setting::Type&nbsp;<var>type</var><!-- /@w -->)</em></dt>
2251*2e9d4914SAndroid Build Coastguard Worker<dd>
2252*2e9d4914SAndroid Build Coastguard Worker<p>These methods add a new child setting with the given <var>name</var> and
2253*2e9d4914SAndroid Build Coastguard Worker<var>type</var> to the setting, which must be a group. They return a
2254*2e9d4914SAndroid Build Coastguard Workerreference to the new setting. If the setting already has a child
2255*2e9d4914SAndroid Build Coastguard Workersetting with the given name, or if the name is invalid, a
2256*2e9d4914SAndroid Build Coastguard Worker<code>SettingNameException</code> is thrown. If the setting is not a group,
2257*2e9d4914SAndroid Build Coastguard Workera <code>SettingTypeException</code> is thrown.
2258*2e9d4914SAndroid Build Coastguard Worker</p>
2259*2e9d4914SAndroid Build Coastguard Worker<p>Once a setting has been created, neither its name nor type can be
2260*2e9d4914SAndroid Build Coastguard Workerchanged.
2261*2e9d4914SAndroid Build Coastguard Worker</p>
2262*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2263*2e9d4914SAndroid Build Coastguard Worker
2264*2e9d4914SAndroid Build Coastguard Worker<dl>
2265*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-add-on-Setting-2"></a>Method on Setting: <em>Setting &amp;</em> <strong>add</strong> <em>(Setting::Type&nbsp;<var>type</var><!-- /@w -->)</em></dt>
2266*2e9d4914SAndroid Build Coastguard Worker<dd>
2267*2e9d4914SAndroid Build Coastguard Worker<p>This method adds a new element to the setting, which must be of type
2268*2e9d4914SAndroid Build Coastguard Worker<code>TypeArray</code> or <code>TypeList</code>. If the setting is an array which
2269*2e9d4914SAndroid Build Coastguard Workercurrently has zero elements, the <var>type</var> parameter (which must be
2270*2e9d4914SAndroid Build Coastguard Worker<code>TypeInt</code>, <code>TypeInt64</code>, <code>TypeFloat</code>, <code>TypeBool</code>,
2271*2e9d4914SAndroid Build Coastguard Workeror <code>TypeString</code>) determines the type for the array; otherwise it
2272*2e9d4914SAndroid Build Coastguard Workermust match the type of the existing elements in the array.
2273*2e9d4914SAndroid Build Coastguard Worker</p>
2274*2e9d4914SAndroid Build Coastguard Worker<p>The method returns the new setting on success. If <var>type</var> is a
2275*2e9d4914SAndroid Build Coastguard Workerscalar type, the new setting will have a default value of 0, 0.0,
2276*2e9d4914SAndroid Build Coastguard Worker<code>false</code>, or <code>NULL</code>, as appropriate.
2277*2e9d4914SAndroid Build Coastguard Worker</p>
2278*2e9d4914SAndroid Build Coastguard Worker<p>The method throws a <code>SettingTypeException</code> if the setting is not
2279*2e9d4914SAndroid Build Coastguard Workeran array or list, or if <var>type</var> is invalid.
2280*2e9d4914SAndroid Build Coastguard Worker</p>
2281*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2282*2e9d4914SAndroid Build Coastguard Worker
2283*2e9d4914SAndroid Build Coastguard Worker<dl>
2284*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-remove-on-Setting"></a>Method on Setting: <em>void</em> <strong>remove</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->)</em></dt>
2285*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-remove-on-Setting-1"></a>Method on Setting: <em>void</em> <strong>remove</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->)</em></dt>
2286*2e9d4914SAndroid Build Coastguard Worker<dd>
2287*2e9d4914SAndroid Build Coastguard Worker<p>These methods remove the child setting with the given <var>name</var> from
2288*2e9d4914SAndroid Build Coastguard Workerthe setting, which must be a group. Any child settings of the removed
2289*2e9d4914SAndroid Build Coastguard Workersetting are recursively destroyed as well.
2290*2e9d4914SAndroid Build Coastguard Worker</p>
2291*2e9d4914SAndroid Build Coastguard Worker<p>If the setting is not a group, a <code>SettingTypeException</code> is
2292*2e9d4914SAndroid Build Coastguard Workerthrown.  If the setting does not have a child setting with the given
2293*2e9d4914SAndroid Build Coastguard Workername, a <code>SettingNotFoundException</code> is thrown.
2294*2e9d4914SAndroid Build Coastguard Worker</p>
2295*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2296*2e9d4914SAndroid Build Coastguard Worker
2297*2e9d4914SAndroid Build Coastguard Worker<dl>
2298*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-remove-on-Setting-2"></a>Method on Setting: <em>void</em> <strong>remove</strong> <em>(unsigned&nbsp;int&nbsp;<var>index</var><!-- /@w -->)</em></dt>
2299*2e9d4914SAndroid Build Coastguard Worker<dd>
2300*2e9d4914SAndroid Build Coastguard Worker<p>This method removes the child setting at the given index <var>index</var> from
2301*2e9d4914SAndroid Build Coastguard Workerthe setting, which must be a group, list, or array. Any child settings
2302*2e9d4914SAndroid Build Coastguard Workerof the removed setting are recursively destroyed as well.
2303*2e9d4914SAndroid Build Coastguard Worker</p>
2304*2e9d4914SAndroid Build Coastguard Worker<p>If the setting is not a group, list, or array, a
2305*2e9d4914SAndroid Build Coastguard Worker<code>SettingTypeException</code> is thrown.  If <var>index</var> is out of range,
2306*2e9d4914SAndroid Build Coastguard Workera <code>SettingNotFoundException</code> is thrown.
2307*2e9d4914SAndroid Build Coastguard Worker</p>
2308*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2309*2e9d4914SAndroid Build Coastguard Worker
2310*2e9d4914SAndroid Build Coastguard Worker<dl>
2311*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getName-on-Setting"></a>Method on Setting: <em>const char *</em> <strong>getName</strong> <em>() const</em></dt>
2312*2e9d4914SAndroid Build Coastguard Worker<dd>
2313*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the name of the setting, or <code>NULL</code> if the
2314*2e9d4914SAndroid Build Coastguard Workersetting has no name. Storage for the returned string is managed by the
2315*2e9d4914SAndroid Build Coastguard Workerlibrary and released automatically when the setting is destroyed; the
2316*2e9d4914SAndroid Build Coastguard Workerstring must not be freed by the caller. For safety and convenience,
2317*2e9d4914SAndroid Build Coastguard Workerconsider assigning the return value to a <code>std::string</code>.
2318*2e9d4914SAndroid Build Coastguard Worker</p>
2319*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2320*2e9d4914SAndroid Build Coastguard Worker
2321*2e9d4914SAndroid Build Coastguard Worker<dl>
2322*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getPath-on-Setting"></a>Method on Setting: <em>std::string</em> <strong>getPath</strong> <em>() const</em></dt>
2323*2e9d4914SAndroid Build Coastguard Worker<dd>
2324*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the complete dot-separated path to the
2325*2e9d4914SAndroid Build Coastguard Workersetting. Settings which do not have a name (list and array elements)
2326*2e9d4914SAndroid Build Coastguard Workerare represented by their index in square brackets.
2327*2e9d4914SAndroid Build Coastguard Worker</p>
2328*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2329*2e9d4914SAndroid Build Coastguard Worker
2330*2e9d4914SAndroid Build Coastguard Worker<dl>
2331*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getParent-on-Setting"></a>Method on Setting: <em>Setting &amp;</em> <strong>getParent</strong> <em>() const</em></dt>
2332*2e9d4914SAndroid Build Coastguard Worker<dd>
2333*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the parent setting of the setting. If the setting
2334*2e9d4914SAndroid Build Coastguard Workeris the root setting, a <code>SettingNotFoundException</code> is thrown.
2335*2e9d4914SAndroid Build Coastguard Worker</p>
2336*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2337*2e9d4914SAndroid Build Coastguard Worker
2338*2e9d4914SAndroid Build Coastguard Worker<dl>
2339*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-isRoot-on-Setting"></a>Method on Setting: <em>bool</em> <strong>isRoot</strong> <em>() const</em></dt>
2340*2e9d4914SAndroid Build Coastguard Worker<dd>
2341*2e9d4914SAndroid Build Coastguard Worker<p>This method returns <code>true</code> if the setting is the root setting, and
2342*2e9d4914SAndroid Build Coastguard Worker<code>false</code> otherwise.
2343*2e9d4914SAndroid Build Coastguard Worker</p>
2344*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2345*2e9d4914SAndroid Build Coastguard Worker
2346*2e9d4914SAndroid Build Coastguard Worker<dl>
2347*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getIndex-on-Setting"></a>Method on Setting: <em>int</em> <strong>getIndex</strong> <em>() const</em></dt>
2348*2e9d4914SAndroid Build Coastguard Worker<dd>
2349*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the index of the setting within its parent
2350*2e9d4914SAndroid Build Coastguard Workersetting. When applied to the root setting, this method returns -1.
2351*2e9d4914SAndroid Build Coastguard Worker</p>
2352*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2353*2e9d4914SAndroid Build Coastguard Worker
2354*2e9d4914SAndroid Build Coastguard Worker<dl>
2355*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getType-on-Setting"></a>Method on Setting: <em>Setting::Type</em> <strong>getType</strong> <em>() const</em></dt>
2356*2e9d4914SAndroid Build Coastguard Worker<dd>
2357*2e9d4914SAndroid Build Coastguard Worker<a name="index-Setting_003a_003aType"></a>
2358*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the type of the setting. The
2359*2e9d4914SAndroid Build Coastguard Worker<code>Setting::Type</code> enumeration consists of the following constants:
2360*2e9d4914SAndroid Build Coastguard Worker<code>TypeInt</code>, <code>TypeInt64</code>, <code>TypeFloat</code>, <code>TypeString</code>,
2361*2e9d4914SAndroid Build Coastguard Worker<code>TypeBoolean</code>, <code>TypeArray</code>, <code>TypeList</code>, and
2362*2e9d4914SAndroid Build Coastguard Worker<code>TypeGroup</code>.
2363*2e9d4914SAndroid Build Coastguard Worker</p>
2364*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2365*2e9d4914SAndroid Build Coastguard Worker
2366*2e9d4914SAndroid Build Coastguard Worker<dl>
2367*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getFormat-on-Setting"></a>Method on Setting: <em>Setting::Format</em> <strong>getFormat</strong> <em>() const</em></dt>
2368*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-setFormat-on-Setting"></a>Method on Setting: <em>void</em> <strong>setFormat</strong> <em>(Setting::Format&nbsp;<var>format</var><!-- /@w -->)</em></dt>
2369*2e9d4914SAndroid Build Coastguard Worker<dd>
2370*2e9d4914SAndroid Build Coastguard Worker<p>These methods get and set the external format for the setting.
2371*2e9d4914SAndroid Build Coastguard Worker</p>
2372*2e9d4914SAndroid Build Coastguard Worker<a name="index-Setting_003a_003aFormat"></a>
2373*2e9d4914SAndroid Build Coastguard Worker<p>The <var>Setting::Format</var> enumeration consists of the following
2374*2e9d4914SAndroid Build Coastguard Workerconstants: <code>FormatDefault</code> and <code>FormatHex</code>. All settings
2375*2e9d4914SAndroid Build Coastguard Workersupport the <code>FormatDefault</code> format. The <code>FormatHex</code> format
2376*2e9d4914SAndroid Build Coastguard Workerspecifies hexadecimal formatting for integer values, and hence only
2377*2e9d4914SAndroid Build Coastguard Workerapplies to settings of type <code>TypeInt</code> and <code>TypeInt64</code>. If
2378*2e9d4914SAndroid Build Coastguard Worker<var>format</var> is invalid for the given setting, it is ignored.
2379*2e9d4914SAndroid Build Coastguard Worker</p>
2380*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2381*2e9d4914SAndroid Build Coastguard Worker
2382*2e9d4914SAndroid Build Coastguard Worker<dl>
2383*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-exists-on-Setting"></a>Method on Setting: <em>bool</em> <strong>exists</strong> <em>(const&nbsp;std::string&nbsp;&amp;<var>name</var><!-- /@w -->) const</em></dt>
2384*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-exists-on-Setting-1"></a>Method on Setting: <em>bool</em> <strong>exists</strong> <em>(const&nbsp;char&nbsp;*<var>name</var><!-- /@w -->) const</em></dt>
2385*2e9d4914SAndroid Build Coastguard Worker<dd>
2386*2e9d4914SAndroid Build Coastguard Worker<p>These methods test if the setting has a child setting with the given
2387*2e9d4914SAndroid Build Coastguard Worker<var>name</var>. They return <code>true</code> if the setting exists, and
2388*2e9d4914SAndroid Build Coastguard Worker<code>false</code> otherwise. These methods do not throw exceptions.
2389*2e9d4914SAndroid Build Coastguard Worker</p>
2390*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2391*2e9d4914SAndroid Build Coastguard Worker<dl>
2392*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-begin-on-Setting"></a>Method on Setting: <em>iterator</em> <strong>begin</strong> <em>()</em></dt>
2393*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-end-on-Setting"></a>Method on Setting: <em>iterator</em> <strong>end</strong> <em>()</em></dt>
2394*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-begin-on-Setting-1"></a>Method on Setting: <em>const_iterator</em> <strong>begin</strong> <em>()</em></dt>
2395*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-end-on-Setting-1"></a>Method on Setting: <em>const_iterator</em> <strong>end</strong> <em>()</em></dt>
2396*2e9d4914SAndroid Build Coastguard Worker<dd>
2397*2e9d4914SAndroid Build Coastguard Worker<p>These methods return STL-style iterators that can be used to enumerate
2398*2e9d4914SAndroid Build Coastguard Workerthe child settings of a given setting. If the setting is not an array, list,
2399*2e9d4914SAndroid Build Coastguard Workeror group, they throw a <code>SettingTypeException</code>.
2400*2e9d4914SAndroid Build Coastguard Worker</p>
2401*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2402*2e9d4914SAndroid Build Coastguard Worker
2403*2e9d4914SAndroid Build Coastguard Worker<dl>
2404*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getLength-on-Setting"></a>Method on Setting: <em>int</em> <strong>getLength</strong> <em>() const</em></dt>
2405*2e9d4914SAndroid Build Coastguard Worker<dd>
2406*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the number of settings in a group, or the number of
2407*2e9d4914SAndroid Build Coastguard Workerelements in a list or array. For other types of settings, it returns
2408*2e9d4914SAndroid Build Coastguard Worker0.
2409*2e9d4914SAndroid Build Coastguard Worker</p>
2410*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2411*2e9d4914SAndroid Build Coastguard Worker
2412*2e9d4914SAndroid Build Coastguard Worker<dl>
2413*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-isGroup-on-Setting"></a>Method on Setting: <em>bool</em> <strong>isGroup</strong> <em>() const</em></dt>
2414*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-isArray-on-Setting"></a>Method on Setting: <em>bool</em> <strong>isArray</strong> <em>() const</em></dt>
2415*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-isList-on-Setting"></a>Method on Setting: <em>bool</em> <strong>isList</strong> <em>() const</em></dt>
2416*2e9d4914SAndroid Build Coastguard Worker<dd>
2417*2e9d4914SAndroid Build Coastguard Worker<p>These convenience methods test if a setting is of a given type.
2418*2e9d4914SAndroid Build Coastguard Worker</p>
2419*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2420*2e9d4914SAndroid Build Coastguard Worker
2421*2e9d4914SAndroid Build Coastguard Worker<dl>
2422*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-isAggregate-on-Setting"></a>Method on Setting: <em>bool</em> <strong>isAggregate</strong> <em>() const</em></dt>
2423*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-isScalar-on-Setting"></a>Method on Setting: <em>bool</em> <strong>isScalar</strong> <em>() const</em></dt>
2424*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-isNumber-on-Setting"></a>Method on Setting: <em>bool</em> <strong>isNumber</strong> <em>() const</em></dt>
2425*2e9d4914SAndroid Build Coastguard Worker<dd>
2426*2e9d4914SAndroid Build Coastguard Worker<p>These convenience methods test if a setting is of an aggregate type (a
2427*2e9d4914SAndroid Build Coastguard Workergroup, array, or list), of a scalar type (integer, 64-bit integer,
2428*2e9d4914SAndroid Build Coastguard Workerfloating point, boolean, or string), and of a number (integer, 64-bit
2429*2e9d4914SAndroid Build Coastguard Workerinteger, or floating point), respectively.
2430*2e9d4914SAndroid Build Coastguard Worker</p>
2431*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2432*2e9d4914SAndroid Build Coastguard Worker
2433*2e9d4914SAndroid Build Coastguard Worker<dl>
2434*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getSourceFile-on-Setting"></a>Method on Setting: <em>const char *</em> <strong>getSourceFile</strong> <em>() const</em></dt>
2435*2e9d4914SAndroid Build Coastguard Worker<dd>
2436*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the name of the file from which the setting was
2437*2e9d4914SAndroid Build Coastguard Workerread, or NULL if the setting was not read from a file. This
2438*2e9d4914SAndroid Build Coastguard Workerinformation is useful for reporting application-level errors. Storage
2439*2e9d4914SAndroid Build Coastguard Workerfor the returned string is managed by the library and released
2440*2e9d4914SAndroid Build Coastguard Workerautomatically when the configuration is destroyed; the string must
2441*2e9d4914SAndroid Build Coastguard Workernot be freed by the caller.
2442*2e9d4914SAndroid Build Coastguard Worker</p>
2443*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2444*2e9d4914SAndroid Build Coastguard Worker
2445*2e9d4914SAndroid Build Coastguard Worker<dl>
2446*2e9d4914SAndroid Build Coastguard Worker<dt><a name="index-getSourceLine-on-Setting"></a>Method on Setting: <em>unsigned int</em> <strong>getSourceLine</strong> <em>() const</em></dt>
2447*2e9d4914SAndroid Build Coastguard Worker<dd>
2448*2e9d4914SAndroid Build Coastguard Worker<p>This method returns the line number of the configuration file or
2449*2e9d4914SAndroid Build Coastguard Workerstream at which the setting <var>setting</var> was read, or 0 if no line
2450*2e9d4914SAndroid Build Coastguard Workernumber is available. This information is useful for reporting
2451*2e9d4914SAndroid Build Coastguard Workerapplication-level errors.
2452*2e9d4914SAndroid Build Coastguard Worker</p>
2453*2e9d4914SAndroid Build Coastguard Worker</dd></dl>
2454*2e9d4914SAndroid Build Coastguard Worker
2455*2e9d4914SAndroid Build Coastguard Worker<hr>
2456*2e9d4914SAndroid Build Coastguard Worker<a name="Example-Programs"></a>
2457*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2458*2e9d4914SAndroid Build Coastguard Worker<p>
2459*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Other-Bindings-and-Implementations" accesskey="n" rel="next">Other Bindings and Implementations</a>, Previous: <a href="#The-C_002b_002b-API" accesskey="p" rel="prev">The C++ API</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2460*2e9d4914SAndroid Build Coastguard Worker</div>
2461*2e9d4914SAndroid Build Coastguard Worker<a name="Example-Programs-1"></a>
2462*2e9d4914SAndroid Build Coastguard Worker<h2 class="chapter">5 Example Programs</h2>
2463*2e9d4914SAndroid Build Coastguard Worker
2464*2e9d4914SAndroid Build Coastguard Worker<p>Practical example programs that illustrate how to use <i>libconfig</i>
2465*2e9d4914SAndroid Build Coastguard Workerfrom both C and C++ are included in the <samp>examples</samp> subdirectory
2466*2e9d4914SAndroid Build Coastguard Workerof the distribution. These examples include:
2467*2e9d4914SAndroid Build Coastguard Worker</p>
2468*2e9d4914SAndroid Build Coastguard Worker<dl compact="compact">
2469*2e9d4914SAndroid Build Coastguard Worker<dt><samp>examples/c/example1.c</samp></dt>
2470*2e9d4914SAndroid Build Coastguard Worker<dd><p>An example C program that reads a configuration from an existing file
2471*2e9d4914SAndroid Build Coastguard Worker<samp>example.cfg</samp> (also located in <samp>examples/c</samp>) and displays
2472*2e9d4914SAndroid Build Coastguard Workersome of its contents.
2473*2e9d4914SAndroid Build Coastguard Worker</p>
2474*2e9d4914SAndroid Build Coastguard Worker</dd>
2475*2e9d4914SAndroid Build Coastguard Worker<dt><samp>examples/c++/example1.cpp</samp></dt>
2476*2e9d4914SAndroid Build Coastguard Worker<dd><p>The C++ equivalent of <samp>example1.c</samp>.
2477*2e9d4914SAndroid Build Coastguard Worker</p>
2478*2e9d4914SAndroid Build Coastguard Worker</dd>
2479*2e9d4914SAndroid Build Coastguard Worker<dt><samp>examples/c/example2.c</samp></dt>
2480*2e9d4914SAndroid Build Coastguard Worker<dd><p>An example C program that reads a configuration from an existing file
2481*2e9d4914SAndroid Build Coastguard Worker<samp>example.cfg</samp> (also located in <samp>examples/c</samp>), adds new
2482*2e9d4914SAndroid Build Coastguard Workersettings to the configuration, and writes the updated configuration to
2483*2e9d4914SAndroid Build Coastguard Workeranother file.
2484*2e9d4914SAndroid Build Coastguard Worker</p>
2485*2e9d4914SAndroid Build Coastguard Worker</dd>
2486*2e9d4914SAndroid Build Coastguard Worker<dt><samp>examples/c++/example2.cpp</samp></dt>
2487*2e9d4914SAndroid Build Coastguard Worker<dd><p>The C++ equivalent of <samp>example2.c</samp>
2488*2e9d4914SAndroid Build Coastguard Worker</p>
2489*2e9d4914SAndroid Build Coastguard Worker</dd>
2490*2e9d4914SAndroid Build Coastguard Worker<dt><samp>examples/c/example3.c</samp></dt>
2491*2e9d4914SAndroid Build Coastguard Worker<dd><p>An example C program that constructs a new configuration in memory and writes it to a file.
2492*2e9d4914SAndroid Build Coastguard Worker</p>
2493*2e9d4914SAndroid Build Coastguard Worker</dd>
2494*2e9d4914SAndroid Build Coastguard Worker<dt><samp>examples/c++/example3.cpp</samp></dt>
2495*2e9d4914SAndroid Build Coastguard Worker<dd><p>The C++ equivalent of <samp>example3.c</samp>
2496*2e9d4914SAndroid Build Coastguard Worker</p>
2497*2e9d4914SAndroid Build Coastguard Worker</dd>
2498*2e9d4914SAndroid Build Coastguard Worker<dt><samp>examples/c/example4.c</samp></dt>
2499*2e9d4914SAndroid Build Coastguard Worker<dd><p>An example C program that uses a custom include function for processing
2500*2e9d4914SAndroid Build Coastguard Workerwildcard includes. Note that this code will not compile on Windows.
2501*2e9d4914SAndroid Build Coastguard Worker</p>
2502*2e9d4914SAndroid Build Coastguard Worker</dd>
2503*2e9d4914SAndroid Build Coastguard Worker</dl>
2504*2e9d4914SAndroid Build Coastguard Worker
2505*2e9d4914SAndroid Build Coastguard Worker<hr>
2506*2e9d4914SAndroid Build Coastguard Worker<a name="Other-Bindings-and-Implementations"></a>
2507*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2508*2e9d4914SAndroid Build Coastguard Worker<p>
2509*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#License" accesskey="n" rel="next">License</a>, Previous: <a href="#Example-Programs" accesskey="p" rel="prev">Example Programs</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2510*2e9d4914SAndroid Build Coastguard Worker</div>
2511*2e9d4914SAndroid Build Coastguard Worker<a name="Other-Bindings-and-Implementations-1"></a>
2512*2e9d4914SAndroid Build Coastguard Worker<h2 class="chapter">6 Other Bindings and Implementations</h2>
2513*2e9d4914SAndroid Build Coastguard Worker<table class="menu" border="0" cellspacing="0">
2514*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Bourne-Shell" accesskey="1">Bourne Shell</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2515*2e9d4914SAndroid Build Coastguard Worker</td></tr>
2516*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#D" accesskey="2">D</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2517*2e9d4914SAndroid Build Coastguard Worker</td></tr>
2518*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Haskell" accesskey="3">Haskell</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2519*2e9d4914SAndroid Build Coastguard Worker</td></tr>
2520*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Java" accesskey="4">Java</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2521*2e9d4914SAndroid Build Coastguard Worker</td></tr>
2522*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Lisp" accesskey="5">Lisp</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2523*2e9d4914SAndroid Build Coastguard Worker</td></tr>
2524*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Perl" accesskey="6">Perl</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2525*2e9d4914SAndroid Build Coastguard Worker</td></tr>
2526*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Python" accesskey="7">Python</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2527*2e9d4914SAndroid Build Coastguard Worker</td></tr>
2528*2e9d4914SAndroid Build Coastguard Worker<tr><td align="left" valign="top">&bull; <a href="#Ruby" accesskey="8">Ruby</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
2529*2e9d4914SAndroid Build Coastguard Worker</td></tr>
2530*2e9d4914SAndroid Build Coastguard Worker</table>
2531*2e9d4914SAndroid Build Coastguard Worker
2532*2e9d4914SAndroid Build Coastguard Worker<p>Various open-source libraries have been written that provide access to
2533*2e9d4914SAndroid Build Coastguard Worker<i>libconfig</i>-style configuration files from other programming languages. Some
2534*2e9d4914SAndroid Build Coastguard Workerof these libraries are wrappers which add new language bindings for
2535*2e9d4914SAndroid Build Coastguard Worker<i>libconfig</i> while others are syntax-compatible reimplementations in other
2536*2e9d4914SAndroid Build Coastguard Workerlanguages.
2537*2e9d4914SAndroid Build Coastguard Worker</p>
2538*2e9d4914SAndroid Build Coastguard Worker<p>Here is a list of some of these implementations.
2539*2e9d4914SAndroid Build Coastguard Worker</p>
2540*2e9d4914SAndroid Build Coastguard Worker<hr>
2541*2e9d4914SAndroid Build Coastguard Worker<a name="Bourne-Shell"></a>
2542*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2543*2e9d4914SAndroid Build Coastguard Worker<p>
2544*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#D" accesskey="n" rel="next">D</a>, Up: <a href="#Other-Bindings-and-Implementations" accesskey="u" rel="up">Other Bindings and Implementations</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2545*2e9d4914SAndroid Build Coastguard Worker</div>
2546*2e9d4914SAndroid Build Coastguard Worker<a name="Bourne-Shell-1"></a>
2547*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">6.1 Bourne Shell</h3>
2548*2e9d4914SAndroid Build Coastguard Worker
2549*2e9d4914SAndroid Build Coastguard Worker<p>&#321;ukasz A. Grabowski&rsquo;s <i>ls-config</i> provides a means to read and write
2550*2e9d4914SAndroid Build Coastguard Workervalues in <i>libconfig</i> configuration files from Bourne shell scripts. The
2551*2e9d4914SAndroid Build Coastguard Workerimplementation is included in the <i>libconfig</i> git repository at
2552*2e9d4914SAndroid Build Coastguard Worker<a href="https://github.com/hyperrealm/libconfig">https://github.com/hyperrealm/libconfig</a>, in the <samp>contrib/ls-config</samp>
2553*2e9d4914SAndroid Build Coastguard Workersubdirectory.
2554*2e9d4914SAndroid Build Coastguard Worker</p>
2555*2e9d4914SAndroid Build Coastguard Worker<hr>
2556*2e9d4914SAndroid Build Coastguard Worker<a name="D"></a>
2557*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2558*2e9d4914SAndroid Build Coastguard Worker<p>
2559*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Haskell" accesskey="n" rel="next">Haskell</a>, Previous: <a href="#Bourne-Shell" accesskey="p" rel="prev">Bourne Shell</a>, Up: <a href="#Other-Bindings-and-Implementations" accesskey="u" rel="up">Other Bindings and Implementations</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2560*2e9d4914SAndroid Build Coastguard Worker</div>
2561*2e9d4914SAndroid Build Coastguard Worker<a name="D-1"></a>
2562*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">6.2 D</h3>
2563*2e9d4914SAndroid Build Coastguard Worker
2564*2e9d4914SAndroid Build Coastguard Worker<p>Remi Thebault&rsquo;s <i>libconfig-d</i> is a port of <i>libconfig</i> to the D programming
2565*2e9d4914SAndroid Build Coastguard Workerlanguage. It may be found at <a href="https://code.dlang.org/packages/libconfig-d">https://code.dlang.org/packages/libconfig-d</a>.
2566*2e9d4914SAndroid Build Coastguard Worker</p>
2567*2e9d4914SAndroid Build Coastguard Worker<hr>
2568*2e9d4914SAndroid Build Coastguard Worker<a name="Haskell"></a>
2569*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2570*2e9d4914SAndroid Build Coastguard Worker<p>
2571*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Java" accesskey="n" rel="next">Java</a>, Previous: <a href="#D" accesskey="p" rel="prev">D</a>, Up: <a href="#Other-Bindings-and-Implementations" accesskey="u" rel="up">Other Bindings and Implementations</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2572*2e9d4914SAndroid Build Coastguard Worker</div>
2573*2e9d4914SAndroid Build Coastguard Worker<a name="Haskell-1"></a>
2574*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">6.3 Haskell</h3>
2575*2e9d4914SAndroid Build Coastguard Worker
2576*2e9d4914SAndroid Build Coastguard Worker<p>Matthew Peddie&rsquo;s <i>libconfig</i> provides Haskell bindings to
2577*2e9d4914SAndroid Build Coastguard Worker<i>libconfig</i>. It may be found at
2578*2e9d4914SAndroid Build Coastguard Worker<a href="https://hackage.haskell.org/package/libconfig-0.3.0.0">https://hackage.haskell.org/package/libconfig-0.3.0.0</a>.
2579*2e9d4914SAndroid Build Coastguard Worker</p>
2580*2e9d4914SAndroid Build Coastguard Worker<hr>
2581*2e9d4914SAndroid Build Coastguard Worker<a name="Java"></a>
2582*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2583*2e9d4914SAndroid Build Coastguard Worker<p>
2584*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Lisp" accesskey="n" rel="next">Lisp</a>, Previous: <a href="#Haskell" accesskey="p" rel="prev">Haskell</a>, Up: <a href="#Other-Bindings-and-Implementations" accesskey="u" rel="up">Other Bindings and Implementations</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2585*2e9d4914SAndroid Build Coastguard Worker</div>
2586*2e9d4914SAndroid Build Coastguard Worker<a name="Java-1"></a>
2587*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">6.4 Java</h3>
2588*2e9d4914SAndroid Build Coastguard Worker
2589*2e9d4914SAndroid Build Coastguard Worker<p>Andrey V. Pleskach has a pure-Java implementation of <i>libconfig</i>. It may be
2590*2e9d4914SAndroid Build Coastguard Workerfound on github at <a href="https://github.com/willyborankin/libconfig">https://github.com/willyborankin/libconfig</a>.
2591*2e9d4914SAndroid Build Coastguard Worker</p>
2592*2e9d4914SAndroid Build Coastguard Worker<hr>
2593*2e9d4914SAndroid Build Coastguard Worker<a name="Lisp"></a>
2594*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2595*2e9d4914SAndroid Build Coastguard Worker<p>
2596*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Perl" accesskey="n" rel="next">Perl</a>, Previous: <a href="#Java" accesskey="p" rel="prev">Java</a>, Up: <a href="#Other-Bindings-and-Implementations" accesskey="u" rel="up">Other Bindings and Implementations</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2597*2e9d4914SAndroid Build Coastguard Worker</div>
2598*2e9d4914SAndroid Build Coastguard Worker<a name="Lisp-1"></a>
2599*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">6.5 Lisp</h3>
2600*2e9d4914SAndroid Build Coastguard Worker
2601*2e9d4914SAndroid Build Coastguard Worker<p>Oleg Shalaev&rsquo;s <i>cl-libconfig</i> provides Common Lisp bindings for <i>libconfig</i>.
2602*2e9d4914SAndroid Build Coastguard WorkerIt may be found on github at <a href="https://github.com/chalaev/cl-libconfig">https://github.com/chalaev/cl-libconfig</a>.
2603*2e9d4914SAndroid Build Coastguard Worker</p>
2604*2e9d4914SAndroid Build Coastguard Worker<hr>
2605*2e9d4914SAndroid Build Coastguard Worker<a name="Perl"></a>
2606*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2607*2e9d4914SAndroid Build Coastguard Worker<p>
2608*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Python" accesskey="n" rel="next">Python</a>, Previous: <a href="#Lisp" accesskey="p" rel="prev">Lisp</a>, Up: <a href="#Other-Bindings-and-Implementations" accesskey="u" rel="up">Other Bindings and Implementations</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2609*2e9d4914SAndroid Build Coastguard Worker</div>
2610*2e9d4914SAndroid Build Coastguard Worker<a name="Perl-1"></a>
2611*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">6.6 Perl</h3>
2612*2e9d4914SAndroid Build Coastguard Worker
2613*2e9d4914SAndroid Build Coastguard Worker<p>The <i>Conf::Libconfig</i> module provides Perl bindings for <i>libconfig</i>. It may
2614*2e9d4914SAndroid Build Coastguard Workerbe found on CPAN at <a href="http://search.cpan.org/~cnangel/Conf-Libconfig-0.05/">http://search.cpan.org/~cnangel/Conf-Libconfig-0.05/</a>
2615*2e9d4914SAndroid Build Coastguard Workeror on github at <a href="https://github.com/cnangel/Conf-Libconfig">https://github.com/cnangel/Conf-Libconfig</a>.
2616*2e9d4914SAndroid Build Coastguard Worker</p>
2617*2e9d4914SAndroid Build Coastguard Worker<hr>
2618*2e9d4914SAndroid Build Coastguard Worker<a name="Python"></a>
2619*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2620*2e9d4914SAndroid Build Coastguard Worker<p>
2621*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Ruby" accesskey="n" rel="next">Ruby</a>, Previous: <a href="#Perl" accesskey="p" rel="prev">Perl</a>, Up: <a href="#Other-Bindings-and-Implementations" accesskey="u" rel="up">Other Bindings and Implementations</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2622*2e9d4914SAndroid Build Coastguard Worker</div>
2623*2e9d4914SAndroid Build Coastguard Worker<a name="Python-1"></a>
2624*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">6.7 Python</h3>
2625*2e9d4914SAndroid Build Coastguard Worker
2626*2e9d4914SAndroid Build Coastguard Worker<p>Heiner Tholen&rsquo;s <i>pylibconfig2</i> is a Python library that is syntax-compatible
2627*2e9d4914SAndroid Build Coastguard Workerwith <i>libconfig</i>. It may be found at
2628*2e9d4914SAndroid Build Coastguard Worker<a href="https://pypi.python.org/pypi/pylibconfig2/0.1.2">https://pypi.python.org/pypi/pylibconfig2/0.1.2</a>.
2629*2e9d4914SAndroid Build Coastguard Worker</p>
2630*2e9d4914SAndroid Build Coastguard Worker<br>
2631*2e9d4914SAndroid Build Coastguard Worker
2632*2e9d4914SAndroid Build Coastguard Worker<p>Christian Aichinger&rsquo;s <i>libconf</i> is another pure-Python implementation with a
2633*2e9d4914SAndroid Build Coastguard Workermore permissive license. It may be found at
2634*2e9d4914SAndroid Build Coastguard Worker<a href="https://pypi.python.org/pypi/libconf">https://pypi.python.org/pypi/libconf</a> or on github at
2635*2e9d4914SAndroid Build Coastguard Worker<a href="https://github.com/Grk0/python-libconf">https://github.com/Grk0/python-libconf</a>.
2636*2e9d4914SAndroid Build Coastguard Worker</p>
2637*2e9d4914SAndroid Build Coastguard Worker<br>
2638*2e9d4914SAndroid Build Coastguard Worker
2639*2e9d4914SAndroid Build Coastguard Worker<p>The <i>python-libconfig</i> wrapper provides Python bindings to <i>libconfig</i>. It
2640*2e9d4914SAndroid Build Coastguard Workermay be found on github at <a href="https://github.com/cnangel/python-libconfig/">https://github.com/cnangel/python-libconfig/</a>.
2641*2e9d4914SAndroid Build Coastguard Worker</p>
2642*2e9d4914SAndroid Build Coastguard Worker<hr>
2643*2e9d4914SAndroid Build Coastguard Worker<a name="Ruby"></a>
2644*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2645*2e9d4914SAndroid Build Coastguard Worker<p>
2646*2e9d4914SAndroid Build Coastguard WorkerPrevious: <a href="#Python" accesskey="p" rel="prev">Python</a>, Up: <a href="#Other-Bindings-and-Implementations" accesskey="u" rel="up">Other Bindings and Implementations</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2647*2e9d4914SAndroid Build Coastguard Worker</div>
2648*2e9d4914SAndroid Build Coastguard Worker<a name="Ruby-1"></a>
2649*2e9d4914SAndroid Build Coastguard Worker<h3 class="section">6.8 Ruby</h3>
2650*2e9d4914SAndroid Build Coastguard Worker
2651*2e9d4914SAndroid Build Coastguard Worker<p>Christopher Mark Gore&rsquo;s <i>ruby-libconfig</i> is a Ruby library that provides Ruby
2652*2e9d4914SAndroid Build Coastguard Workerbindings for <i>libconfig</i>. It may be found at
2653*2e9d4914SAndroid Build Coastguard Worker<a href="https://rubygems.org/gems/libconfig">https://rubygems.org/gems/libconfig</a> or on github at
2654*2e9d4914SAndroid Build Coastguard Worker<a href="https://github.com/cgore/ruby-libconfig">https://github.com/cgore/ruby-libconfig</a>.
2655*2e9d4914SAndroid Build Coastguard Worker</p>
2656*2e9d4914SAndroid Build Coastguard Worker<br>
2657*2e9d4914SAndroid Build Coastguard Worker
2658*2e9d4914SAndroid Build Coastguard Worker<p>There is also another Ruby wrapper, <i>libconfig-ruby</i>, that is included in
2659*2e9d4914SAndroid Build Coastguard Workerthe <i>libconfig</i> git repository at <a href="https://github.com/hyperrealm/libconfig">https://github.com/hyperrealm/libconfig</a>,
2660*2e9d4914SAndroid Build Coastguard Workerin the <samp>contrib/libconfig-ruby</samp> subdirectory.
2661*2e9d4914SAndroid Build Coastguard Worker</p>
2662*2e9d4914SAndroid Build Coastguard Worker<hr>
2663*2e9d4914SAndroid Build Coastguard Worker<a name="License"></a>
2664*2e9d4914SAndroid Build Coastguard Worker<div class="header">
2665*2e9d4914SAndroid Build Coastguard Worker<p>
2666*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Configuration-File-Grammar" accesskey="n" rel="next">Configuration File Grammar</a>, Previous: <a href="#Other-Bindings-and-Implementations" accesskey="p" rel="prev">Other Bindings and Implementations</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
2667*2e9d4914SAndroid Build Coastguard Worker</div>
2668*2e9d4914SAndroid Build Coastguard Worker<a name="License-1"></a>
2669*2e9d4914SAndroid Build Coastguard Worker<h2 class="appendix">Appendix A License</h2>
2670*2e9d4914SAndroid Build Coastguard Worker
2671*2e9d4914SAndroid Build Coastguard Worker
2672*2e9d4914SAndroid Build Coastguard Worker
2673*2e9d4914SAndroid Build Coastguard Worker<div align="center">GNU LESSER GENERAL PUBLIC LICENSE
2674*2e9d4914SAndroid Build Coastguard Worker</div><div align="center">Version 2.1, February 1999
2675*2e9d4914SAndroid Build Coastguard Worker</div>
2676*2e9d4914SAndroid Build Coastguard Worker<br>
2677*2e9d4914SAndroid Build Coastguard Worker
2678*2e9d4914SAndroid Build Coastguard Worker<p>Copyright &copy; 1991, 1999 Free Software Foundation, Inc.,
2679*2e9d4914SAndroid Build Coastguard Worker59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
2680*2e9d4914SAndroid Build Coastguard Worker</p>
2681*2e9d4914SAndroid Build Coastguard Worker<p>Everyone is permitted to copy and distribute verbatim copies of this
2682*2e9d4914SAndroid Build Coastguard Workerlicense document, but changing it is not allowed.
2683*2e9d4914SAndroid Build Coastguard Worker</p>
2684*2e9d4914SAndroid Build Coastguard Worker<p>[This is the first released version of the Lesser GPL.  It also counts
2685*2e9d4914SAndroid Build Coastguard Workeras the successor of the GNU Library Public License, version 2, hence the
2686*2e9d4914SAndroid Build Coastguard Workerversion number 2.1.]
2687*2e9d4914SAndroid Build Coastguard Worker</p>
2688*2e9d4914SAndroid Build Coastguard Worker<br>
2689*2e9d4914SAndroid Build Coastguard Worker<div align="center">Preamble
2690*2e9d4914SAndroid Build Coastguard Worker</div><br>
2691*2e9d4914SAndroid Build Coastguard Worker
2692*2e9d4914SAndroid Build Coastguard Worker<p>The licenses for most software are designed to take away your freedom to
2693*2e9d4914SAndroid Build Coastguard Workershare and change it.  By contrast, the GNU General Public Licenses are
2694*2e9d4914SAndroid Build Coastguard Workerintended to guarantee your freedom to share and change free software&ndash;to
2695*2e9d4914SAndroid Build Coastguard Workermake sure the software is free for all its users.
2696*2e9d4914SAndroid Build Coastguard Worker</p>
2697*2e9d4914SAndroid Build Coastguard Worker<p>This license, the Lesser General Public License, applies to some
2698*2e9d4914SAndroid Build Coastguard Workerspecially designated software packages&ndash;typically libraries&ndash;of the Free
2699*2e9d4914SAndroid Build Coastguard WorkerSoftware Foundation and other authors who decide to use it.  You can use
2700*2e9d4914SAndroid Build Coastguard Workerit too, but we suggest you first think carefully about whether this
2701*2e9d4914SAndroid Build Coastguard Workerlicense or the ordinary General Public License is the better strategy to
2702*2e9d4914SAndroid Build Coastguard Workeruse in any particular case, based on the explanations below.
2703*2e9d4914SAndroid Build Coastguard Worker</p>
2704*2e9d4914SAndroid Build Coastguard Worker<p>When we speak of free software, we are referring to freedom of use, not
2705*2e9d4914SAndroid Build Coastguard Workerprice.  Our General Public Licenses are designed to make sure that you
2706*2e9d4914SAndroid Build Coastguard Workerhave the freedom to distribute copies of free software (and charge for
2707*2e9d4914SAndroid Build Coastguard Workerthis service if you wish); that you receive source code or can get it if
2708*2e9d4914SAndroid Build Coastguard Workeryou want it; that you can change the software and use pieces of it in
2709*2e9d4914SAndroid Build Coastguard Workernew free programs; and that you are informed that you can do these
2710*2e9d4914SAndroid Build Coastguard Workerthings.
2711*2e9d4914SAndroid Build Coastguard Worker</p>
2712*2e9d4914SAndroid Build Coastguard Worker<p>To protect your rights, we need to make restrictions that forbid
2713*2e9d4914SAndroid Build Coastguard Workerdistributors to deny you these rights or to ask you to surrender these
2714*2e9d4914SAndroid Build Coastguard Workerrights.  These restrictions translate to certain responsibilities for
2715*2e9d4914SAndroid Build Coastguard Workeryou if you distribute copies of the library or if you modify it.
2716*2e9d4914SAndroid Build Coastguard Worker</p>
2717*2e9d4914SAndroid Build Coastguard Worker<p>For example, if you distribute copies of the library, whether gratis or
2718*2e9d4914SAndroid Build Coastguard Workerfor a fee, you must give the recipients all the rights that we gave you.
2719*2e9d4914SAndroid Build Coastguard WorkerYou must make sure that they, too, receive or can get the source code.
2720*2e9d4914SAndroid Build Coastguard WorkerIf you link other code with the library, you must provide complete
2721*2e9d4914SAndroid Build Coastguard Workerobject files to the recipients, so that they can relink them with the
2722*2e9d4914SAndroid Build Coastguard Workerlibrary after making changes to the library and recompiling it.  And you
2723*2e9d4914SAndroid Build Coastguard Workermust show them these terms so they know their rights.
2724*2e9d4914SAndroid Build Coastguard Worker</p>
2725*2e9d4914SAndroid Build Coastguard Worker<p>We protect your rights with a two-step method: (1) we copyright the
2726*2e9d4914SAndroid Build Coastguard Workerlibrary, and (2) we offer you this license, which gives you legal
2727*2e9d4914SAndroid Build Coastguard Workerpermission to copy, distribute and/or modify the library.
2728*2e9d4914SAndroid Build Coastguard Worker</p>
2729*2e9d4914SAndroid Build Coastguard Worker<p>To protect each distributor, we want to make it very clear that there is
2730*2e9d4914SAndroid Build Coastguard Workerno warranty for the free library.  Also, if the library is modified by
2731*2e9d4914SAndroid Build Coastguard Workersomeone else and passed on, the recipients should know that what they
2732*2e9d4914SAndroid Build Coastguard Workerhave is not the original version, so that the original author&rsquo;s
2733*2e9d4914SAndroid Build Coastguard Workerreputation will not be affected by problems that might be introduced by
2734*2e9d4914SAndroid Build Coastguard Workerothers.
2735*2e9d4914SAndroid Build Coastguard Worker</p>
2736*2e9d4914SAndroid Build Coastguard Worker<p>Finally, software patents pose a constant threat to the existence of any
2737*2e9d4914SAndroid Build Coastguard Workerfree program.  We wish to make sure that a company cannot effectively
2738*2e9d4914SAndroid Build Coastguard Workerrestrict the users of a free program by obtaining a restrictive license
2739*2e9d4914SAndroid Build Coastguard Workerfrom a patent holder.  Therefore, we insist that any patent license
2740*2e9d4914SAndroid Build Coastguard Workerobtained for a version of the library must be consistent with the full
2741*2e9d4914SAndroid Build Coastguard Workerfreedom of use specified in this license.
2742*2e9d4914SAndroid Build Coastguard Worker</p>
2743*2e9d4914SAndroid Build Coastguard Worker<p>Most GNU software, including some libraries, is covered by the ordinary
2744*2e9d4914SAndroid Build Coastguard WorkerGNU General Public License.  This license, the GNU Lesser General Public
2745*2e9d4914SAndroid Build Coastguard WorkerLicense, applies to certain designated libraries, and is quite different
2746*2e9d4914SAndroid Build Coastguard Workerfrom the ordinary General Public License.  We use this license for
2747*2e9d4914SAndroid Build Coastguard Workercertain libraries in order to permit linking those libraries into
2748*2e9d4914SAndroid Build Coastguard Workernon-free programs.
2749*2e9d4914SAndroid Build Coastguard Worker</p>
2750*2e9d4914SAndroid Build Coastguard Worker<p>When a program is linked with a library, whether statically or using a
2751*2e9d4914SAndroid Build Coastguard Workershared library, the combination of the two is legally speaking a
2752*2e9d4914SAndroid Build Coastguard Workercombined work, a derivative of the original library.  The ordinary
2753*2e9d4914SAndroid Build Coastguard WorkerGeneral Public License therefore permits such linking only if the entire
2754*2e9d4914SAndroid Build Coastguard Workercombination fits its criteria of freedom.  The Lesser General Public
2755*2e9d4914SAndroid Build Coastguard WorkerLicense permits more lax criteria for linking other code with the
2756*2e9d4914SAndroid Build Coastguard Workerlibrary.
2757*2e9d4914SAndroid Build Coastguard Worker</p>
2758*2e9d4914SAndroid Build Coastguard Worker<p>We call this license the &ldquo;Lesser&rdquo; General Public License because it does
2759*2e9d4914SAndroid Build Coastguard WorkerLess to protect the user&rsquo;s freedom than the ordinary General Public
2760*2e9d4914SAndroid Build Coastguard WorkerLicense.  It also provides other free software developers Less of an
2761*2e9d4914SAndroid Build Coastguard Workeradvantage over competing non-free programs.  These disadvantages are the
2762*2e9d4914SAndroid Build Coastguard Workerreason we use the ordinary General Public License for many libraries.
2763*2e9d4914SAndroid Build Coastguard WorkerHowever, the Lesser license provides advantages in certain special
2764*2e9d4914SAndroid Build Coastguard Workercircumstances.
2765*2e9d4914SAndroid Build Coastguard Worker</p>
2766*2e9d4914SAndroid Build Coastguard Worker<p>For example, on rare occasions, there may be a special need to encourage
2767*2e9d4914SAndroid Build Coastguard Workerthe widest possible use of a certain library, so that it becomes a
2768*2e9d4914SAndroid Build Coastguard Workerde-facto standard.  To achieve this, non-free programs must be allowed
2769*2e9d4914SAndroid Build Coastguard Workerto use the library.  A more frequent case is that a free library does
2770*2e9d4914SAndroid Build Coastguard Workerthe same job as widely used non-free libraries.  In this case, there is
2771*2e9d4914SAndroid Build Coastguard Workerlittle to gain by limiting the free library to free software only, so we
2772*2e9d4914SAndroid Build Coastguard Workeruse the Lesser General Public License.
2773*2e9d4914SAndroid Build Coastguard Worker</p>
2774*2e9d4914SAndroid Build Coastguard Worker<p>In other cases, permission to use a particular library in non-free
2775*2e9d4914SAndroid Build Coastguard Workerprograms enables a greater number of people to use a large body of free
2776*2e9d4914SAndroid Build Coastguard Workersoftware.  For example, permission to use the GNU C Library in non-free
2777*2e9d4914SAndroid Build Coastguard Workerprograms enables many more people to use the whole GNU operating system,
2778*2e9d4914SAndroid Build Coastguard Workeras well as its variant, the GNU/Linux operating system.
2779*2e9d4914SAndroid Build Coastguard Worker</p>
2780*2e9d4914SAndroid Build Coastguard Worker<p>Although the Lesser General Public License is Less protective of the
2781*2e9d4914SAndroid Build Coastguard Workerusers&rsquo; freedom, it does ensure that the user of a program that is linked
2782*2e9d4914SAndroid Build Coastguard Workerwith the Library has the freedom and the wherewithal to run that program
2783*2e9d4914SAndroid Build Coastguard Workerusing a modified version of the Library.
2784*2e9d4914SAndroid Build Coastguard Worker</p>
2785*2e9d4914SAndroid Build Coastguard Worker<p>The precise terms and conditions for copying, distribution and
2786*2e9d4914SAndroid Build Coastguard Workermodification follow.  Pay close attention to the difference between a
2787*2e9d4914SAndroid Build Coastguard Worker&ldquo;work based on the library&rdquo; and a &ldquo;work that uses the library&rdquo;.  The
2788*2e9d4914SAndroid Build Coastguard Workerformer contains code derived from the library, whereas the latter must
2789*2e9d4914SAndroid Build Coastguard Workerbe combined with the library in order to run.
2790*2e9d4914SAndroid Build Coastguard Worker</p>
2791*2e9d4914SAndroid Build Coastguard Worker
2792*2e9d4914SAndroid Build Coastguard Worker<div align="center">GNU LESSER GENERAL PUBLIC LICENSE
2793*2e9d4914SAndroid Build Coastguard Worker</div><div align="center">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2794*2e9d4914SAndroid Build Coastguard Worker</div>
2795*2e9d4914SAndroid Build Coastguard Worker<ol>
2796*2e9d4914SAndroid Build Coastguard Worker<li>
2797*2e9d4914SAndroid Build Coastguard Worker<br>
2798*2e9d4914SAndroid Build Coastguard Worker</li><li> This License Agreement applies to any software library or other program
2799*2e9d4914SAndroid Build Coastguard Workerwhich contains a notice placed by the copyright holder or other
2800*2e9d4914SAndroid Build Coastguard Workerauthorized party saying it may be distributed under the terms of this
2801*2e9d4914SAndroid Build Coastguard WorkerLesser General Public License (also called &ldquo;this License&rdquo;).  Each
2802*2e9d4914SAndroid Build Coastguard Workerlicensee is addressed as &ldquo;you&rdquo;.
2803*2e9d4914SAndroid Build Coastguard Worker
2804*2e9d4914SAndroid Build Coastguard Worker<p>A &ldquo;library&rdquo; means a collection of software functions and/or data
2805*2e9d4914SAndroid Build Coastguard Workerprepared so as to be conveniently linked with application programs
2806*2e9d4914SAndroid Build Coastguard Worker(which use some of those functions and data) to form executables.
2807*2e9d4914SAndroid Build Coastguard Worker</p>
2808*2e9d4914SAndroid Build Coastguard Worker<p>The &ldquo;Library&rdquo;, below, refers to any such software library or work which
2809*2e9d4914SAndroid Build Coastguard Workerhas been distributed under these terms.  A &ldquo;work based on the Library&rdquo;
2810*2e9d4914SAndroid Build Coastguard Workermeans either the Library or any derivative work under copyright law:
2811*2e9d4914SAndroid Build Coastguard Workerthat is to say, a work containing the Library or a portion of it, either
2812*2e9d4914SAndroid Build Coastguard Workerverbatim or with modifications and/or translated straightforwardly into
2813*2e9d4914SAndroid Build Coastguard Workeranother language.  (Hereinafter, translation is included without
2814*2e9d4914SAndroid Build Coastguard Workerlimitation in the term &ldquo;modification&rdquo;.)
2815*2e9d4914SAndroid Build Coastguard Worker</p>
2816*2e9d4914SAndroid Build Coastguard Worker<p>&ldquo;Source code&rdquo; for a work means the preferred form of the work for making
2817*2e9d4914SAndroid Build Coastguard Workermodifications to it.  For a library, complete source code means all the
2818*2e9d4914SAndroid Build Coastguard Workersource code for all modules it contains, plus any associated interface
2819*2e9d4914SAndroid Build Coastguard Workerdefinition files, plus the scripts used to control compilation and
2820*2e9d4914SAndroid Build Coastguard Workerinstallation of the library.
2821*2e9d4914SAndroid Build Coastguard Worker</p>
2822*2e9d4914SAndroid Build Coastguard Worker<p>Activities other than copying, distribution and modification are not
2823*2e9d4914SAndroid Build Coastguard Workercovered by this License; they are outside its scope.  The act of running
2824*2e9d4914SAndroid Build Coastguard Workera program using the Library is not restricted, and output from such a
2825*2e9d4914SAndroid Build Coastguard Workerprogram is covered only if its contents constitute a work based on the
2826*2e9d4914SAndroid Build Coastguard WorkerLibrary (independent of the use of the Library in a tool for writing
2827*2e9d4914SAndroid Build Coastguard Workerit).  Whether that is true depends on what the Library does and what the
2828*2e9d4914SAndroid Build Coastguard Workerprogram that uses the Library does.
2829*2e9d4914SAndroid Build Coastguard Worker</p>
2830*2e9d4914SAndroid Build Coastguard Worker<br>
2831*2e9d4914SAndroid Build Coastguard Worker</li><li> You may copy and distribute verbatim copies of the Library&rsquo;s complete
2832*2e9d4914SAndroid Build Coastguard Workersource code as you receive it, in any medium, provided that you
2833*2e9d4914SAndroid Build Coastguard Workerconspicuously and appropriately publish on each copy an appropriate
2834*2e9d4914SAndroid Build Coastguard Workercopyright notice and disclaimer of warranty; keep intact all the notices
2835*2e9d4914SAndroid Build Coastguard Workerthat refer to this License and to the absence of any warranty; and
2836*2e9d4914SAndroid Build Coastguard Workerdistribute a copy of this License along with the Library.
2837*2e9d4914SAndroid Build Coastguard Worker
2838*2e9d4914SAndroid Build Coastguard Worker<p>You may charge a fee for the physical act of transferring a copy, and
2839*2e9d4914SAndroid Build Coastguard Workeryou may at your option offer warranty protection in exchange for a fee.
2840*2e9d4914SAndroid Build Coastguard Worker</p>
2841*2e9d4914SAndroid Build Coastguard Worker<br>
2842*2e9d4914SAndroid Build Coastguard Worker</li><li> You may modify your copy or copies of the Library or any portion of it,
2843*2e9d4914SAndroid Build Coastguard Workerthus forming a work based on the Library, and copy and distribute such
2844*2e9d4914SAndroid Build Coastguard Workermodifications or work under the terms of Section 1 above, provided that
2845*2e9d4914SAndroid Build Coastguard Workeryou also meet all of these conditions:
2846*2e9d4914SAndroid Build Coastguard Worker
2847*2e9d4914SAndroid Build Coastguard Worker<ol>
2848*2e9d4914SAndroid Build Coastguard Worker<li> The modified work must itself be a software library.
2849*2e9d4914SAndroid Build Coastguard Worker
2850*2e9d4914SAndroid Build Coastguard Worker<br>
2851*2e9d4914SAndroid Build Coastguard Worker</li><li> You must cause the files modified to carry prominent notices stating
2852*2e9d4914SAndroid Build Coastguard Workerthat you changed the files and the date of any change.
2853*2e9d4914SAndroid Build Coastguard Worker
2854*2e9d4914SAndroid Build Coastguard Worker<br>
2855*2e9d4914SAndroid Build Coastguard Worker</li><li> You must cause the whole of the work to be licensed at no charge to all
2856*2e9d4914SAndroid Build Coastguard Workerthird parties under the terms of this License.
2857*2e9d4914SAndroid Build Coastguard Worker
2858*2e9d4914SAndroid Build Coastguard Worker<br>
2859*2e9d4914SAndroid Build Coastguard Worker</li><li> If a facility in the modified Library refers to a function or a table of
2860*2e9d4914SAndroid Build Coastguard Workerdata to be supplied by an application program that uses the facility,
2861*2e9d4914SAndroid Build Coastguard Workerother than as an argument passed when the facility is invoked, then you
2862*2e9d4914SAndroid Build Coastguard Workermust make a good faith effort to ensure that, in the event an
2863*2e9d4914SAndroid Build Coastguard Workerapplication does not supply such function or table, the facility still
2864*2e9d4914SAndroid Build Coastguard Workeroperates, and performs whatever part of its purpose remains meaningful.
2865*2e9d4914SAndroid Build Coastguard Worker
2866*2e9d4914SAndroid Build Coastguard Worker<p>(For example, a function in a library to compute square roots has a
2867*2e9d4914SAndroid Build Coastguard Workerpurpose that is entirely well-defined independent of the application.
2868*2e9d4914SAndroid Build Coastguard WorkerTherefore, Subsection 2d requires that any application-supplied function
2869*2e9d4914SAndroid Build Coastguard Workeror table used by this function must be optional: if the application does
2870*2e9d4914SAndroid Build Coastguard Workernot supply it, the square root function must still compute square
2871*2e9d4914SAndroid Build Coastguard Workerroots.)
2872*2e9d4914SAndroid Build Coastguard Worker</p>
2873*2e9d4914SAndroid Build Coastguard Worker</li></ol>
2874*2e9d4914SAndroid Build Coastguard Worker
2875*2e9d4914SAndroid Build Coastguard Worker<p>These requirements apply to the modified work as a whole.  If
2876*2e9d4914SAndroid Build Coastguard Workeridentifiable sections of that work are not derived from the Library, and
2877*2e9d4914SAndroid Build Coastguard Workercan be reasonably considered independent and separate works in
2878*2e9d4914SAndroid Build Coastguard Workerthemselves, then this License, and its terms, do not apply to those
2879*2e9d4914SAndroid Build Coastguard Workersections when you distribute them as separate works.  But when you
2880*2e9d4914SAndroid Build Coastguard Workerdistribute the same sections as part of a whole which is a work based on
2881*2e9d4914SAndroid Build Coastguard Workerthe Library, the distribution of the whole must be on the terms of this
2882*2e9d4914SAndroid Build Coastguard WorkerLicense, whose permissions for other licensees extend to the entire
2883*2e9d4914SAndroid Build Coastguard Workerwhole, and thus to each and every part regardless of who wrote it.
2884*2e9d4914SAndroid Build Coastguard Worker</p>
2885*2e9d4914SAndroid Build Coastguard Worker<p>Thus, it is not the intent of this section to claim rights or contest
2886*2e9d4914SAndroid Build Coastguard Workeryour rights to work written entirely by you; rather, the intent is to
2887*2e9d4914SAndroid Build Coastguard Workerexercise the right to control the distribution of derivative or
2888*2e9d4914SAndroid Build Coastguard Workercollective works based on the Library.
2889*2e9d4914SAndroid Build Coastguard Worker</p>
2890*2e9d4914SAndroid Build Coastguard Worker<p>In addition, mere aggregation of another work not based on the Library
2891*2e9d4914SAndroid Build Coastguard Workerwith the Library (or with a work based on the Library) on a volume of a
2892*2e9d4914SAndroid Build Coastguard Workerstorage or distribution medium does not bring the other work under the
2893*2e9d4914SAndroid Build Coastguard Workerscope of this License.
2894*2e9d4914SAndroid Build Coastguard Worker</p>
2895*2e9d4914SAndroid Build Coastguard Worker<br>
2896*2e9d4914SAndroid Build Coastguard Worker</li><li> You may opt to apply the terms of the ordinary GNU General Public
2897*2e9d4914SAndroid Build Coastguard WorkerLicense instead of this License to a given copy of the Library.  To do
2898*2e9d4914SAndroid Build Coastguard Workerthis, you must alter all the notices that refer to this License, so that
2899*2e9d4914SAndroid Build Coastguard Workerthey refer to the ordinary GNU General Public License, version 2,
2900*2e9d4914SAndroid Build Coastguard Workerinstead of to this License.  (If a newer version than version 2 of the
2901*2e9d4914SAndroid Build Coastguard Workerordinary GNU General Public License has appeared, then you can specify
2902*2e9d4914SAndroid Build Coastguard Workerthat version instead if you wish.)  Do not make any other change in
2903*2e9d4914SAndroid Build Coastguard Workerthese notices.
2904*2e9d4914SAndroid Build Coastguard Worker
2905*2e9d4914SAndroid Build Coastguard Worker<p>Once this change is made in a given copy, it is irreversible for that
2906*2e9d4914SAndroid Build Coastguard Workercopy, so the ordinary GNU General Public License applies to all
2907*2e9d4914SAndroid Build Coastguard Workersubsequent copies and derivative works made from that copy.
2908*2e9d4914SAndroid Build Coastguard Worker</p>
2909*2e9d4914SAndroid Build Coastguard Worker<p>This option is useful when you wish to copy part of the code of the
2910*2e9d4914SAndroid Build Coastguard WorkerLibrary into a program that is not a library.
2911*2e9d4914SAndroid Build Coastguard Worker</p>
2912*2e9d4914SAndroid Build Coastguard Worker<br>
2913*2e9d4914SAndroid Build Coastguard Worker</li><li> You may copy and distribute the Library (or a portion or derivative of
2914*2e9d4914SAndroid Build Coastguard Workerit, under Section 2) in object code or executable form under the terms
2915*2e9d4914SAndroid Build Coastguard Workerof Sections 1 and 2 above provided that you accompany it with the
2916*2e9d4914SAndroid Build Coastguard Workercomplete corresponding machine-readable source code, which must be
2917*2e9d4914SAndroid Build Coastguard Workerdistributed under the terms of Sections 1 and 2 above on a medium
2918*2e9d4914SAndroid Build Coastguard Workercustomarily used for software interchange.
2919*2e9d4914SAndroid Build Coastguard Worker
2920*2e9d4914SAndroid Build Coastguard Worker<p>If distribution of object code is made by offering access to copy from a
2921*2e9d4914SAndroid Build Coastguard Workerdesignated place, then offering equivalent access to copy the source
2922*2e9d4914SAndroid Build Coastguard Workercode from the same place satisfies the requirement to distribute the
2923*2e9d4914SAndroid Build Coastguard Workersource code, even though third parties are not compelled to copy the
2924*2e9d4914SAndroid Build Coastguard Workersource along with the object code.
2925*2e9d4914SAndroid Build Coastguard Worker</p>
2926*2e9d4914SAndroid Build Coastguard Worker<br>
2927*2e9d4914SAndroid Build Coastguard Worker</li><li> A program that contains no derivative of any portion of the Library, but
2928*2e9d4914SAndroid Build Coastguard Workeris designed to work with the Library by being compiled or linked with
2929*2e9d4914SAndroid Build Coastguard Workerit, is called a &ldquo;work that uses the Library&rdquo;.  Such a work, in
2930*2e9d4914SAndroid Build Coastguard Workerisolation, is not a derivative work of the Library, and therefore falls
2931*2e9d4914SAndroid Build Coastguard Workeroutside the scope of this License.
2932*2e9d4914SAndroid Build Coastguard Worker
2933*2e9d4914SAndroid Build Coastguard Worker<p>However, linking a &ldquo;work that uses the Library&rdquo; with the Library creates
2934*2e9d4914SAndroid Build Coastguard Workeran executable that is a derivative of the Library (because it contains
2935*2e9d4914SAndroid Build Coastguard Workerportions of the Library), rather than a &ldquo;work that uses the library&rdquo;.
2936*2e9d4914SAndroid Build Coastguard WorkerThe executable is therefore covered by this License.  Section 6 states
2937*2e9d4914SAndroid Build Coastguard Workerterms for distribution of such executables.
2938*2e9d4914SAndroid Build Coastguard Worker</p>
2939*2e9d4914SAndroid Build Coastguard Worker<p>When a &ldquo;work that uses the Library&rdquo; uses material from a header file
2940*2e9d4914SAndroid Build Coastguard Workerthat is part of the Library, the object code for the work may be a
2941*2e9d4914SAndroid Build Coastguard Workerderivative work of the Library even though the source code is not.
2942*2e9d4914SAndroid Build Coastguard WorkerWhether this is true is especially significant if the work can be linked
2943*2e9d4914SAndroid Build Coastguard Workerwithout the Library, or if the work is itself a library.  The threshold
2944*2e9d4914SAndroid Build Coastguard Workerfor this to be true is not precisely defined by law.
2945*2e9d4914SAndroid Build Coastguard Worker</p>
2946*2e9d4914SAndroid Build Coastguard Worker<p>If such an object file uses only numerical parameters, data structure
2947*2e9d4914SAndroid Build Coastguard Workerlayouts and accessors, and small macros and small inline functions (ten
2948*2e9d4914SAndroid Build Coastguard Workerlines or less in length), then the use of the object file is
2949*2e9d4914SAndroid Build Coastguard Workerunrestricted, regardless of whether it is legally a derivative work.
2950*2e9d4914SAndroid Build Coastguard Worker(Executables containing this object code plus portions of the Library
2951*2e9d4914SAndroid Build Coastguard Workerwill still fall under Section 6.)
2952*2e9d4914SAndroid Build Coastguard Worker</p>
2953*2e9d4914SAndroid Build Coastguard Worker<p>Otherwise, if the work is a derivative of the Library, you may
2954*2e9d4914SAndroid Build Coastguard Workerdistribute the object code for the work under the terms of Section 6.
2955*2e9d4914SAndroid Build Coastguard WorkerAny executables containing that work also fall under Section 6, whether
2956*2e9d4914SAndroid Build Coastguard Workeror not they are linked directly with the Library itself.
2957*2e9d4914SAndroid Build Coastguard Worker</p>
2958*2e9d4914SAndroid Build Coastguard Worker<br>
2959*2e9d4914SAndroid Build Coastguard Worker</li><li> As an exception to the Sections above, you may also combine or link a
2960*2e9d4914SAndroid Build Coastguard Worker&ldquo;work that uses the Library&rdquo; with the Library to produce a work
2961*2e9d4914SAndroid Build Coastguard Workercontaining portions of the Library, and distribute that work under terms
2962*2e9d4914SAndroid Build Coastguard Workerof your choice, provided that the terms permit modification of the work
2963*2e9d4914SAndroid Build Coastguard Workerfor the customer&rsquo;s own use and reverse engineering for debugging such
2964*2e9d4914SAndroid Build Coastguard Workermodifications.
2965*2e9d4914SAndroid Build Coastguard Worker
2966*2e9d4914SAndroid Build Coastguard Worker<p>You must give prominent notice with each copy of the work that the
2967*2e9d4914SAndroid Build Coastguard WorkerLibrary is used in it and that the Library and its use are covered by
2968*2e9d4914SAndroid Build Coastguard Workerthis License.  You must supply a copy of this License.  If the work
2969*2e9d4914SAndroid Build Coastguard Workerduring execution displays copyright notices, you must include the
2970*2e9d4914SAndroid Build Coastguard Workercopyright notice for the Library among them, as well as a reference
2971*2e9d4914SAndroid Build Coastguard Workerdirecting the user to the copy of this License.  Also, you must do one
2972*2e9d4914SAndroid Build Coastguard Workerof these things:
2973*2e9d4914SAndroid Build Coastguard Worker</p>
2974*2e9d4914SAndroid Build Coastguard Worker<ol>
2975*2e9d4914SAndroid Build Coastguard Worker<li>
2976*2e9d4914SAndroid Build Coastguard Worker<br>
2977*2e9d4914SAndroid Build Coastguard Worker</li><li> Accompany the work with the complete corresponding machine-readable
2978*2e9d4914SAndroid Build Coastguard Workersource code for the Library including whatever changes were used in the
2979*2e9d4914SAndroid Build Coastguard Workerwork (which must be distributed under Sections 1 and 2 above); and, if
2980*2e9d4914SAndroid Build Coastguard Workerthe work is an executable linked with the Library, with the complete
2981*2e9d4914SAndroid Build Coastguard Workermachine-readable &ldquo;work that uses the Library&rdquo;, as object code and/or
2982*2e9d4914SAndroid Build Coastguard Workersource code, so that the user can modify the Library and then relink to
2983*2e9d4914SAndroid Build Coastguard Workerproduce a modified executable containing the modified Library.  (It is
2984*2e9d4914SAndroid Build Coastguard Workerunderstood that the user who changes the contents of definitions files
2985*2e9d4914SAndroid Build Coastguard Workerin the Library will not necessarily be able to recompile the application
2986*2e9d4914SAndroid Build Coastguard Workerto use the modified definitions.)
2987*2e9d4914SAndroid Build Coastguard Worker
2988*2e9d4914SAndroid Build Coastguard Worker<br>
2989*2e9d4914SAndroid Build Coastguard Worker</li><li> Use a suitable shared library mechanism for linking with the Library.  A
2990*2e9d4914SAndroid Build Coastguard Workersuitable mechanism is one that (1) uses at run time a copy of the
2991*2e9d4914SAndroid Build Coastguard Workerlibrary already present on the user&rsquo;s computer system, rather than
2992*2e9d4914SAndroid Build Coastguard Workercopying library functions into the executable, and (2) will operate
2993*2e9d4914SAndroid Build Coastguard Workerproperly with a modified version of the library, if the user installs
2994*2e9d4914SAndroid Build Coastguard Workerone, as long as the modified version is interface-compatible with the
2995*2e9d4914SAndroid Build Coastguard Workerversion that the work was made with.
2996*2e9d4914SAndroid Build Coastguard Worker
2997*2e9d4914SAndroid Build Coastguard Worker<br>
2998*2e9d4914SAndroid Build Coastguard Worker</li><li> Accompany the work with a written offer, valid for at least three years,
2999*2e9d4914SAndroid Build Coastguard Workerto give the same user the materials specified in Subsection 6a, above,
3000*2e9d4914SAndroid Build Coastguard Workerfor a charge no more than the cost of performing this distribution.
3001*2e9d4914SAndroid Build Coastguard Worker
3002*2e9d4914SAndroid Build Coastguard Worker<br>
3003*2e9d4914SAndroid Build Coastguard Worker</li><li> If distribution of the work is made by offering access to copy from a
3004*2e9d4914SAndroid Build Coastguard Workerdesignated place, offer equivalent access to copy the above specified
3005*2e9d4914SAndroid Build Coastguard Workermaterials from the same place.
3006*2e9d4914SAndroid Build Coastguard Worker
3007*2e9d4914SAndroid Build Coastguard Worker<br>
3008*2e9d4914SAndroid Build Coastguard Worker</li><li> Verify that the user has already received a copy of these materials or
3009*2e9d4914SAndroid Build Coastguard Workerthat you have already sent this user a copy.
3010*2e9d4914SAndroid Build Coastguard Worker
3011*2e9d4914SAndroid Build Coastguard Worker</li></ol>
3012*2e9d4914SAndroid Build Coastguard Worker
3013*2e9d4914SAndroid Build Coastguard Worker<p>For an executable, the required form of the &ldquo;work that uses the Library&rdquo;
3014*2e9d4914SAndroid Build Coastguard Workermust include any data and utility programs needed for reproducing the
3015*2e9d4914SAndroid Build Coastguard Workerexecutable from it.  However, as a special exception, the materials to
3016*2e9d4914SAndroid Build Coastguard Workerbe distributed need not include anything that is normally distributed
3017*2e9d4914SAndroid Build Coastguard Worker(in either source or binary form) with the major components (compiler,
3018*2e9d4914SAndroid Build Coastguard Workerkernel, and so on) of the operating system on which the executable runs,
3019*2e9d4914SAndroid Build Coastguard Workerunless that component itself accompanies the executable.
3020*2e9d4914SAndroid Build Coastguard Worker</p>
3021*2e9d4914SAndroid Build Coastguard Worker<p>It may happen that this requirement contradicts the license restrictions
3022*2e9d4914SAndroid Build Coastguard Workerof other proprietary libraries that do not normally accompany the
3023*2e9d4914SAndroid Build Coastguard Workeroperating system.  Such a contradiction means you cannot use both them
3024*2e9d4914SAndroid Build Coastguard Workerand the Library together in an executable that you distribute.
3025*2e9d4914SAndroid Build Coastguard Worker</p>
3026*2e9d4914SAndroid Build Coastguard Worker<br>
3027*2e9d4914SAndroid Build Coastguard Worker</li><li> You may place library facilities that are a work based on the Library
3028*2e9d4914SAndroid Build Coastguard Workerside-by-side in a single library together with other library facilities
3029*2e9d4914SAndroid Build Coastguard Workernot covered by this License, and distribute such a combined library,
3030*2e9d4914SAndroid Build Coastguard Workerprovided that the separate distribution of the work based on the Library
3031*2e9d4914SAndroid Build Coastguard Workerand of the other library facilities is otherwise permitted, and provided
3032*2e9d4914SAndroid Build Coastguard Workerthat you do these two things:
3033*2e9d4914SAndroid Build Coastguard Worker
3034*2e9d4914SAndroid Build Coastguard Worker<ol>
3035*2e9d4914SAndroid Build Coastguard Worker<li>
3036*2e9d4914SAndroid Build Coastguard Worker<br>
3037*2e9d4914SAndroid Build Coastguard Worker</li><li> Accompany the combined library with a copy of the same work based on the
3038*2e9d4914SAndroid Build Coastguard WorkerLibrary, uncombined with any other library facilities.  This must be
3039*2e9d4914SAndroid Build Coastguard Workerdistributed under the terms of the Sections above.
3040*2e9d4914SAndroid Build Coastguard Worker
3041*2e9d4914SAndroid Build Coastguard Worker<br>
3042*2e9d4914SAndroid Build Coastguard Worker</li><li> Give prominent notice with the combined library of the fact that part of
3043*2e9d4914SAndroid Build Coastguard Workerit is a work based on the Library, and explaining where to find the
3044*2e9d4914SAndroid Build Coastguard Workeraccompanying uncombined form of the same work.
3045*2e9d4914SAndroid Build Coastguard Worker
3046*2e9d4914SAndroid Build Coastguard Worker</li></ol>
3047*2e9d4914SAndroid Build Coastguard Worker
3048*2e9d4914SAndroid Build Coastguard Worker<br>
3049*2e9d4914SAndroid Build Coastguard Worker</li><li> You may not copy, modify, sublicense, link with, or distribute the
3050*2e9d4914SAndroid Build Coastguard WorkerLibrary except as expressly provided under this License.  Any attempt
3051*2e9d4914SAndroid Build Coastguard Workerotherwise to copy, modify, sublicense, link with, or distribute the
3052*2e9d4914SAndroid Build Coastguard WorkerLibrary is void, and will automatically terminate your rights under this
3053*2e9d4914SAndroid Build Coastguard WorkerLicense.  However, parties who have received copies, or rights, from you
3054*2e9d4914SAndroid Build Coastguard Workerunder this License will not have their licenses terminated so long as
3055*2e9d4914SAndroid Build Coastguard Workersuch parties remain in full compliance.
3056*2e9d4914SAndroid Build Coastguard Worker
3057*2e9d4914SAndroid Build Coastguard Worker<br>
3058*2e9d4914SAndroid Build Coastguard Worker</li><li> You are not required to accept this License, since you have not signed
3059*2e9d4914SAndroid Build Coastguard Workerit.  However, nothing else grants you permission to modify or distribute
3060*2e9d4914SAndroid Build Coastguard Workerthe Library or its derivative works.  These actions are prohibited by
3061*2e9d4914SAndroid Build Coastguard Workerlaw if you do not accept this License.  Therefore, by modifying or
3062*2e9d4914SAndroid Build Coastguard Workerdistributing the Library (or any work based on the Library), you
3063*2e9d4914SAndroid Build Coastguard Workerindicate your acceptance of this License to do so, and all its terms and
3064*2e9d4914SAndroid Build Coastguard Workerconditions for copying, distributing or modifying the Library or works
3065*2e9d4914SAndroid Build Coastguard Workerbased on it.
3066*2e9d4914SAndroid Build Coastguard Worker
3067*2e9d4914SAndroid Build Coastguard Worker<br>
3068*2e9d4914SAndroid Build Coastguard Worker</li><li> Each time you redistribute the Library (or any work based on the
3069*2e9d4914SAndroid Build Coastguard WorkerLibrary), the recipient automatically receives a license from the
3070*2e9d4914SAndroid Build Coastguard Workeroriginal licensor to copy, distribute, link with or modify the Library
3071*2e9d4914SAndroid Build Coastguard Workersubject to these terms and conditions.  You may not impose any further
3072*2e9d4914SAndroid Build Coastguard Workerrestrictions on the recipients&rsquo; exercise of the rights granted herein.
3073*2e9d4914SAndroid Build Coastguard WorkerYou are not responsible for enforcing compliance by third parties with
3074*2e9d4914SAndroid Build Coastguard Workerthis License.
3075*2e9d4914SAndroid Build Coastguard Worker
3076*2e9d4914SAndroid Build Coastguard Worker<br>
3077*2e9d4914SAndroid Build Coastguard Worker</li><li> If, as a consequence of a court judgment or allegation of patent
3078*2e9d4914SAndroid Build Coastguard Workerinfringement or for any other reason (not limited to patent issues),
3079*2e9d4914SAndroid Build Coastguard Workerconditions are imposed on you (whether by court order, agreement or
3080*2e9d4914SAndroid Build Coastguard Workerotherwise) that contradict the conditions of this License, they do not
3081*2e9d4914SAndroid Build Coastguard Workerexcuse you from the conditions of this License.  If you cannot
3082*2e9d4914SAndroid Build Coastguard Workerdistribute so as to satisfy simultaneously your obligations under this
3083*2e9d4914SAndroid Build Coastguard WorkerLicense and any other pertinent obligations, then as a consequence you
3084*2e9d4914SAndroid Build Coastguard Workermay not distribute the Library at all.  For example, if a patent license
3085*2e9d4914SAndroid Build Coastguard Workerwould not permit royalty-free redistribution of the Library by all those
3086*2e9d4914SAndroid Build Coastguard Workerwho receive copies directly or indirectly through you, then the only way
3087*2e9d4914SAndroid Build Coastguard Workeryou could satisfy both it and this License would be to refrain entirely
3088*2e9d4914SAndroid Build Coastguard Workerfrom distribution of the Library.
3089*2e9d4914SAndroid Build Coastguard Worker
3090*2e9d4914SAndroid Build Coastguard Worker<p>If any portion of this section is held invalid or unenforceable under
3091*2e9d4914SAndroid Build Coastguard Workerany particular circumstance, the balance of the section is intended to
3092*2e9d4914SAndroid Build Coastguard Workerapply, and the section as a whole is intended to apply in other
3093*2e9d4914SAndroid Build Coastguard Workercircumstances.
3094*2e9d4914SAndroid Build Coastguard Worker</p>
3095*2e9d4914SAndroid Build Coastguard Worker<p>It is not the purpose of this section to induce you to infringe any
3096*2e9d4914SAndroid Build Coastguard Workerpatents or other property right claims or to contest validity of any
3097*2e9d4914SAndroid Build Coastguard Workersuch claims; this section has the sole purpose of protecting the
3098*2e9d4914SAndroid Build Coastguard Workerintegrity of the free software distribution system which is implemented
3099*2e9d4914SAndroid Build Coastguard Workerby public license practices.  Many people have made generous
3100*2e9d4914SAndroid Build Coastguard Workercontributions to the wide range of software distributed through that
3101*2e9d4914SAndroid Build Coastguard Workersystem in reliance on consistent application of that system; it is up to
3102*2e9d4914SAndroid Build Coastguard Workerthe author/donor to decide if he or she is willing to distribute
3103*2e9d4914SAndroid Build Coastguard Workersoftware through any other system and a licensee cannot impose that
3104*2e9d4914SAndroid Build Coastguard Workerchoice.
3105*2e9d4914SAndroid Build Coastguard Worker</p>
3106*2e9d4914SAndroid Build Coastguard Worker<p>This section is intended to make thoroughly clear what is believed to be
3107*2e9d4914SAndroid Build Coastguard Workera consequence of the rest of this License.
3108*2e9d4914SAndroid Build Coastguard Worker</p>
3109*2e9d4914SAndroid Build Coastguard Worker<br>
3110*2e9d4914SAndroid Build Coastguard Worker</li><li> If the distribution and/or use of the Library is restricted in certain
3111*2e9d4914SAndroid Build Coastguard Workercountries either by patents or by copyrighted interfaces, the original
3112*2e9d4914SAndroid Build Coastguard Workercopyright holder who places the Library under this License may add an
3113*2e9d4914SAndroid Build Coastguard Workerexplicit geographical distribution limitation excluding those countries,
3114*2e9d4914SAndroid Build Coastguard Workerso that distribution is permitted only in or among countries not thus
3115*2e9d4914SAndroid Build Coastguard Workerexcluded.  In such case, this License incorporates the limitation as if
3116*2e9d4914SAndroid Build Coastguard Workerwritten in the body of this License.
3117*2e9d4914SAndroid Build Coastguard Worker
3118*2e9d4914SAndroid Build Coastguard Worker<br>
3119*2e9d4914SAndroid Build Coastguard Worker</li><li> The Free Software Foundation may publish revised and/or new versions of
3120*2e9d4914SAndroid Build Coastguard Workerthe Lesser General Public License from time to time.  Such new versions
3121*2e9d4914SAndroid Build Coastguard Workerwill be similar in spirit to the present version, but may differ in
3122*2e9d4914SAndroid Build Coastguard Workerdetail to address new problems or concerns.
3123*2e9d4914SAndroid Build Coastguard Worker
3124*2e9d4914SAndroid Build Coastguard Worker<p>Each version is given a distinguishing version number.  If the Library
3125*2e9d4914SAndroid Build Coastguard Workerspecifies a version number of this License which applies to it and &ldquo;any
3126*2e9d4914SAndroid Build Coastguard Workerlater version&rdquo;, you have the option of following the terms and
3127*2e9d4914SAndroid Build Coastguard Workerconditions either of that version or of any later version published by
3128*2e9d4914SAndroid Build Coastguard Workerthe Free Software Foundation.  If the Library does not specify a license
3129*2e9d4914SAndroid Build Coastguard Workerversion number, you may choose any version ever published by the Free
3130*2e9d4914SAndroid Build Coastguard WorkerSoftware Foundation.
3131*2e9d4914SAndroid Build Coastguard Worker</p>
3132*2e9d4914SAndroid Build Coastguard Worker<br>
3133*2e9d4914SAndroid Build Coastguard Worker</li><li> If you wish to incorporate parts of the Library into other free programs
3134*2e9d4914SAndroid Build Coastguard Workerwhose distribution conditions are incompatible with these, write to the
3135*2e9d4914SAndroid Build Coastguard Workerauthor to ask for permission.  For software which is copyrighted by the
3136*2e9d4914SAndroid Build Coastguard WorkerFree Software Foundation, write to the Free Software Foundation; we
3137*2e9d4914SAndroid Build Coastguard Workersometimes make exceptions for this.  Our decision will be guided by the
3138*2e9d4914SAndroid Build Coastguard Workertwo goals of preserving the free status of all derivatives of our free
3139*2e9d4914SAndroid Build Coastguard Workersoftware and of promoting the sharing and reuse of software generally.
3140*2e9d4914SAndroid Build Coastguard Worker
3141*2e9d4914SAndroid Build Coastguard Worker<br>
3142*2e9d4914SAndroid Build Coastguard Worker<div align="center">NO WARRANTY
3143*2e9d4914SAndroid Build Coastguard Worker</div><br>
3144*2e9d4914SAndroid Build Coastguard Worker
3145*2e9d4914SAndroid Build Coastguard Worker</li><li> BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
3146*2e9d4914SAndroid Build Coastguard WorkerTHE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
3147*2e9d4914SAndroid Build Coastguard WorkerOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
3148*2e9d4914SAndroid Build Coastguard WorkerPROVIDE THE LIBRARY &ldquo;AS IS&rdquo; WITHOUT WARRANTY OF ANY KIND, EITHER
3149*2e9d4914SAndroid Build Coastguard WorkerEXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3150*2e9d4914SAndroid Build Coastguard WorkerWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE
3151*2e9d4914SAndroid Build Coastguard WorkerENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH
3152*2e9d4914SAndroid Build Coastguard WorkerYOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
3153*2e9d4914SAndroid Build Coastguard WorkerNECESSARY SERVICING, REPAIR OR CORRECTION.
3154*2e9d4914SAndroid Build Coastguard Worker
3155*2e9d4914SAndroid Build Coastguard Worker<br>
3156*2e9d4914SAndroid Build Coastguard Worker</li><li> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
3157*2e9d4914SAndroid Build Coastguard WorkerWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
3158*2e9d4914SAndroid Build Coastguard WorkerREDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
3159*2e9d4914SAndroid Build Coastguard WorkerDAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
3160*2e9d4914SAndroid Build Coastguard WorkerDAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY
3161*2e9d4914SAndroid Build Coastguard Worker(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
3162*2e9d4914SAndroid Build Coastguard WorkerINACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
3163*2e9d4914SAndroid Build Coastguard WorkerTHE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR
3164*2e9d4914SAndroid Build Coastguard WorkerOTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
3165*2e9d4914SAndroid Build Coastguard Worker
3166*2e9d4914SAndroid Build Coastguard Worker</li></ol>
3167*2e9d4914SAndroid Build Coastguard Worker
3168*2e9d4914SAndroid Build Coastguard Worker<br>
3169*2e9d4914SAndroid Build Coastguard Worker<div align="center">END OF TERMS AND CONDITIONS
3170*2e9d4914SAndroid Build Coastguard Worker</div><br>
3171*2e9d4914SAndroid Build Coastguard Worker<div align="center">How to Apply These Terms to Your New Libraries
3172*2e9d4914SAndroid Build Coastguard Worker</div>
3173*2e9d4914SAndroid Build Coastguard Worker<p>If you develop a new library, and you want it to be of the greatest
3174*2e9d4914SAndroid Build Coastguard Workerpossible use to the public, we recommend making it free software that
3175*2e9d4914SAndroid Build Coastguard Workereveryone can redistribute and change.  You can do so by permitting
3176*2e9d4914SAndroid Build Coastguard Workerredistribution under these terms (or, alternatively, under the terms of
3177*2e9d4914SAndroid Build Coastguard Workerthe ordinary General Public License).
3178*2e9d4914SAndroid Build Coastguard Worker</p>
3179*2e9d4914SAndroid Build Coastguard Worker<p>To apply these terms, attach the following notices to the library.  It
3180*2e9d4914SAndroid Build Coastguard Workeris safest to attach them to the start of each source file to most
3181*2e9d4914SAndroid Build Coastguard Workereffectively convey the exclusion of warranty; and each file should have
3182*2e9d4914SAndroid Build Coastguard Workerat least the &ldquo;copyright&rdquo; line and a pointer to where the full notice is
3183*2e9d4914SAndroid Build Coastguard Workerfound.
3184*2e9d4914SAndroid Build Coastguard Worker</p>
3185*2e9d4914SAndroid Build Coastguard Worker<div class="format">
3186*2e9d4914SAndroid Build Coastguard Worker<pre class="format"><tt>
3187*2e9d4914SAndroid Build Coastguard Worker&lt;one line to give the library's name and a brief idea of what it does.&gt;
3188*2e9d4914SAndroid Build Coastguard WorkerCopyright (C) &lt;year&gt;  &lt;name of author&gt;
3189*2e9d4914SAndroid Build Coastguard Worker
3190*2e9d4914SAndroid Build Coastguard WorkerThis library is free software; you can redistribute it and/or
3191*2e9d4914SAndroid Build Coastguard Workermodify it under the terms of the GNU Lesser General Public
3192*2e9d4914SAndroid Build Coastguard WorkerLicense as published by the Free Software Foundation; either
3193*2e9d4914SAndroid Build Coastguard Workerversion 2 of the License, or (at your option) any later version.
3194*2e9d4914SAndroid Build Coastguard Worker
3195*2e9d4914SAndroid Build Coastguard WorkerThis library is distributed in the hope that it will be useful,
3196*2e9d4914SAndroid Build Coastguard Workerbut WITHOUT ANY WARRANTY; without even the implied warranty of
3197*2e9d4914SAndroid Build Coastguard WorkerMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3198*2e9d4914SAndroid Build Coastguard WorkerLesser General Public License for more details.
3199*2e9d4914SAndroid Build Coastguard Worker
3200*2e9d4914SAndroid Build Coastguard WorkerYou should have received a copy of the GNU Lesser General Public
3201*2e9d4914SAndroid Build Coastguard WorkerLicense along with this library; if not, write to the Free Software
3202*2e9d4914SAndroid Build Coastguard WorkerFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
3203*2e9d4914SAndroid Build Coastguard Worker</tt>
3204*2e9d4914SAndroid Build Coastguard Worker</pre></div>
3205*2e9d4914SAndroid Build Coastguard Worker
3206*2e9d4914SAndroid Build Coastguard Worker<p>Also add information on how to contact you by electronic and paper mail.
3207*2e9d4914SAndroid Build Coastguard Worker</p>
3208*2e9d4914SAndroid Build Coastguard Worker<p>You should also get your employer (if you work as a programmer) or your
3209*2e9d4914SAndroid Build Coastguard Workerschool, if any, to sign a &ldquo;copyright disclaimer&rdquo; for the library, if
3210*2e9d4914SAndroid Build Coastguard Workernecessary.  Here is a sample; alter the names:
3211*2e9d4914SAndroid Build Coastguard Worker</p>
3212*2e9d4914SAndroid Build Coastguard Worker<div class="format">
3213*2e9d4914SAndroid Build Coastguard Worker<pre class="format"><tt>
3214*2e9d4914SAndroid Build Coastguard WorkerYoyodyne, Inc., hereby disclaims all copyright interest in the
3215*2e9d4914SAndroid Build Coastguard Workerlibrary `Frob' (a library for tweaking knobs) written by James Random Hacker.
3216*2e9d4914SAndroid Build Coastguard Worker
3217*2e9d4914SAndroid Build Coastguard Worker&lt;signature of Ty Coon&gt;, 1 April 1990
3218*2e9d4914SAndroid Build Coastguard WorkerTy Coon, President of Vice
3219*2e9d4914SAndroid Build Coastguard Worker</tt>
3220*2e9d4914SAndroid Build Coastguard Worker</pre></div>
3221*2e9d4914SAndroid Build Coastguard Worker
3222*2e9d4914SAndroid Build Coastguard Worker<p>That&rsquo;s all there is to it!
3223*2e9d4914SAndroid Build Coastguard Worker</p>
3224*2e9d4914SAndroid Build Coastguard Worker
3225*2e9d4914SAndroid Build Coastguard Worker<hr>
3226*2e9d4914SAndroid Build Coastguard Worker<a name="Configuration-File-Grammar"></a>
3227*2e9d4914SAndroid Build Coastguard Worker<div class="header">
3228*2e9d4914SAndroid Build Coastguard Worker<p>
3229*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Function-Index" accesskey="n" rel="next">Function Index</a>, Previous: <a href="#License" accesskey="p" rel="prev">License</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
3230*2e9d4914SAndroid Build Coastguard Worker</div>
3231*2e9d4914SAndroid Build Coastguard Worker<a name="Configuration-File-Grammar-1"></a>
3232*2e9d4914SAndroid Build Coastguard Worker<h2 class="appendix">Appendix B Configuration File Grammar</h2>
3233*2e9d4914SAndroid Build Coastguard Worker
3234*2e9d4914SAndroid Build Coastguard Worker<p>Below is the BNF grammar for configuration files. Comments and include
3235*2e9d4914SAndroid Build Coastguard Workerdirectives are not part of the grammar, so they are not included here.
3236*2e9d4914SAndroid Build Coastguard Worker</p>
3237*2e9d4914SAndroid Build Coastguard Worker<br>
3238*2e9d4914SAndroid Build Coastguard Worker<div class="example">
3239*2e9d4914SAndroid Build Coastguard Worker<pre class="example">&lt;configuration&gt; ::=
3240*2e9d4914SAndroid Build Coastguard Worker      &lt;setting-list&gt;
3241*2e9d4914SAndroid Build Coastguard Worker    | &lt;empty&gt;
3242*2e9d4914SAndroid Build Coastguard Worker
3243*2e9d4914SAndroid Build Coastguard Worker&lt;setting-list&gt; ::=
3244*2e9d4914SAndroid Build Coastguard Worker      &lt;setting&gt;
3245*2e9d4914SAndroid Build Coastguard Worker    | &lt;setting-list&gt; &lt;setting&gt;
3246*2e9d4914SAndroid Build Coastguard Worker
3247*2e9d4914SAndroid Build Coastguard Worker&lt;setting&gt; ::=
3248*2e9d4914SAndroid Build Coastguard Worker      &lt;name&gt; ( &quot;:&quot; | &quot;=&quot; ) &lt;value&gt; ( &quot;;&quot; | &quot;,&quot; | &lt;empty&gt; )
3249*2e9d4914SAndroid Build Coastguard Worker
3250*2e9d4914SAndroid Build Coastguard Worker&lt;value&gt; ::=
3251*2e9d4914SAndroid Build Coastguard Worker      &lt;scalar-value&gt;
3252*2e9d4914SAndroid Build Coastguard Worker    | &lt;array&gt;
3253*2e9d4914SAndroid Build Coastguard Worker    | &lt;list&gt;
3254*2e9d4914SAndroid Build Coastguard Worker    | &lt;group&gt;
3255*2e9d4914SAndroid Build Coastguard Worker
3256*2e9d4914SAndroid Build Coastguard Worker&lt;value-list&gt; ::=
3257*2e9d4914SAndroid Build Coastguard Worker      &lt;value&gt;
3258*2e9d4914SAndroid Build Coastguard Worker    | &lt;value-list&gt; &quot;,&quot; &lt;value&gt;
3259*2e9d4914SAndroid Build Coastguard Worker    | &lt;value-list&gt; &quot;,&quot;
3260*2e9d4914SAndroid Build Coastguard Worker
3261*2e9d4914SAndroid Build Coastguard Worker&lt;scalar-value&gt; ::=
3262*2e9d4914SAndroid Build Coastguard Worker      &lt;boolean&gt;
3263*2e9d4914SAndroid Build Coastguard Worker    | &lt;integer&gt;
3264*2e9d4914SAndroid Build Coastguard Worker    | &lt;integer64&gt;
3265*2e9d4914SAndroid Build Coastguard Worker    | &lt;hex&gt;
3266*2e9d4914SAndroid Build Coastguard Worker    | &lt;hex64&gt;
3267*2e9d4914SAndroid Build Coastguard Worker    | &lt;float&gt;
3268*2e9d4914SAndroid Build Coastguard Worker    | &lt;string&gt;
3269*2e9d4914SAndroid Build Coastguard Worker
3270*2e9d4914SAndroid Build Coastguard Worker&lt;scalar-value-list&gt; ::=
3271*2e9d4914SAndroid Build Coastguard Worker      &lt;scalar-value&gt;
3272*2e9d4914SAndroid Build Coastguard Worker    | &lt;scalar-value-list&gt; &quot;,&quot; &lt;scalar-value&gt;
3273*2e9d4914SAndroid Build Coastguard Worker    | &lt;scalar-value-list&gt; &quot;,&quot;
3274*2e9d4914SAndroid Build Coastguard Worker
3275*2e9d4914SAndroid Build Coastguard Worker&lt;array&gt; ::=
3276*2e9d4914SAndroid Build Coastguard Worker      &quot;[&quot; ( &lt;scalar-value-list&gt; | &lt;empty&gt; ) &quot;]&quot;
3277*2e9d4914SAndroid Build Coastguard Worker
3278*2e9d4914SAndroid Build Coastguard Worker&lt;list&gt; ::=
3279*2e9d4914SAndroid Build Coastguard Worker      &quot;(&quot; ( &lt;value-list&gt; | &lt;empty&gt; ) &quot;)&quot;
3280*2e9d4914SAndroid Build Coastguard Worker
3281*2e9d4914SAndroid Build Coastguard Worker&lt;group&gt; ::=
3282*2e9d4914SAndroid Build Coastguard Worker      &quot;{&quot; ( &lt;setting-list&gt; | &lt;empty&gt; ) &quot;}&quot;
3283*2e9d4914SAndroid Build Coastguard Worker
3284*2e9d4914SAndroid Build Coastguard Worker&lt;empty&gt; ::=
3285*2e9d4914SAndroid Build Coastguard Worker</pre></div>
3286*2e9d4914SAndroid Build Coastguard Worker
3287*2e9d4914SAndroid Build Coastguard Worker<br>
3288*2e9d4914SAndroid Build Coastguard Worker<br>
3289*2e9d4914SAndroid Build Coastguard Worker<p>Terminals are defined below as regular expressions:
3290*2e9d4914SAndroid Build Coastguard Worker</p><br>
3291*2e9d4914SAndroid Build Coastguard Worker
3292*2e9d4914SAndroid Build Coastguard Worker<table>
3293*2e9d4914SAndroid Build Coastguard Worker<tr><td width="20%"><code>&lt;boolean&gt;</code></td><td width="80%"><code>([Tt][Rr][Uu][Ee])|([Ff][Aa][Ll][Ss][Ee])</code></td></tr>
3294*2e9d4914SAndroid Build Coastguard Worker<tr><td width="20%"><code>&lt;string&gt;</code></td><td width="80%"><code>\&quot;([^\&quot;\\]|\\.)*\&quot;</code></td></tr>
3295*2e9d4914SAndroid Build Coastguard Worker<tr><td width="20%"><code>&lt;name&gt;</code></td><td width="80%"><code>[A-Za-z\*][-A-Za-z0-9_\*]*</code></td></tr>
3296*2e9d4914SAndroid Build Coastguard Worker<tr><td width="20%"><code>&lt;integer&gt;</code></td><td width="80%"><code>[-+]?[0-9]+</code></td></tr>
3297*2e9d4914SAndroid Build Coastguard Worker<tr><td width="20%"><code>&lt;integer64&gt;</code></td><td width="80%"><code>[-+]?[0-9]+L(L)?</code></td></tr>
3298*2e9d4914SAndroid Build Coastguard Worker<tr><td width="20%"><code>&lt;hex&gt;</code></td><td width="80%"><code>0[Xx][0-9A-Fa-f]+</code></td></tr>
3299*2e9d4914SAndroid Build Coastguard Worker<tr><td width="20%"><code>&lt;hex64&gt;</code></td><td width="80%"><code>0[Xx][0-9A-Fa-f]+(L(L)?)?</code></td></tr>
3300*2e9d4914SAndroid Build Coastguard Worker<tr><td width="20%"><code>&lt;float&gt;</code></td><td width="80%"><code>([-+]?([0-9]*)?\.[0-9]*([eE][-+]?[0-9]+)?)|([-+]([0-9]+)(\.[0-9]*)?[eE][-+]?[0-9]+)</code></td></tr>
3301*2e9d4914SAndroid Build Coastguard Worker</table>
3302*2e9d4914SAndroid Build Coastguard Worker
3303*2e9d4914SAndroid Build Coastguard Worker<br>
3304*2e9d4914SAndroid Build Coastguard Worker
3305*2e9d4914SAndroid Build Coastguard Worker<p>Note that adjacent strings are automatically concatenated. Non-printable
3306*2e9d4914SAndroid Build Coastguard Workercharacters can be represented within strings using a sequence &lsquo;<samp>\xx</samp>&rsquo;,
3307*2e9d4914SAndroid Build Coastguard Workerrepresenting the ASCII value as two hex digits.
3308*2e9d4914SAndroid Build Coastguard Worker</p>
3309*2e9d4914SAndroid Build Coastguard Worker<hr>
3310*2e9d4914SAndroid Build Coastguard Worker<a name="Function-Index"></a>
3311*2e9d4914SAndroid Build Coastguard Worker<div class="header">
3312*2e9d4914SAndroid Build Coastguard Worker<p>
3313*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Type-Index" accesskey="n" rel="next">Type Index</a>, Previous: <a href="#Configuration-File-Grammar" accesskey="p" rel="prev">Configuration File Grammar</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
3314*2e9d4914SAndroid Build Coastguard Worker</div>
3315*2e9d4914SAndroid Build Coastguard Worker<a name="Function-Index-1"></a>
3316*2e9d4914SAndroid Build Coastguard Worker<h2 class="unnumbered">Function Index</h2>
3317*2e9d4914SAndroid Build Coastguard Worker
3318*2e9d4914SAndroid Build Coastguard Worker<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Function-Index_fn_symbol-1"><b>~</b></a>
3319*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3320*2e9d4914SAndroid Build Coastguard Worker<br>
3321*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-A"><b>A</b></a>
3322*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3323*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-B"><b>B</b></a>
3324*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3325*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-C"><b>C</b></a>
3326*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3327*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-E"><b>E</b></a>
3328*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3329*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-F"><b>F</b></a>
3330*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3331*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-G"><b>G</b></a>
3332*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3333*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-I"><b>I</b></a>
3334*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3335*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-L"><b>L</b></a>
3336*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3337*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-O"><b>O</b></a>
3338*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3339*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-P"><b>P</b></a>
3340*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3341*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-R"><b>R</b></a>
3342*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3343*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-S"><b>S</b></a>
3344*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3345*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-W"><b>W</b></a>
3346*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3347*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
3348*2e9d4914SAndroid Build Coastguard Worker<table class="index-fn" border="0">
3349*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
3350*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3351*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_symbol-1">~</a></th><td></td><td></td></tr>
3352*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-_007eConfig-on-Config"><code>~Config on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3353*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3354*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-A">A</a></th><td></td><td></td></tr>
3355*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-add-on-Setting"><code>add on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3356*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-add-on-Setting-1"><code>add on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3357*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-add-on-Setting-2"><code>add on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3358*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3359*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-B">B</a></th><td></td><td></td></tr>
3360*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-begin-on-Setting"><code>begin on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3361*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-begin-on-Setting-1"><code>begin on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3362*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3363*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-C">C</a></th><td></td><td></td></tr>
3364*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-clear-on-Config"><code>clear on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3365*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-Config-on-Config"><code>Config on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3366*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fclear"><code>config_clear</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3367*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fdestroy"><code>config_destroy</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3368*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005ferror_005ffile"><code>config_error_file</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3369*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005ferror_005fline"><code>config_error_line</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3370*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005ferror_005ftext"><code>config_error_text</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3371*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005ferror_005ftype"><code>config_error_type</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3372*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fget_005fauto_005fconvert"><code>config_get_auto_convert</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3373*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fget_005fdefault_005fformat"><code>config_get_default_format</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3374*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fget_005ffloat_005fprecision_0028config_005ft-_002aconfig_0029"><code>config_get_float_precision(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->)</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3375*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fget_005fhook"><code>config_get_hook</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3376*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fget_005finclude_005fdir"><code>config_get_include_dir</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3377*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fget_005foption"><code>config_get_option</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3378*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fget_005foptions"><code>config_get_options</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3379*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fget_005ftab_005fwidth"><code>config_get_tab_width</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3380*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005finit"><code>config_init</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3381*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005flookup"><code>config_lookup</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3382*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005flookup_005fbool"><code>config_lookup_bool</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3383*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005flookup_005ffloat"><code>config_lookup_float</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3384*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005flookup_005fint"><code>config_lookup_int</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3385*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005flookup_005fint64"><code>config_lookup_int64</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3386*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005flookup_005fstring"><code>config_lookup_string</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3387*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fread"><code>config_read</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3388*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fread_005ffile"><code>config_read_file</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3389*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fread_005fstring"><code>config_read_string</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3390*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005froot_005fsetting"><code>config_root_setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3391*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fadd"><code>config_setting_add</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3392*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fbool"><code>config_setting_get_bool</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3393*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fbool_005felem"><code>config_setting_get_bool_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3394*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005felem"><code>config_setting_get_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3395*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005ffloat"><code>config_setting_get_float</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3396*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005ffloat_005felem"><code>config_setting_get_float_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3397*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fformat"><code>config_setting_get_format</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3398*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fhook"><code>config_setting_get_hook</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3399*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fint"><code>config_setting_get_int</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3400*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fint64"><code>config_setting_get_int64</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3401*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fint64_005felem"><code>config_setting_get_int64_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3402*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fint_005felem"><code>config_setting_get_int_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3403*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fmember"><code>config_setting_get_member</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3404*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fstring"><code>config_setting_get_string</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3405*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fget_005fstring_005felem"><code>config_setting_get_string_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3406*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005findex"><code>config_setting_index</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3407*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fis_005faggregate"><code>config_setting_is_aggregate</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3408*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fis_005farray"><code>config_setting_is_array</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3409*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fis_005fgroup"><code>config_setting_is_group</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3410*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fis_005flist"><code>config_setting_is_list</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3411*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fis_005fnumber"><code>config_setting_is_number</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3412*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fis_005froot"><code>config_setting_is_root</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3413*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fis_005fscalar"><code>config_setting_is_scalar</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3414*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005flength"><code>config_setting_length</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3415*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005flookup"><code>config_setting_lookup</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3416*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005flookup_005fbool"><code>config_setting_lookup_bool</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3417*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005flookup_005ffloat"><code>config_setting_lookup_float</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3418*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005flookup_005fint"><code>config_setting_lookup_int</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3419*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005flookup_005fint64"><code>config_setting_lookup_int64</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3420*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005flookup_005fstring"><code>config_setting_lookup_string</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3421*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fname"><code>config_setting_name</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3422*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fparent"><code>config_setting_parent</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3423*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fremove"><code>config_setting_remove</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3424*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fremove_005felem"><code>config_setting_remove_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3425*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fbool"><code>config_setting_set_bool</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3426*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fbool_005felem"><code>config_setting_set_bool_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3427*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005ffloat"><code>config_setting_set_float</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3428*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005ffloat_005felem"><code>config_setting_set_float_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3429*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fformat"><code>config_setting_set_format</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3430*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fhook"><code>config_setting_set_hook</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3431*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fint"><code>config_setting_set_int</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3432*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fint64"><code>config_setting_set_int64</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3433*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fint64_005felem"><code>config_setting_set_int64_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3434*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fint_005felem"><code>config_setting_set_int_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3435*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fstring"><code>config_setting_set_string</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3436*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fset_005fstring_005felem"><code>config_setting_set_string_elem</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3437*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fsource_005ffile"><code>config_setting_source_file</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3438*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005fsource_005fline"><code>config_setting_source_line</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3439*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005ftype"><code>config_setting_type</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3440*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005fauto_005fconvert"><code>config_set_auto_convert</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3441*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005fdefault_005fformat"><code>config_set_default_format</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3442*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005fdestructor"><code>config_set_destructor</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3443*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005ffloat_005fprecision_0028config_005ft-_002aconfig_002c"><code>config_set_float_precision(<span class="nolinebreak">config_t</span>&nbsp;*<var>config</var><!-- /@w -->,</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3444*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005fhook"><code>config_set_hook</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3445*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005finclude_005fdir"><code>config_set_include_dir</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3446*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005finclude_005ffunc"><code>config_set_include_func</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3447*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005foption"><code>config_set_option</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3448*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005foptions"><code>config_set_options</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3449*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fset_005ftab_005fwidth"><code>config_set_tab_width</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3450*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fwrite"><code>config_write</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3451*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fwrite_005ffile"><code>config_write_file</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3452*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-c_005fstr-on-Setting"><code>c_str on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3453*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3454*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-E">E</a></th><td></td><td></td></tr>
3455*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-end-on-Setting"><code>end on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3456*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-end-on-Setting-1"><code>end on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3457*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-evaluateIncludePath-on-Config"><code>evaluateIncludePath on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3458*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-exists-on-Config"><code>exists on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3459*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-exists-on-Config-1"><code>exists on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3460*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-exists-on-Setting"><code>exists on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3461*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-exists-on-Setting-1"><code>exists on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3462*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3463*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-F">F</a></th><td></td><td></td></tr>
3464*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-func"><code>func</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3465*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3466*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-G">G</a></th><td></td><td></td></tr>
3467*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getAutoConvert-on-Config"><code>getAutoConvert on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3468*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getDefaultFormat-on-Config"><code>getDefaultFormat on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3469*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getError-on-ParseException"><code>getError on ParseException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3470*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getFile-on-ParseException"><code>getFile on ParseException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3471*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getFloatPrecision-on-Config"><code>getFloatPrecision on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3472*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getFormat-on-Setting"><code>getFormat on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3473*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getIncludeDir-on-Config"><code>getIncludeDir on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3474*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getIndex-on-Setting"><code>getIndex on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3475*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getLength-on-Setting"><code>getLength on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3476*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getLine-on-ParseException"><code>getLine on ParseException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3477*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getName-on-Setting"><code>getName on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3478*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getOption-on-Config"><code>getOption on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3479*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getOptions-on-Config"><code>getOptions on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3480*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getParent-on-Setting"><code>getParent on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3481*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getPath-on-Setting"><code>getPath on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3482*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getPath-on-SettingException"><code>getPath on SettingException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3483*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getRoot-on-Config"><code>getRoot on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3484*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getSourceFile-on-Setting"><code>getSourceFile on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3485*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getSourceLine-on-Setting"><code>getSourceLine on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3486*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getTabWidth-on-Config"><code>getTabWidth on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3487*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-getType-on-Setting"><code>getType on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3488*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3489*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-I">I</a></th><td></td><td></td></tr>
3490*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-isAggregate-on-Setting"><code>isAggregate on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3491*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-isArray-on-Setting"><code>isArray on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3492*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-isGroup-on-Setting"><code>isGroup on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3493*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-isList-on-Setting"><code>isList on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3494*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-isNumber-on-Setting"><code>isNumber on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3495*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-isRoot-on-Setting"><code>isRoot on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3496*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-isScalar-on-Setting"><code>isScalar on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3497*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3498*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-L">L</a></th><td></td><td></td></tr>
3499*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-LIBCONFIGXX_005fVER_005fMAJOR"><code>LIBCONFIGXX_VER_MAJOR</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Version-Test-Macros">Version Test Macros</a></td></tr>
3500*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-LIBCONFIGXX_005fVER_005fMINOR"><code>LIBCONFIGXX_VER_MINOR</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Version-Test-Macros">Version Test Macros</a></td></tr>
3501*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-LIBCONFIGXX_005fVER_005fREVISION"><code>LIBCONFIGXX_VER_REVISION</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Version-Test-Macros">Version Test Macros</a></td></tr>
3502*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-LIBCONFIG_005fVER_005fMAJOR"><code>LIBCONFIG_VER_MAJOR</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Version-Test-Macros">Version Test Macros</a></td></tr>
3503*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-LIBCONFIG_005fVER_005fMINOR"><code>LIBCONFIG_VER_MINOR</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Version-Test-Macros">Version Test Macros</a></td></tr>
3504*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-LIBCONFIG_005fVER_005fREVISION"><code>LIBCONFIG_VER_REVISION</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Version-Test-Macros">Version Test Macros</a></td></tr>
3505*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookup-on-Config"><code>lookup on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3506*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookup-on-Config-1"><code>lookup on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3507*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookup-on-Setting"><code>lookup on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3508*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookup-on-Setting-1"><code>lookup on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3509*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3510*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-1"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3511*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-2"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3512*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-3"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3513*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-4"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3514*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-5"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3515*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-6"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3516*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-7"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3517*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-8"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3518*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-9"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3519*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-10"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3520*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-11"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3521*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-12"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3522*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-13"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3523*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-14"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3524*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Config-15"><code>lookupValue on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3525*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3526*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-1"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3527*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-2"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3528*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-3"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3529*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-4"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3530*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-5"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3531*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-6"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3532*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-7"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3533*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-8"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3534*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-9"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3535*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-10"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3536*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-11"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3537*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-12"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3538*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-13"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3539*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-14"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3540*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-15"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3541*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-16"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3542*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-lookupValue-on-Setting-17"><code>lookupValue on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3543*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3544*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-O">O</a></th><td></td><td></td></tr>
3545*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-bool-_0028_0029-on-Setting"><code>operator bool () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3546*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-const-char-_002a-_0028_0029-on-Setting"><code>operator const char * () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3547*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-double-_0028_0029-on-Setting"><code>operator double () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3548*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-float-_0028_0029-on-Setting"><code>operator float () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3549*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-int-_0028_0029-on-Setting"><code>operator int () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3550*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-long-_0028_0029-on-Setting"><code>operator long () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3551*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-long-long-_0028_0029-on-Setting"><code>operator long long () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3552*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-std_003a_003astring-_0028_0029-on-Setting"><code>operator std::string () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3553*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-unsigned-int-_0028_0029-on-Setting"><code>operator unsigned int () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3554*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-unsigned-long-_0028_0029-on-Setting"><code>operator unsigned long () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3555*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator-unsigned-long-long-_0028_0029-on-Setting"><code>operator unsigned long long () on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3556*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_003d-on-Setting"><code>operator= on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3557*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_003d-on-Setting-1"><code>operator= on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3558*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_003d-on-Setting-2"><code>operator= on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3559*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_003d-on-Setting-3"><code>operator= on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3560*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_003d-on-Setting-4"><code>operator= on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3561*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_003d-on-Setting-5"><code>operator= on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3562*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_003d-on-Setting-6"><code>operator= on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3563*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_003d-on-Setting-7"><code>operator= on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3564*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_005b_005d-on-Setting"><code>operator[] on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3565*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_005b_005d-on-Setting-1"><code>operator[] on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3566*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-operator_005b_005d-on-Setting-2"><code>operator[] on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3567*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3568*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-P">P</a></th><td></td><td></td></tr>
3569*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-ParseException-on-ParseException"><code>ParseException on ParseException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3570*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3571*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-R">R</a></th><td></td><td></td></tr>
3572*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-read-on-Config"><code>read on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3573*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-readFile-on-Config"><code>readFile on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3574*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-readString-on-Config"><code>readString on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3575*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-readString-on-Config-1"><code>readString on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3576*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-remove-on-Setting"><code>remove on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3577*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-remove-on-Setting-1"><code>remove on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3578*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-remove-on-Setting-2"><code>remove on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3579*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3580*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-S">S</a></th><td></td><td></td></tr>
3581*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setAutoConvert-on-Config"><code>setAutoConvert on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3582*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setDefaultFormat-on-Config"><code>setDefaultFormat on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3583*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setFloatPrecision-on-Config"><code>setFloatPrecision on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3584*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setFormat-on-Setting"><code>setFormat on Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3585*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setIncludeDir-on-Config"><code>setIncludeDir on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3586*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setOption-on-Config"><code>setOption on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3587*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setOptions-on-Config"><code>setOptions on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3588*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setTabWidth-on-Config"><code>setTabWidth on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3589*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingNameException-on-SettingNameException"><code>SettingNameException on SettingNameException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3590*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingNotFoundException-on-SettingNotFoundException"><code>SettingNotFoundException on SettingNotFoundException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3591*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingNotFoundException-on-SettingNotFoundException-1"><code>SettingNotFoundException on SettingNotFoundException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3592*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingNotFoundException-on-SettingNotFoundException-2"><code>SettingNotFoundException on SettingNotFoundException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3593*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingTypeException-on-SettingTypeException"><code>SettingTypeException on SettingTypeException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3594*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingTypeException-on-SettingTypeException-1"><code>SettingTypeException on SettingTypeException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3595*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingTypeException-on-SettingTypeException-2"><code>SettingTypeException on SettingTypeException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3596*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3597*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Function-Index_fn_letter-W">W</a></th><td></td><td></td></tr>
3598*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-write-on-Config"><code>write on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3599*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-writeFile-on-Config"><code>writeFile on Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3600*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3601*2e9d4914SAndroid Build Coastguard Worker</table>
3602*2e9d4914SAndroid Build Coastguard Worker<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Function-Index_fn_symbol-1"><b>~</b></a>
3603*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3604*2e9d4914SAndroid Build Coastguard Worker<br>
3605*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-A"><b>A</b></a>
3606*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3607*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-B"><b>B</b></a>
3608*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3609*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-C"><b>C</b></a>
3610*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3611*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-E"><b>E</b></a>
3612*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3613*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-F"><b>F</b></a>
3614*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3615*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-G"><b>G</b></a>
3616*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3617*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-I"><b>I</b></a>
3618*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3619*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-L"><b>L</b></a>
3620*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3621*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-O"><b>O</b></a>
3622*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3623*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-P"><b>P</b></a>
3624*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3625*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-R"><b>R</b></a>
3626*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3627*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-S"><b>S</b></a>
3628*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3629*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Function-Index_fn_letter-W"><b>W</b></a>
3630*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3631*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
3632*2e9d4914SAndroid Build Coastguard Worker
3633*2e9d4914SAndroid Build Coastguard Worker<hr>
3634*2e9d4914SAndroid Build Coastguard Worker<a name="Type-Index"></a>
3635*2e9d4914SAndroid Build Coastguard Worker<div class="header">
3636*2e9d4914SAndroid Build Coastguard Worker<p>
3637*2e9d4914SAndroid Build Coastguard WorkerNext: <a href="#Concept-Index" accesskey="n" rel="next">Concept Index</a>, Previous: <a href="#Function-Index" accesskey="p" rel="prev">Function Index</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
3638*2e9d4914SAndroid Build Coastguard Worker</div>
3639*2e9d4914SAndroid Build Coastguard Worker<a name="Type-Index-1"></a>
3640*2e9d4914SAndroid Build Coastguard Worker<h2 class="unnumbered">Type Index</h2>
3641*2e9d4914SAndroid Build Coastguard Worker
3642*2e9d4914SAndroid Build Coastguard Worker<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Type-Index_tp_letter-C"><b>C</b></a>
3643*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3644*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Type-Index_tp_letter-F"><b>F</b></a>
3645*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3646*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Type-Index_tp_letter-P"><b>P</b></a>
3647*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3648*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Type-Index_tp_letter-S"><b>S</b></a>
3649*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3650*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
3651*2e9d4914SAndroid Build Coastguard Worker<table class="index-tp" border="0">
3652*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
3653*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3654*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Type-Index_tp_letter-C">C</a></th><td></td><td></td></tr>
3655*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-Config"><code>Config</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3656*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-Config_003a_003aOption"><code>Config::Option</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3657*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-ConfigException"><code>ConfigException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3658*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005ferror_005ft"><code>config_error_t</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3659*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005finclude_005ffn_005ft"><code>config_include_fn_t</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3660*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005fsetting_005ft"><code>config_setting_t</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3661*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-config_005ft"><code>config_t</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3662*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3663*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Type-Index_tp_letter-F">F</a></th><td></td><td></td></tr>
3664*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-FileIOException"><code>FileIOException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3665*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3666*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Type-Index_tp_letter-P">P</a></th><td></td><td></td></tr>
3667*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-ParseException"><code>ParseException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3668*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3669*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Type-Index_tp_letter-S">S</a></th><td></td><td></td></tr>
3670*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-Setting"><code>Setting</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3671*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-Setting_003a_003aFormat"><code>Setting::Format</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3672*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-Setting_003a_003aType"><code>Setting::Type</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3673*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingException"><code>SettingException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3674*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingFormat"><code>SettingFormat</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3675*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingNameException"><code>SettingNameException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3676*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingNotFoundException"><code>SettingNotFoundException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3677*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-SettingTypeException"><code>SettingTypeException</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C_002b_002b-API">The C++ API</a></td></tr>
3678*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3679*2e9d4914SAndroid Build Coastguard Worker</table>
3680*2e9d4914SAndroid Build Coastguard Worker<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Type-Index_tp_letter-C"><b>C</b></a>
3681*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3682*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Type-Index_tp_letter-F"><b>F</b></a>
3683*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3684*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Type-Index_tp_letter-P"><b>P</b></a>
3685*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3686*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Type-Index_tp_letter-S"><b>S</b></a>
3687*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3688*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
3689*2e9d4914SAndroid Build Coastguard Worker
3690*2e9d4914SAndroid Build Coastguard Worker<hr>
3691*2e9d4914SAndroid Build Coastguard Worker<a name="Concept-Index"></a>
3692*2e9d4914SAndroid Build Coastguard Worker<div class="header">
3693*2e9d4914SAndroid Build Coastguard Worker<p>
3694*2e9d4914SAndroid Build Coastguard WorkerPrevious: <a href="#Type-Index" accesskey="p" rel="prev">Type Index</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Function-Index" title="Index" rel="index">Index</a>]</p>
3695*2e9d4914SAndroid Build Coastguard Worker</div>
3696*2e9d4914SAndroid Build Coastguard Worker<a name="Concept-Index-1"></a>
3697*2e9d4914SAndroid Build Coastguard Worker<h2 class="unnumbered">Concept Index</h2>
3698*2e9d4914SAndroid Build Coastguard Worker
3699*2e9d4914SAndroid Build Coastguard Worker<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Concept-Index_cp_letter-A"><b>A</b></a>
3700*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3701*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-C"><b>C</b></a>
3702*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3703*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-D"><b>D</b></a>
3704*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3705*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-E"><b>E</b></a>
3706*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3707*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-F"><b>F</b></a>
3708*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3709*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-G"><b>G</b></a>
3710*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3711*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-H"><b>H</b></a>
3712*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3713*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-I"><b>I</b></a>
3714*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3715*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-L"><b>L</b></a>
3716*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3717*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-P"><b>P</b></a>
3718*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3719*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-S"><b>S</b></a>
3720*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3721*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-U"><b>U</b></a>
3722*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3723*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-V"><b>V</b></a>
3724*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3725*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
3726*2e9d4914SAndroid Build Coastguard Worker<table class="index-cp" border="0">
3727*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><th align="left">Index Entry</th><td>&nbsp;</td><th align="left"> Section</th></tr>
3728*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3729*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-A">A</a></th><td></td><td></td></tr>
3730*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-aggregate-value">aggregate value</a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3731*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-array">array</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Configuration-Files">Configuration Files</a></td></tr>
3732*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3733*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-C">C</a></th><td></td><td></td></tr>
3734*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-comment">comment</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Comments">Comments</a></td></tr>
3735*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-configuration">configuration</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Configuration-Files">Configuration Files</a></td></tr>
3736*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3737*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-D">D</a></th><td></td><td></td></tr>
3738*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-destructor-function">destructor function</a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3739*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3740*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-E">E</a></th><td></td><td></td></tr>
3741*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-escape-sequence">escape sequence</a>:</td><td>&nbsp;</td><td valign="top"><a href="#String-Values">String Values</a></td></tr>
3742*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3743*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-F">F</a></th><td></td><td></td></tr>
3744*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-format">format</a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3745*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3746*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-G">G</a></th><td></td><td></td></tr>
3747*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-group">group</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Configuration-Files">Configuration Files</a></td></tr>
3748*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3749*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-H">H</a></th><td></td><td></td></tr>
3750*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-hook">hook</a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3751*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-hook-1">hook</a>:</td><td>&nbsp;</td><td valign="top"><a href="#The-C-API">The C API</a></td></tr>
3752*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3753*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-I">I</a></th><td></td><td></td></tr>
3754*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-include-directive">include directive</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Include-Directives">Include Directives</a></td></tr>
3755*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-include-function">include function</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Include-Directives">Include Directives</a></td></tr>
3756*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3757*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-L">L</a></th><td></td><td></td></tr>
3758*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-list">list</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Configuration-Files">Configuration Files</a></td></tr>
3759*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-locale">locale</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Internationalization-Issues">Internationalization Issues</a></td></tr>
3760*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3761*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-P">P</a></th><td></td><td></td></tr>
3762*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-path">path</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Configuration-Files">Configuration Files</a></td></tr>
3763*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-pkg_002dconfig">pkg-config</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Compiling-Using-pkg_002dconfig">Compiling Using pkg-config</a></td></tr>
3764*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3765*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-S">S</a></th><td></td><td></td></tr>
3766*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-scalar-value">scalar value</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Configuration-Files">Configuration Files</a></td></tr>
3767*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-setting">setting</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Configuration-Files">Configuration Files</a></td></tr>
3768*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3769*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-U">U</a></th><td></td><td></td></tr>
3770*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-Unicode">Unicode</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Internationalization-Issues">Internationalization Issues</a></td></tr>
3771*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-UTF_002d8">UTF-8</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Internationalization-Issues">Internationalization Issues</a></td></tr>
3772*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3773*2e9d4914SAndroid Build Coastguard Worker<tr><th><a name="Concept-Index_cp_letter-V">V</a></th><td></td><td></td></tr>
3774*2e9d4914SAndroid Build Coastguard Worker<tr><td></td><td valign="top"><a href="#index-value">value</a>:</td><td>&nbsp;</td><td valign="top"><a href="#Configuration-Files">Configuration Files</a></td></tr>
3775*2e9d4914SAndroid Build Coastguard Worker<tr><td colspan="4"> <hr></td></tr>
3776*2e9d4914SAndroid Build Coastguard Worker</table>
3777*2e9d4914SAndroid Build Coastguard Worker<table><tr><th valign="top">Jump to: &nbsp; </th><td><a class="summary-letter" href="#Concept-Index_cp_letter-A"><b>A</b></a>
3778*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3779*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-C"><b>C</b></a>
3780*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3781*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-D"><b>D</b></a>
3782*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3783*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-E"><b>E</b></a>
3784*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3785*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-F"><b>F</b></a>
3786*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3787*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-G"><b>G</b></a>
3788*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3789*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-H"><b>H</b></a>
3790*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3791*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-I"><b>I</b></a>
3792*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3793*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-L"><b>L</b></a>
3794*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3795*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-P"><b>P</b></a>
3796*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3797*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-S"><b>S</b></a>
3798*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3799*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-U"><b>U</b></a>
3800*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3801*2e9d4914SAndroid Build Coastguard Worker<a class="summary-letter" href="#Concept-Index_cp_letter-V"><b>V</b></a>
3802*2e9d4914SAndroid Build Coastguard Worker &nbsp;
3803*2e9d4914SAndroid Build Coastguard Worker</td></tr></table>
3804*2e9d4914SAndroid Build Coastguard Worker
3805*2e9d4914SAndroid Build Coastguard Worker<hr>
3806*2e9d4914SAndroid Build Coastguard Worker
3807*2e9d4914SAndroid Build Coastguard Worker
3808*2e9d4914SAndroid Build Coastguard Worker
3809*2e9d4914SAndroid Build Coastguard Worker</body>
3810*2e9d4914SAndroid Build Coastguard Worker</html>
3811