Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 5fc82cd2dfd40b1b8acca39dd2860281 > files > 241

log4cpp-1.0-4.fc12.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>log4cpp: log4cpp::PropertyConfiguratorImpl Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</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>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespacelog4cpp.html">log4cpp</a>::<a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html">PropertyConfiguratorImpl</a>
  </div>
</div>
<div class="contents">
<h1>log4cpp::PropertyConfiguratorImpl Class Reference</h1><!-- doxytag: class="log4cpp::PropertyConfiguratorImpl" --><code>#include &lt;<a class="el" href="PropertyConfiguratorImpl_8hh_source.html">PropertyConfiguratorImpl.hh</a>&gt;</code>
<p>

<p>
<a href="classlog4cpp_1_1PropertyConfiguratorImpl-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 Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::map&lt; std::string, <br class="typebreak">
<a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#1e536726299d8783fbe13d119935cc05">AppenderMap</a></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="classlog4cpp_1_1PropertyConfiguratorImpl.html#9c9c3c6a75945f87fb932172257cd850">PropertyConfiguratorImpl</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#f9057d7b1c6b387b2b0b251ab0404c29">~PropertyConfiguratorImpl</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#5359eb4092054d88eb54dadc98233d69">doConfigure</a> (const std::string &amp;initFileName)  throw (ConfigureFailure)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#781dadea0af39d227a85e50f75d6a037">doConfigure</a> (std::istream &amp;in)  throw (ConfigureFailure)</td></tr>

<tr><td colspan="2"><br><h2>Protected 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="classlog4cpp_1_1PropertyConfiguratorImpl.html#ed7738e5621c55340124ca547dfc66be">configureCategory</a> (const std::string &amp;categoryname)  throw (ConfigureFailure)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">configure the given category.  <a href="#ed7738e5621c55340124ca547dfc66be"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#bc868a0f88a5c3d5582e3c900d966def">getCategories</a> (std::vector&lt; std::string &gt; &amp;categories) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a list of categories for which we should do the configuration.  <a href="#bc868a0f88a5c3d5582e3c900d966def"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#e7dbe7af2eeecd814be5e5b8d962ab62">instantiateAllAppenders</a> ()  throw (ConfigureFailure)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#b519fe889ade94aa65de50c0b2931fa2">instantiateAppender</a> (const std::string &amp;name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Intantiate and configure the appender referred to by the given name.  <a href="#b519fe889ade94aa65de50c0b2931fa2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#15be66c110ae417b1106314bc15d4ff9">setLayout</a> (<a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> *appender, const std::string &amp;name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method for instantiating and configuring the layouts associated with each appender.  <a href="#15be66c110ae417b1106314bc15d4ff9"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1Properties.html">Properties</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#87975c18760a6fc73e3e1aaa0aa3c671">_properties</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#1e536726299d8783fbe13d119935cc05">AppenderMap</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#e968231973b8df08700bbded280f3e30">_allAppenders</a></td></tr>

</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="1e536726299d8783fbe13d119935cc05"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::AppenderMap" ref="1e536726299d8783fbe13d119935cc05" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::map&lt;std::string, <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a>*&gt; <a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#1e536726299d8783fbe13d119935cc05">log4cpp::PropertyConfiguratorImpl::AppenderMap</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="9c9c3c6a75945f87fb932172257cd850"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::PropertyConfiguratorImpl" ref="9c9c3c6a75945f87fb932172257cd850" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log4cpp::PropertyConfiguratorImpl::PropertyConfiguratorImpl           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="f9057d7b1c6b387b2b0b251ab0404c29"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::~PropertyConfiguratorImpl" ref="f9057d7b1c6b387b2b0b251ab0404c29" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log4cpp::PropertyConfiguratorImpl::~PropertyConfiguratorImpl           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="ed7738e5621c55340124ca547dfc66be"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::configureCategory" ref="ed7738e5621c55340124ca547dfc66be" args="(const std::string &amp;categoryname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::PropertyConfiguratorImpl::configureCategory           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>categoryname</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>  throw (<a class="el" href="classlog4cpp_1_1ConfigureFailure.html">ConfigureFailure</a>)<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
configure the given category. 
<p>
This includes setting its <a class="el" href="classlog4cpp_1_1Priority.html" title="The Priority class provides importance levels with which one can categorize log messages...">Priority</a> and adding any Appenders. <dl class="todo" compact><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>setting other properties like 'additivity'. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>categoryname</em>&nbsp;</td><td>Name of the category to configure. The name 'rootCategory' refers to the root <a class="el" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>. throw <a class="el" href="classlog4cpp_1_1ConfigureFailure.html" title="Exception class for configuration.">ConfigureFailure</a> </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="781dadea0af39d227a85e50f75d6a037"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::doConfigure" ref="781dadea0af39d227a85e50f75d6a037" args="(std::istream &amp;in)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::PropertyConfiguratorImpl::doConfigure           </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&nbsp;</td>
          <td class="paramname"> <em>in</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>  throw (<a class="el" href="classlog4cpp_1_1ConfigureFailure.html">ConfigureFailure</a>)<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="5359eb4092054d88eb54dadc98233d69"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::doConfigure" ref="5359eb4092054d88eb54dadc98233d69" args="(const std::string &amp;initFileName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::PropertyConfiguratorImpl::doConfigure           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>initFileName</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>  throw (<a class="el" href="classlog4cpp_1_1ConfigureFailure.html">ConfigureFailure</a>)<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="bc868a0f88a5c3d5582e3c900d966def"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::getCategories" ref="bc868a0f88a5c3d5582e3c900d966def" args="(std::vector&lt; std::string &gt; &amp;categories) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::PropertyConfiguratorImpl::getCategories           </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::string &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>categories</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a list of categories for which we should do the configuration. 
<p>
Get the categories contained within the map of properties.<p>
This simply extracts the categories from the map. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>categories</em>&nbsp;</td><td>Reference to a list which is to receive the list of categories.</td></tr>
  </table>
</dl>
Since the category looks something like "category.xxxxx.yyy.zzz", we need to search the entire map to figure out which properties are category listings. Seems like there might be a more elegant solution. 
</div>
</div><p>
<a class="anchor" name="e7dbe7af2eeecd814be5e5b8d962ab62"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::instantiateAllAppenders" ref="e7dbe7af2eeecd814be5e5b8d962ab62" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::PropertyConfiguratorImpl::instantiateAllAppenders           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>  throw (<a class="el" href="classlog4cpp_1_1ConfigureFailure.html">ConfigureFailure</a>)<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="b519fe889ade94aa65de50c0b2931fa2"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::instantiateAppender" ref="b519fe889ade94aa65de50c0b2931fa2" args="(const std::string &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> * log4cpp::PropertyConfiguratorImpl::instantiateAppender           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Intantiate and configure the appender referred to by the given name. 
<p>
This method searches the map to find all configuration parameters for the appender, and adds the appender to the given category. This isn't very general in the sense that it will need to be modified for each type of appender and layout. A more general solution would be to define an "options" interface for each appender and layout, so that we can simply call this method with a list of options instead of needing to know what is or is not available. This would also require some generic way of instantiating an object for which we have no knowledge. An "AppenderFactory" could be used which maps the given type to an actual object class registered with the factory (?? is this possible?). <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>String containing the name of the type of appender to be instantiated. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="15be66c110ae417b1106314bc15d4ff9"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::setLayout" ref="15be66c110ae417b1106314bc15d4ff9" args="(Appender *appender, const std::string &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::PropertyConfiguratorImpl::setLayout           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> *&nbsp;</td>
          <td class="paramname"> <em>appender</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Method for instantiating and configuring the layouts associated with each appender. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>appender</em>&nbsp;</td><td><a class="el" href="classlog4cpp_1_1Appender.html" title="Implement this interface for your own strategies for printing log statements.">Appender</a> to which we are setting this layout. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>Name in the properties of this appender. </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="e968231973b8df08700bbded280f3e30"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::_allAppenders" ref="e968231973b8df08700bbded280f3e30" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#1e536726299d8783fbe13d119935cc05">AppenderMap</a> <a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#e968231973b8df08700bbded280f3e30">log4cpp::PropertyConfiguratorImpl::_allAppenders</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="87975c18760a6fc73e3e1aaa0aa3c671"></a><!-- doxytag: member="log4cpp::PropertyConfiguratorImpl::_properties" ref="87975c18760a6fc73e3e1aaa0aa3c671" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cpp_1_1Properties.html">Properties</a> <a class="el" href="classlog4cpp_1_1PropertyConfiguratorImpl.html#87975c18760a6fc73e3e1aaa0aa3c671">log4cpp::PropertyConfiguratorImpl::_properties</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="PropertyConfiguratorImpl_8hh_source.html">PropertyConfiguratorImpl.hh</a><li><a class="el" href="PropertyConfiguratorImpl_8cpp.html">PropertyConfiguratorImpl.cpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 26 19:34:50 2009 for log4cpp by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>