| <!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: OptionConverter 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> |
|  <span id="projectnumber">Version 0.10.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 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 List</span></a></li> |
| <li><a href="classes.html"><span>Class Index</span></a></li> |
| <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
| <li><a href="functions.html"><span>Class 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_option_converter.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-static-methods">Static Public Member Functions</a> | |
| <a href="classlog4cxx_1_1helpers_1_1_option_converter-members.html">List of all members</a> </div> |
| <div class="headertitle"> |
| <div class="title">OptionConverter Class Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>A convenience class to convert property values to specific types. |
| <a href="classlog4cxx_1_1helpers_1_1_option_converter.html#details">More...</a></p> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> |
| Static Public Member Functions</h2></td></tr> |
| <tr class="memitem:a84695a8b2e45b1ab42caef5dc65534eb"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#a84695a8b2e45b1ab42caef5dc65534eb">convertSpecialChars</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &s)</td></tr> |
| <tr class="separator:a84695a8b2e45b1ab42caef5dc65534eb"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a6ea7dcdf1610e5d7e7f3d6004db6ef3c"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#a6ea7dcdf1610e5d7e7f3d6004db6ef3c">toBoolean</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &value, bool dEfault)</td></tr> |
| <tr class="memdesc:a6ea7dcdf1610e5d7e7f3d6004db6ef3c"><td class="mdescLeft"> </td><td class="mdescRight">If <code>value</code> is "true", then <code>true</code> is returned. <a href="#a6ea7dcdf1610e5d7e7f3d6004db6ef3c">More...</a><br /></td></tr> |
| <tr class="separator:a6ea7dcdf1610e5d7e7f3d6004db6ef3c"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ac849988e20a74924dae77bc1a6e6e4fb"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#ac849988e20a74924dae77bc1a6e6e4fb">toInt</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &value, int dEfault)</td></tr> |
| <tr class="separator:ac849988e20a74924dae77bc1a6e6e4fb"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:af0b5a6bd84b27ef758e7d6d74b362ebf"><td class="memItemLeft" align="right" valign="top">static long </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#af0b5a6bd84b27ef758e7d6d74b362ebf">toFileSize</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &value, long dEfault)</td></tr> |
| <tr class="separator:af0b5a6bd84b27ef758e7d6d74b362ebf"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a53e994f695af6def12f5caa8b0f2f5de"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacelog4cxx.html#ae5a3f62e1b8b965953cbddfda82c53b5">LevelPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#a53e994f695af6def12f5caa8b0f2f5de">toLevel</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &value, const <a class="el" href="namespacelog4cxx.html#ae5a3f62e1b8b965953cbddfda82c53b5">LevelPtr</a> &defaultValue)</td></tr> |
| <tr class="separator:a53e994f695af6def12f5caa8b0f2f5de"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a06323a5e7986b04e0799254c8e313b82"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#a06323a5e7986b04e0799254c8e313b82">findAndSubst</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &key, <a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">Properties</a> &props)</td></tr> |
| <tr class="memdesc:a06323a5e7986b04e0799254c8e313b82"><td class="mdescLeft"> </td><td class="mdescRight">Find the value corresponding to <code>key</code> in <code>props</code>. <a href="#a06323a5e7986b04e0799254c8e313b82">More...</a><br /></td></tr> |
| <tr class="separator:a06323a5e7986b04e0799254c8e313b82"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a45b8aeeafeace89385672ffab025e9d1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#a45b8aeeafeace89385672ffab025e9d1">substVars</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &val, <a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">Properties</a> &props)</td></tr> |
| <tr class="memdesc:a45b8aeeafeace89385672ffab025e9d1"><td class="mdescLeft"> </td><td class="mdescRight">Perform variable substitution in string <code>val</code> from the values of keys found in the system propeties. <a href="#a45b8aeeafeace89385672ffab025e9d1">More...</a><br /></td></tr> |
| <tr class="separator:a45b8aeeafeace89385672ffab025e9d1"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ae6cbcb2248b2c331c8a6fe1c057f676c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#ae6cbcb2248b2c331c8a6fe1c057f676c">getSystemProperty</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &key, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &def)</td></tr> |
| <tr class="memdesc:ae6cbcb2248b2c331c8a6fe1c057f676c"><td class="mdescLeft"> </td><td class="mdescRight">Gets the specified system property. <a href="#ae6cbcb2248b2c331c8a6fe1c057f676c">More...</a><br /></td></tr> |
| <tr class="separator:ae6cbcb2248b2c331c8a6fe1c057f676c"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a2bf6497289e61895072587bd71985ea6"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacelog4cxx_1_1helpers.html#aa808d0071a7cbb3a7e9214ee261c844a">ObjectPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#a2bf6497289e61895072587bd71985ea6">instantiateByClassName</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &className, const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">Class</a> &superClass, const <a class="el" href="namespacelog4cxx_1_1helpers.html#aa808d0071a7cbb3a7e9214ee261c844a">ObjectPtr</a> &defaultValue)</td></tr> |
| <tr class="memdesc:a2bf6497289e61895072587bd71985ea6"><td class="mdescLeft"> </td><td class="mdescRight">Instantiate an object given a class name. <a href="#a2bf6497289e61895072587bd71985ea6">More...</a><br /></td></tr> |
| <tr class="separator:a2bf6497289e61895072587bd71985ea6"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a95d3941c5882b39163dc3f229a2c0317"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacelog4cxx_1_1helpers.html#aa808d0071a7cbb3a7e9214ee261c844a">ObjectPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#a95d3941c5882b39163dc3f229a2c0317">instantiateByKey</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">Properties</a> &props, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &key, const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">Class</a> &superClass, const <a class="el" href="namespacelog4cxx_1_1helpers.html#aa808d0071a7cbb3a7e9214ee261c844a">ObjectPtr</a> &defaultValue)</td></tr> |
| <tr class="separator:a95d3941c5882b39163dc3f229a2c0317"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a03defb93e089056749f0e5523ec6315f"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_option_converter.html#a03defb93e089056749f0e5523ec6315f">selectAndConfigure</a> (const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &configFileName, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &clazz, <a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> &hierarchy)</td></tr> |
| <tr class="memdesc:a03defb93e089056749f0e5523ec6315f"><td class="mdescLeft"> </td><td class="mdescRight">Configure <a class="el" href="namespacelog4cxx.html">log4cxx</a> given a configFileName. <a href="#a03defb93e089056749f0e5523ec6315f">More...</a><br /></td></tr> |
| <tr class="separator:a03defb93e089056749f0e5523ec6315f"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p>A convenience class to convert property values to specific types. </p> |
| </div><h2 class="groupheader">Member Function Documentation</h2> |
| <a class="anchor" id="a84695a8b2e45b1ab42caef5dc65534eb"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> convertSpecialChars </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>s</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a06323a5e7986b04e0799254c8e313b82"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> findAndSubst </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>key</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">Properties</a> & </td> |
| <td class="paramname"><em>props</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Find the value corresponding to <code>key</code> in <code>props</code>. </p> |
| <p>Then perform variable substitution on the found value. </p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ae6cbcb2248b2c331c8a6fe1c057f676c"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> getSystemProperty </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </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> & </td> |
| <td class="paramname"><em>def</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Gets the specified system property. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">key</td><td>The key to search for. </td></tr> |
| <tr><td class="paramname">def</td><td>The default value to return. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>the string value of the system property, or the default value if there is no property with that key. </dd></dl> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a2bf6497289e61895072587bd71985ea6"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="namespacelog4cxx_1_1helpers.html#aa808d0071a7cbb3a7e9214ee261c844a">ObjectPtr</a> instantiateByClassName </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>className</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">Class</a> & </td> |
| <td class="paramname"><em>superClass</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx_1_1helpers.html#aa808d0071a7cbb3a7e9214ee261c844a">ObjectPtr</a> & </td> |
| <td class="paramname"><em>defaultValue</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Instantiate an object given a class name. </p> |
| <p>Check that the <code>className</code> is a subclass of <code>superClass</code>. If that test fails or the object could not be instantiated, then <code>defaultValue</code> is returned.</p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">className</td><td>The fully qualified class name of the object to instantiate. </td></tr> |
| <tr><td class="paramname">superClass</td><td>The class to which the new object should belong. </td></tr> |
| <tr><td class="paramname">defaultValue</td><td>The object to return in case of non-fulfillment </td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a95d3941c5882b39163dc3f229a2c0317"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="namespacelog4cxx_1_1helpers.html#aa808d0071a7cbb3a7e9214ee261c844a">ObjectPtr</a> instantiateByKey </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">Properties</a> & </td> |
| <td class="paramname"><em>props</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>key</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">Class</a> & </td> |
| <td class="paramname"><em>superClass</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx_1_1helpers.html#aa808d0071a7cbb3a7e9214ee261c844a">ObjectPtr</a> & </td> |
| <td class="paramname"><em>defaultValue</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a03defb93e089056749f0e5523ec6315f"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static void selectAndConfigure </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="classlog4cxx_1_1_file.html">File</a> & </td> |
| <td class="paramname"><em>configFileName</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>clazz</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="namespacelog4cxx_1_1spi.html#a7a69119f966029685ef737ca2d3ce0f0">spi::LoggerRepositoryPtr</a> & </td> |
| <td class="paramname"><em>hierarchy</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Configure <a class="el" href="namespacelog4cxx.html">log4cxx</a> given a configFileName. </p> |
| <p>The configFileName must point to a file which will be interpreted by a new instance of a <a class="el" href="namespacelog4cxx.html">log4cxx</a> configurator.</p> |
| <p>All configurations steps are taken on the <code>hierarchy</code> passed as a parameter.</p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">configFileName</td><td>The location of the configuration file. </td></tr> |
| <tr><td class="paramname">clazz</td><td>The classname, of the <a class="el" href="namespacelog4cxx.html">log4cxx</a> configurator which will parse the file <code>configFileName</code>. This must be a subclass of Configurator, or null. If this value is null then a default configurator of <a class="el" href="classlog4cxx_1_1_property_configurator.html" title="Allows the configuration of log4cxx from an external file. ">PropertyConfigurator</a> is used, unless the filename pointed to by <code>configFileName</code> ends in '.xml', in which case DOMConfigurator is used. </td></tr> |
| <tr><td class="paramname">hierarchy</td><td>The <a class="el" href="classlog4cxx_1_1_hierarchy.html" title="This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy...">Hierarchy</a> to act on. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a45b8aeeafeace89385672ffab025e9d1"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> substVars </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>val</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_properties.html">Properties</a> & </td> |
| <td class="paramname"><em>props</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Perform variable substitution in string <code>val</code> from the values of keys found in the system propeties. </p> |
| <p>The variable substitution delimeters are <b>${</b> and <b>}</b>.</p> |
| <p>For example, if the <a class="el" href="classlog4cxx_1_1helpers_1_1_system.html" title="The System class contains several useful class fields and methods. ">System</a> properties contains "key=value", then the call </p><pre> |
| String s = OptionConverter.substituteVars("Value of key is ${key}."); |
| </pre><p>will set the variable <code>s</code> to "Value of key is value.".</p> |
| <p>If no value could be found for the specified key, then the <code>props</code> parameter is searched, if the value could not be found there, then substitution defaults to the empty string.</p> |
| <p>For example, if system propeties contains no value for the key "inexistentKey", then the call</p> |
| <pre> |
| String s = OptionConverter.subsVars("Value of inexistentKey is [${inexistentKey}]"); |
| </pre><p> will set <code>s</code> to "Value of inexistentKey is []"</p> |
| <p>An <a class="el" href="classlog4cxx_1_1helpers_1_1_illegal_argument_exception.html" title="Thrown to indicate that a method has been passed an illegal or inappropriate argument. ">IllegalArgumentException</a> is thrown if <code>val</code> contains a start delimeter "${" which is not balanced by a stop delimeter "}". </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">val</td><td>The string on which variable substitution is performed. </td></tr> |
| <tr><td class="paramname">props</td><td>The properties from which variable substitution is performed. </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_illegal_argument_exception.html" title="Thrown to indicate that a method has been passed an illegal or inappropriate argument. ">IllegalArgumentException</a></td><td>if <code>val</code> is malformed. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a6ea7dcdf1610e5d7e7f3d6004db6ef3c"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static bool toBoolean </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>value</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">bool </td> |
| <td class="paramname"><em>dEfault</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>If <code>value</code> is "true", then <code>true</code> is returned. </p> |
| <p>If <code>value</code> is "false", then <code>true</code> is returned. Otherwise, <code>default</code> is returned.</p> |
| <p>Case of value is unimportant. </p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="af0b5a6bd84b27ef758e7d6d74b362ebf"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static long toFileSize </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>value</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">long </td> |
| <td class="paramname"><em>dEfault</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ac849988e20a74924dae77bc1a6e6e4fb"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static int toInt </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>value</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>dEfault</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a53e994f695af6def12f5caa8b0f2f5de"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="namespacelog4cxx.html#ae5a3f62e1b8b965953cbddfda82c53b5">LevelPtr</a> toLevel </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> |
| <td class="paramname"><em>value</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ae5a3f62e1b8b965953cbddfda82c53b5">LevelPtr</a> & </td> |
| <td class="paramname"><em>defaultValue</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following file:<ul> |
| <li><a class="el" href="optionconverter_8h.html">optionconverter.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> |