Imported Upstream version 1.51.0
[platform/upstream/boost.git] / doc / html / boost / property_tree / info_parser / read_info_id795081.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Function template read_info</title>
5 <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="../../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8 <link rel="up" href="../../../property_tree/reference.html#header.boost.property_tree.info_parser_hpp" title="Header &lt;boost/property_tree/info_parser.hpp&gt;">
9 <link rel="prev" href="read_info_id1095915.html" title="Function template read_info">
10 <link rel="next" href="write_info_id1175513.html" title="Function template write_info">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="read_info_id1095915.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../property_tree/reference.html#header.boost.property_tree.info_parser_hpp"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="write_info_id1175513.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.property_tree.info_parser.read_info_id795081"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Function template read_info</span></h2>
29 <p>boost::property_tree::info_parser::read_info</p>
30 </div>
31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../property_tree/reference.html#header.boost.property_tree.info_parser_hpp" title="Header &lt;boost/property_tree/info_parser.hpp&gt;">boost/property_tree/info_parser.hpp</a>&gt;
33
34 </span>
35 <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Ptree<span class="special">&gt;</span> 
36   <span class="keyword">void</span> <span class="identifier">read_info</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> filename<span class="special">,</span> <span class="identifier">Ptree</span> <span class="special">&amp;</span> pt<span class="special">,</span> 
37                  <span class="keyword">const</span> <span class="identifier">Ptree</span> <span class="special">&amp;</span> default_ptree<span class="special">,</span> 
38                  <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span> <span class="special">&amp;</span> loc <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre></div>
39 <div class="refsect1">
40 <a name="id2597954"></a><h2>Description</h2>
41 <p>Read INFO from a the given file and translate it to a property tree. The tree's key type must be a string type, i.e. it must have a nested value_type typedef that is a valid parameter for basic_ifstream. </p>
42 <div class="note"><table border="0" summary="Note">
43 <tr>
44 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
45 <th align="left">Note</th>
46 </tr>
47 <tr><td align="left" valign="top"><p>Replaces the existing contents. Strong exception guarantee. </p></td></tr>
48 </table></div>
49 <p>
50
51 </p>
52 <div class="variablelist"><table border="0">
53 <col align="left" valign="top">
54 <tbody><tr>
55 <td><p><span class="term">Parameters:</span></p></td>
56 <td><div class="variablelist"><table border="0">
57 <col align="left" valign="top">
58 <tbody><tr>
59 <td><p><span class="term"><code class="computeroutput">default_ptree</code></span></p></td>
60 <td><p>If parsing fails, pt is set to a copy of this tree. </p></td>
61 </tr></tbody>
62 </table></div></td>
63 </tr></tbody>
64 </table></div>
65 </div>
66 </div>
67 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
68 <td align="left"></td>
69 <td align="right"><div class="copyright-footer">Copyright &#169; 2008 Marcin Kalicinski<p>
70         Distributed under the Boost Software License, Version 1.0. (See accompanying
71         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
72       </p>
73 </div></td>
74 </tr></table>
75 <hr>
76 <div class="spirit-nav">
77 <a accesskey="p" href="read_info_id1095915.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../property_tree/reference.html#header.boost.property_tree.info_parser_hpp"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="write_info_id1175513.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
78 </div>
79 </body>
80 </html>