blob: b63c65087056262e6ea0d219a393450c1f5bc2b1 [file] [log] [blame]
<html>
<head>
<title>
log4cxx - Documentation
</title>
<link href="../css/doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<!-- START Header table -->
<table border="0" cellspacing="0" width="90%">
<!-- TOP IMAGE -->
<tr>
<td colspan="2">
<a href="http://logging.apache.org">
<img src="http://logging.apache.org/images/ls-logo.jpg" align="left" border="0"/>
</a>
</td>
</tr>
</table>
<!-- END Header table -->
<!-- START main table -->
<table id="main" border="0" width="90%" cellspacing="2" cellpadding="0">
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr>
<!-- LEFT SIDE NAVIGATION -->
<td id="navbar" valign="top">
<!-- ============================================================ -->
<table id="navbar" border="0" cellspacing="0" cellpadding="0">
<tr >
<td class="navbarHeader" nowrap="true">
<strong>Apache</strong>
</td>
</tr>
<tr><td class="navbarItem"><small> <a href="http://www.apache.org">Apache Home</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="http://logging.apache.org/">Logging Services</a>
</small></td></tr>
<tr >
<td class="navbarHeader" nowrap="true">
<strong>log4cxx project</strong>
</td>
</tr>
<tr><td class="navbarItem"><small> <a href="../index.html">About</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../news.html">News</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../team.html">Team</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../manual/index.html">Documentation</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../performance.html">Performance</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../download.html">Download</a>
</small></td></tr>
</table>
</td>
<td id="mainContents" align="left" valign="top">
<hr>
<!-- Generated by Doxygen 1.3.5 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>PropertySetter Class Reference</h1>Collaboration diagram for PropertySetter:<p><center><img src="classlog4cxx_1_1config_1_1PropertySetter__coll__graph.png" border="0" usemap="#PropertySetter__coll__map" alt="Collaboration graph"></center>
<map name="PropertySetter__coll__map">
<area href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html" shape="rect" coords="19,18,90,42" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cxx_1_1config_1_1PropertySetter-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html#a0">PropertySetter</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::ObjectPtr</a> obj)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html#a1">setProperties</a> (helpers::Properties &amp;properties, const String &amp;prefix)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html#a2">setProperty</a> (const String &amp;name, const String &amp;value)</td></tr>
<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html#e0">setProperties</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::ObjectPtr</a> obj, helpers::Properties &amp;properties, const String &amp;prefix)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
General purpose Object property setter. Clients repeatedly invokes <a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html#a2">setProperty(name,value)</a> in order to invoke setters on the Object specified in the constructor.<p>
Usage: <pre><div>
<a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html">PropertySetter</a> ps(anObject);
ps.set("name", "Joe");
ps.set("age", "32");
ps.set("isMale", "true");
</pre></div> will cause the invocations anObject-&gt;setOption("name", "Joe"), anObject-&gt;setOption("age", "32") and anObject-&gt;setOption("isMale", "true") if the <a class="el" href="classlog4cxx_1_1spi_1_1OptionHandler.html">spi::OptionHandler</a> interface is supported by anObject.
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="log4cxx::config::PropertySetter::PropertySetter" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html">PropertySetter</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::ObjectPtr</a>&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>obj</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Create a new <a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html">PropertySetter</a> for the specified Object. This is done in prepartion for invoking <a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html#a2">setProperty</a> one or more times.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>obj</em>&nbsp;</td><td>the object for which to set properties </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a1" doxytag="log4cxx::config::PropertySetter::setProperties" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setProperties </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">helpers::Properties &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>properties</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>prefix</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the properites for the object that match the <code>prefix</code> passed as parameter. </td>
</tr>
</table>
<a class="anchor" name="e0" doxytag="log4cxx::config::PropertySetter::setProperties" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setProperties </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::ObjectPtr</a>&nbsp;</td>
<td class="mdname" nowrap> <em>obj</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>helpers::Properties &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>properties</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>prefix</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the properties of an object passed as a parameter in one go. The <code>properties</code> are parsed relative to a <code>prefix</code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>obj</em>&nbsp;</td><td>The object to configure. </td></tr>
<tr><td valign=top><em>properties</em>&nbsp;</td><td>A java.util.Properties containing keys and values. </td></tr>
<tr><td valign=top><em>prefix</em>&nbsp;</td><td>Only keys having the specified prefix will be set. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="a2" doxytag="log4cxx::config::PropertySetter::setProperty" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setProperty </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>name</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set a property on this PropertySetter's Object. If the underlying Object supports the <a class="el" href="classlog4cxx_1_1spi_1_1OptionHandler.html">spi::OptionHandler</a> interface, the <a class="el" href="classlog4cxx_1_1spi_1_1OptionHandler.html#a2">setOption</a> method is called.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>name</em>&nbsp;</td><td>name of the property </td></tr>
<tr><td valign=top><em>value</em>&nbsp;</td><td>String value of the property </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li>propertysetter.h<li>propertysetter.cpp</ul>
</td>
</tr>
<!-- FOOTER -->
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 1999-2004, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
<!-- END main table -->
</body>
</html>
<!-- end the processing -->