blob: bb8c0f785a34a63ed188b8678ed089711c340953 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
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.
--><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache log4cxx: OptionHandler Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;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 id="current"><a href="classes.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="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
<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="nav">
<a class="el" href="namespacelog4cxx.html">log4cxx</a>::<a class="el" href="namespacelog4cxx_1_1spi.html">spi</a>::<a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html">OptionHandler</a></div>
<h1>OptionHandler Class Reference</h1><!-- doxytag: class="log4cxx::spi::OptionHandler" --><!-- doxytag: inherits="log4cxx::helpers::Object" -->Inherits <a class="el" href="classlog4cxx_1_1helpers_1_1_object.html">Object</a>.
<p>
Inherited by <a class="el" href="classlog4cxx_1_1_appender.html">Appender</a><code> [virtual]</code>, <a class="el" href="classlog4cxx_1_1_layout.html">Layout</a><code> [virtual]</code>, <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_policy.html">RollingPolicy</a><code> [virtual]</code>, <a class="el" href="classlog4cxx_1_1rolling_1_1_triggering_policy.html">TriggeringPolicy</a><code> [virtual]</code>, <a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html">ErrorHandler</a><code> [virtual]</code>, and <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html">Filter</a><code> [virtual]</code>.
<p>
<a href="classlog4cxx_1_1spi_1_1_option_handler-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
A string based interface to configure package components.
<p>
<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">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html#d773ac49843844af53fe553912ed63e5">~OptionHandler</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="classlog4cxx_1_1spi_1_1_option_handler.html#f04d4bfbd66b46083b1aa042fdafbb06">activateOptions</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;p)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Activate the options that were previously set with calls to option setters. <a href="#f04d4bfbd66b46083b1aa042fdafbb06"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html#8f2ae2ded63f80c627269c99b20c19ee">setOption</a> (const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;option, const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set <code>option</code> to <code>value</code>. <a href="#8f2ae2ded63f80c627269c99b20c19ee"></a><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="d773ac49843844af53fe553912ed63e5"></a><!-- doxytag: member="log4cxx::spi::OptionHandler::~OptionHandler" ref="d773ac49843844af53fe553912ed63e5" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual ~<a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html">OptionHandler</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="f04d4bfbd66b46083b1aa042fdafbb06"></a><!-- doxytag: member="log4cxx::spi::OptionHandler::activateOptions" ref="f04d4bfbd66b46083b1aa042fdafbb06" args="(log4cxx::helpers::Pool &amp;p)=0" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual void activateOptions </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>p</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Activate the options that were previously set with calls to option setters.
<p>
This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.<p>
For example, the <a class="el" href="classlog4cxx_1_1_file_appender.html">FileAppender</a> has the <a class="el" href="classlog4cxx_1_1_file_appender.html#6a6c98222ccf2072dad5a434f9336930">File</a> and <a class="el" href="classlog4cxx_1_1_file_appender.html#78ebca211ceb3a0b2960a48092089906">Append</a> options both of which are ambigous until the other is also set.
<p>
Implemented in <a class="el" href="classlog4cxx_1_1_appender_skeleton.html#be1aa95ede9cc9d0609905154129c0ba">AppenderSkeleton</a>, <a class="el" href="classlog4cxx_1_1_console_appender.html#a3df68f8aae152299471992071e202f5">ConsoleAppender</a>, <a class="el" href="classlog4cxx_1_1_daily_rolling_file_appender.html#580abdcb8fd42d07eaf679166f77bc34">DailyRollingFileAppender</a>, <a class="el" href="classlog4cxx_1_1db_1_1_o_d_b_c_appender.html#f1f3ced78d335ec9c2b800d6d5aa3ef8">ODBCAppender</a>, <a class="el" href="classlog4cxx_1_1_file_appender.html#a3df68f8aae152299471992071e202f5">FileAppender</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#a3df68f8aae152299471992071e202f5">ExpressionFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_location_info_filter.html#580abdcb8fd42d07eaf679166f77bc34">LocationInfoFilter</a>, <a class="el" href="classlog4cxx_1_1helpers_1_1_date_layout.html#f1f3ced78d335ec9c2b800d6d5aa3ef8">DateLayout</a>, <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html#a3df68f8aae152299471992071e202f5">OnlyOnceErrorHandler</a>, <a class="el" href="classlog4cxx_1_1_h_t_m_l_layout.html#be1aa95ede9cc9d0609905154129c0ba">HTMLLayout</a>, <a class="el" href="classlog4cxx_1_1net_1_1_s_m_t_p_appender.html#f1f3ced78d335ec9c2b800d6d5aa3ef8">SMTPAppender</a>, <a class="el" href="classlog4cxx_1_1net_1_1_socket_appender_skeleton.html#a3df68f8aae152299471992071e202f5">SocketAppenderSkeleton</a>, <a class="el" href="classlog4cxx_1_1net_1_1_socket_hub_appender.html#f1f3ced78d335ec9c2b800d6d5aa3ef8">SocketHubAppender</a>, <a class="el" href="classlog4cxx_1_1net_1_1_syslog_appender.html#a3df68f8aae152299471992071e202f5">SyslogAppender</a>, <a class="el" href="classlog4cxx_1_1net_1_1_telnet_appender.html#a3df68f8aae152299471992071e202f5">TelnetAppender</a>, <a class="el" href="classlog4cxx_1_1nt_1_1_n_t_event_log_appender.html#f1f3ced78d335ec9c2b800d6d5aa3ef8">NTEventLogAppender</a>, <a class="el" href="classlog4cxx_1_1_pattern_layout.html#f1f3ced78d335ec9c2b800d6d5aa3ef8">PatternLayout</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_filter_based_triggering_policy.html#580abdcb8fd42d07eaf679166f77bc34">FilterBasedTriggeringPolicy</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_fixed_window_rolling_policy.html#a3df68f8aae152299471992071e202f5">FixedWindowRollingPolicy</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_manual_triggering_policy.html#580abdcb8fd42d07eaf679166f77bc34">ManualTriggeringPolicy</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender_skeleton.html#580abdcb8fd42d07eaf679166f77bc34">RollingFileAppenderSkeleton</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_policy_base.html#f04d4bfbd66b46083b1aa042fdafbb06">RollingPolicyBase</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_size_based_triggering_policy.html#580abdcb8fd42d07eaf679166f77bc34">SizeBasedTriggeringPolicy</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_time_based_rolling_policy.html#580abdcb8fd42d07eaf679166f77bc34">TimeBasedRollingPolicy</a>, <a class="el" href="classlog4cxx_1_1_rolling_file_appender.html#75035ac63aad24ddcbb340ddaba57f1c">RollingFileAppender</a>, <a class="el" href="classlog4cxx_1_1_simple_layout.html#be1aa95ede9cc9d0609905154129c0ba">SimpleLayout</a>, <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a3df68f8aae152299471992071e202f5">Filter</a>, <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html#a3df68f8aae152299471992071e202f5">FallbackErrorHandler</a>, <a class="el" href="classlog4cxx_1_1_writer_appender.html#9fe8531491720e83f1d25862d918a37d">WriterAppender</a>, and <a class="el" href="classlog4cxx_1_1xml_1_1_x_m_l_layout.html#580abdcb8fd42d07eaf679166f77bc34">XMLLayout</a>. </td>
</tr>
</table>
<a class="anchor" name="8f2ae2ded63f80c627269c99b20c19ee"></a><!-- doxytag: member="log4cxx::spi::OptionHandler::setOption" ref="8f2ae2ded63f80c627269c99b20c19ee" args="(const LogString &amp;option, const LogString &amp;value)=0" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual void setOption </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>option</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set <code>option</code> to <code>value</code>.
<p>
The handling of each option depends on the <a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html">OptionHandler</a> instance. Some options may become active immediately whereas other may be activated only when <a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html#f04d4bfbd66b46083b1aa042fdafbb06">activateOptions</a> is called.
<p>
Implemented in <a class="el" href="classlog4cxx_1_1_appender_skeleton.html#ee5023c29cca9dc68164b22a01cb7c6e">AppenderSkeleton</a>, <a class="el" href="classlog4cxx_1_1_async_appender.html#c1d269357907e0809687a2bec962e1c8">AsyncAppender</a>, <a class="el" href="classlog4cxx_1_1_console_appender.html#c1d269357907e0809687a2bec962e1c8">ConsoleAppender</a>, <a class="el" href="classlog4cxx_1_1_daily_rolling_file_appender.html#c1d269357907e0809687a2bec962e1c8">DailyRollingFileAppender</a>, <a class="el" href="classlog4cxx_1_1db_1_1_o_d_b_c_appender.html#ee5023c29cca9dc68164b22a01cb7c6e">ODBCAppender</a>, <a class="el" href="classlog4cxx_1_1_file_appender.html#c1d269357907e0809687a2bec962e1c8">FileAppender</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_level_match_filter.html#ee5023c29cca9dc68164b22a01cb7c6e">LevelMatchFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_level_range_filter.html#ee5023c29cca9dc68164b22a01cb7c6e">LevelRangeFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#ee5023c29cca9dc68164b22a01cb7c6e">StringMatchFilter</a>, <a class="el" href="classlog4cxx_1_1helpers_1_1_date_layout.html#ee5023c29cca9dc68164b22a01cb7c6e">DateLayout</a>, <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html#c1d269357907e0809687a2bec962e1c8">OnlyOnceErrorHandler</a>, <a class="el" href="classlog4cxx_1_1_h_t_m_l_layout.html#ee5023c29cca9dc68164b22a01cb7c6e">HTMLLayout</a>, <a class="el" href="classlog4cxx_1_1net_1_1_s_m_t_p_appender.html#ee5023c29cca9dc68164b22a01cb7c6e">SMTPAppender</a>, <a class="el" href="classlog4cxx_1_1net_1_1_socket_appender_skeleton.html#c1d269357907e0809687a2bec962e1c8">SocketAppenderSkeleton</a>, <a class="el" href="classlog4cxx_1_1net_1_1_socket_hub_appender.html#ee5023c29cca9dc68164b22a01cb7c6e">SocketHubAppender</a>, <a class="el" href="classlog4cxx_1_1net_1_1_syslog_appender.html#c1d269357907e0809687a2bec962e1c8">SyslogAppender</a>, <a class="el" href="classlog4cxx_1_1net_1_1_telnet_appender.html#ee5023c29cca9dc68164b22a01cb7c6e">TelnetAppender</a>, <a class="el" href="classlog4cxx_1_1nt_1_1_n_t_event_log_appender.html#ee5023c29cca9dc68164b22a01cb7c6e">NTEventLogAppender</a>, <a class="el" href="classlog4cxx_1_1_pattern_layout.html#ee5023c29cca9dc68164b22a01cb7c6e">PatternLayout</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_filter_based_triggering_policy.html#c1d269357907e0809687a2bec962e1c8">FilterBasedTriggeringPolicy</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_fixed_window_rolling_policy.html#c1d269357907e0809687a2bec962e1c8">FixedWindowRollingPolicy</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_manual_triggering_policy.html#c1d269357907e0809687a2bec962e1c8">ManualTriggeringPolicy</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_policy_base.html#ee5023c29cca9dc68164b22a01cb7c6e">RollingPolicyBase</a>, <a class="el" href="classlog4cxx_1_1rolling_1_1_size_based_triggering_policy.html#c1d269357907e0809687a2bec962e1c8">SizeBasedTriggeringPolicy</a>, <a class="el" href="classlog4cxx_1_1_rolling_file_appender.html#ee5023c29cca9dc68164b22a01cb7c6e">RollingFileAppender</a>, <a class="el" href="classlog4cxx_1_1_simple_layout.html#91b2dd02b1392a02b110894e801514b7">SimpleLayout</a>, <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#c1d269357907e0809687a2bec962e1c8">Filter</a>, <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html#c1d269357907e0809687a2bec962e1c8">FallbackErrorHandler</a>, <a class="el" href="classlog4cxx_1_1_writer_appender.html#c1d269357907e0809687a2bec962e1c8">WriterAppender</a>, and <a class="el" href="classlog4cxx_1_1xml_1_1_x_m_l_layout.html#ee5023c29cca9dc68164b22a01cb7c6e">XMLLayout</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="optionhandler_8h.html">optionhandler.h</a></ul>
<!--
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>