blob: 0c9151160b42fcc01f2b1dc07f85153f552e0ffc [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Apache log4cxx: Properties Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="http://logging.apache.org/log4cxx">Apache log4cxx</a>
&#160;<span id="projectnumber">Version 0.11.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classlog4cxx_1_1helpers_1_1_properties.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlog4cxx_1_1helpers_1_1_properties-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Properties Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa7321215b53f90ec4dc293e06ff79938"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#aa7321215b53f90ec4dc293e06ff79938">Properties</a> ()</td></tr>
<tr class="memdesc:aa7321215b53f90ec4dc293e06ff79938"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create new instance. <a href="#aa7321215b53f90ec4dc293e06ff79938">More...</a><br /></td></tr>
<tr class="separator:aa7321215b53f90ec4dc293e06ff79938"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bcc984f39c6e8be064ed7d42d592de7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#a7bcc984f39c6e8be064ed7d42d592de7">~Properties</a> ()</td></tr>
<tr class="memdesc:a7bcc984f39c6e8be064ed7d42d592de7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="#a7bcc984f39c6e8be064ed7d42d592de7">More...</a><br /></td></tr>
<tr class="separator:a7bcc984f39c6e8be064ed7d42d592de7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a379e84baf8c365319590bfce09312d68"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#a379e84baf8c365319590bfce09312d68">load</a> (InputStreamPtr inStream)</td></tr>
<tr class="memdesc:a379e84baf8c365319590bfce09312d68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a property list (key and element pairs) from the input stream. <a href="#a379e84baf8c365319590bfce09312d68">More...</a><br /></td></tr>
<tr class="separator:a379e84baf8c365319590bfce09312d68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef32d9ca1275bdfc18da1c58d596a600"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#aef32d9ca1275bdfc18da1c58d596a600">setProperty</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;key, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)</td></tr>
<tr class="memdesc:aef32d9ca1275bdfc18da1c58d596a600"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls <a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#ac76980995876f9dde00ce4e496beeddb" title="Puts a property value into the collection. ">Properties::put</a>. <a href="#aef32d9ca1275bdfc18da1c58d596a600">More...</a><br /></td></tr>
<tr class="separator:aef32d9ca1275bdfc18da1c58d596a600"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac76980995876f9dde00ce4e496beeddb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#ac76980995876f9dde00ce4e496beeddb">put</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;key, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)</td></tr>
<tr class="memdesc:ac76980995876f9dde00ce4e496beeddb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Puts a property value into the collection. <a href="#ac76980995876f9dde00ce4e496beeddb">More...</a><br /></td></tr>
<tr class="separator:ac76980995876f9dde00ce4e496beeddb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0c5a3ad33f4b17ae40fa653c36dade2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#ab0c5a3ad33f4b17ae40fa653c36dade2">getProperty</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;key) const </td></tr>
<tr class="memdesc:ab0c5a3ad33f4b17ae40fa653c36dade2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls <a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#a3a279b605a438f9e3e5f42e35febc485" title="Gets a property value. ">Properties::get</a>. <a href="#ab0c5a3ad33f4b17ae40fa653c36dade2">More...</a><br /></td></tr>
<tr class="separator:ab0c5a3ad33f4b17ae40fa653c36dade2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a279b605a438f9e3e5f42e35febc485"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#a3a279b605a438f9e3e5f42e35febc485">get</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;key) const </td></tr>
<tr class="memdesc:a3a279b605a438f9e3e5f42e35febc485"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a property value. <a href="#a3a279b605a438f9e3e5f42e35febc485">More...</a><br /></td></tr>
<tr class="separator:a3a279b605a438f9e3e5f42e35febc485"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83eddb29832a65abdb79a6e774a217a7"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#a83eddb29832a65abdb79a6e774a217a7">propertyNames</a> () const </td></tr>
<tr class="memdesc:a83eddb29832a65abdb79a6e774a217a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list. <a href="#a83eddb29832a65abdb79a6e774a217a7">More...</a><br /></td></tr>
<tr class="separator:a83eddb29832a65abdb79a6e774a217a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa7321215b53f90ec4dc293e06ff79938"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">Properties</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create new instance. </p>
</div>
</div>
<a class="anchor" id="a7bcc984f39c6e8be064ed7d42d592de7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">~<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">Properties</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3a279b605a438f9e3e5f42e35febc485"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> get </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets a property value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>the property key. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the value in this property list with the specified key value or empty string. </dd></dl>
</div>
</div>
<a class="anchor" id="ab0c5a3ad33f4b17ae40fa653c36dade2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> getProperty </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Calls <a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#a3a279b605a438f9e3e5f42e35febc485" title="Gets a property value. ">Properties::get</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>the property key. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the value in this property list with the specified key value or empty string. </dd></dl>
</div>
</div>
<a class="anchor" id="a379e84baf8c365319590bfce09312d68"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void load </td>
<td>(</td>
<td class="paramtype">InputStreamPtr&#160;</td>
<td class="paramname"><em>inStream</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reads a property list (key and element pairs) from the input stream. </p>
<p>The stream is assumed to be using the ISO 8859-1 character encoding.</p>
<p>Every property occupies one line of the input stream. Each line is terminated by a line terminator (<code>\n</code> or <code>\r</code> or <code>\r\n</code>). Lines from the input stream are processed until end of file is reached on the input stream.</p>
<p>A line that contains only whitespace or whose first non-whitespace character is an ASCII <code>#</code> or <code>!</code> is ignored (thus, <code>#</code> or <code>!</code> indicate comment lines).</p>
<p>Every line other than a blank line or a comment line describes one property to be added to the table (except that if a line ends with \, then the following line, if it exists, is treated as a continuation line, as described below). The key consists of all the characters in the line starting with the first non-whitespace character and up to, but not including, the first ASCII <code>=</code>, <code>:</code>, or whitespace character. All of the key termination characters may be included in the key by preceding them with a <code>\</code>. Any whitespace after the key is skipped; if the first non-whitespace character after the key is <code>=</code> or <code>:</code>, then it is ignored and any whitespace characters after it are also skipped. All remaining characters on the line become part of the associated element string. Within the element string, the ASCII escape sequences <code>\t</code>, <code>\n</code>, <code>\r</code>, <code>\</code>, <code>\"</code>, <code>\'</code>, <code>\</code> (a backslash and a space), and <code>\uxxxx</code> are recognized and converted to single characters. Moreover, if the last character on the line is <code>\</code>, then the next line is treated as a continuation of the current line; the <code>\</code> and line terminator are simply discarded, and any leading whitespace characters on the continuation line are also discarded and are not part of the element string.</p>
<p>As an example, each of the following four lines specifies the key "Truth" and the associated element value "Beauty":</p>
<pre>
Truth = Beauty
Truth:Beauty
Truth :Beauty
</pre><p>As another example, the following three lines specify a single property: </p><pre>
fruits apple, banana, pear, \
cantaloupe, watermelon, \
kiwi, mango
</pre><p> The key is "&lt;code&gt;fruits&lt;/code&gt;" and the associated element is: </p><pre>
"apple, banana, pear, cantaloupe, watermelon, kiwi, mango"
</pre><p> Note that a space appears before each \ so that a space will appear after each comma in the final result; the \, line terminator, and leading whitespace on the continuation line are merely discarded and are not replaced by one or more other characters.</p>
<p>As a third example, the line: </p><pre>
cheeses
</pre><p> specifies that the key is "&lt;code&gt;cheeses&lt;/code&gt;" and the associated element is the empty string.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">inStream</td><td>the input stream.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classlog4cxx_1_1helpers_1_1_i_o_exception.html" title="Signals that an I/O exception of some sort has occurred. ">IOException</a></td><td>if an error occurred when reading from the input stream. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a83eddb29832a65abdb79a6e774a217a7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;<a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&gt; propertyNames </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list. </p>
<dl class="section return"><dt>Returns</dt><dd>an array of all the keys in this property list, including the keys in the default property list. </dd></dl>
</div>
</div>
<a class="anchor" id="ac76980995876f9dde00ce4e496beeddb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> put </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Puts a property value into the collection. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>the key to be placed into this property list. </td></tr>
<tr><td class="paramname">value</td><td>the value corresponding to key. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the previous value of the specified key in this property list, or an empty string if it did not have one. </dd></dl>
</div>
</div>
<a class="anchor" id="aef32d9ca1275bdfc18da1c58d596a600"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> setProperty </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calls <a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html#ac76980995876f9dde00ce4e496beeddb" title="Puts a property value into the collection. ">Properties::put</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>the key to be placed into this property list. </td></tr>
<tr><td class="paramname">value</td><td>the value corresponding to key. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the previous value of the specified key in this property list, or an empty string if it did not have one. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="properties_8h.html">properties.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
</body>
</html>