| <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 Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="functions.html">Class Members</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> </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 </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html#a1">setProperties</a> (helpers::Properties &properties, const String &prefix)</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1config_1_1PropertySetter.html#a2">setProperty</a> (const String &name, const String &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 </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 &properties, const String &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->setOption("name", "Joe"), anObject->setOption("age", "32") and anObject->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 & 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">( </td> |
| <td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::ObjectPtr</a> </td> |
| <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </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> </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">( </td> |
| <td class="md" nowrap valign="top">helpers::Properties & </td> |
| <td class="mdname" nowrap> <em>properties</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap>const String & </td> |
| <td class="mdname" nowrap> <em>prefix</em></td> |
| </tr> |
| <tr> |
| <td></td> |
| <td class="md">) </td> |
| <td class="md" colspan="2"></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </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">( </td> |
| <td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::ObjectPtr</a> </td> |
| <td class="mdname" nowrap> <em>obj</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap>helpers::Properties & </td> |
| <td class="mdname" nowrap> <em>properties</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap>const String & </td> |
| <td class="mdname" nowrap> <em>prefix</em></td> |
| </tr> |
| <tr> |
| <td></td> |
| <td class="md">) </td> |
| <td class="md" colspan="2"><code> [static]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </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> </td><td>The object to configure. </td></tr> |
| <tr><td valign=top><em>properties</em> </td><td>A java.util.Properties containing keys and values. </td></tr> |
| <tr><td valign=top><em>prefix</em> </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">( </td> |
| <td class="md" nowrap valign="top">const String & </td> |
| <td class="mdname" nowrap> <em>name</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap>const String & </td> |
| <td class="mdname" nowrap> <em>value</em></td> |
| </tr> |
| <tr> |
| <td></td> |
| <td class="md">) </td> |
| <td class="md" colspan="2"></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </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> </td><td>name of the property </td></tr> |
| <tr><td valign=top><em>value</em> </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 © 1999-2004, Apache Software Foundation |
| </em></font></div> |
| </td></tr> |
| </table> |
| <!-- END main table --> |
| </body> |
| </html> |
| <!-- end the processing --> |