<!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: DateFormat 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 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 List</span></a></li> | |
<li><a href="annotated.html"><span>Class List</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 class="nav"> | |
<a class="el" href="namespacelog4cxx.html">log4cxx</a>::<a class="el" href="namespacelog4cxx_1_1helpers.html">helpers</a>::<a class="el" href="classlog4cxx_1_1helpers_1_1_date_format.html">DateFormat</a></div> | |
<h1>DateFormat Class Reference</h1><!-- doxytag: class="log4cxx::helpers::DateFormat" --><!-- doxytag: inherits="log4cxx::helpers::ObjectImpl" -->Inherits <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html">ObjectImpl</a>. | |
<p> | |
Inherited by <a class="el" href="classlog4cxx_1_1helpers_1_1_relative_time_date_format.html">RelativeTimeDateFormat</a>, <a class="el" href="classlog4cxx_1_1helpers_1_1_simple_date_format.html">SimpleDateFormat</a>, <a class="el" href="classlog4cxx_1_1helpers_1_1_strftime_date_format.html">StrftimeDateFormat</a>, and <a class="el" href="classlog4cxx_1_1pattern_1_1_cached_date_format.html">CachedDateFormat</a>. | |
<p> | |
<a href="classlog4cxx_1_1helpers_1_1_date_format-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> | |
<a class="el" href="classlog4cxx_1_1helpers_1_1_date_format.html">DateFormat</a> is an abstract class for date/time formatting patterned after java.text.DateFormat. | |
<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 </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_date_format.html#a62fd555fe5202905c53ad8630d8bfec">~DateFormat</a> ()</td></tr> | |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a62fd555fe5202905c53ad8630d8bfec"></a><br></td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_date_format.html#96fc17cefabd50dec2d68967e45d36f1">format</a> (<a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &s, log4cxx_time_t tm, <a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &p) const =0</td></tr> | |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Formats an log4cxx_time_t into a date/time string. <a href="#96fc17cefabd50dec2d68967e45d36f1"></a><br></td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_date_format.html#4eb964c1a542b0bcf877227ec3909414">setTimeZone</a> (const TimeZonePtr &zone)</td></tr> | |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the time zone. <a href="#4eb964c1a542b0bcf877227ec3909414"></a><br></td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_date_format.html#d5f69e832f2e604c0bf64b1fecb9ce82">numberFormat</a> (<a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &s, int n, <a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &p) const </td></tr> | |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Format an integer consistent with the format method. <a href="#d5f69e832f2e604c0bf64b1fecb9ce82"></a><br></td></tr> | |
<tr><td colspan="2"><br><h2>Protected 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_1helpers_1_1_date_format.html#4ed3a759825dfb2e3acacc178dd13416">DateFormat</a> ()</td></tr> | |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#4ed3a759825dfb2e3acacc178dd13416"></a><br></td></tr> | |
</table> | |
<hr><h2>Constructor & Destructor Documentation</h2> | |
<a class="anchor" name="a62fd555fe5202905c53ad8630d8bfec"></a><!-- doxytag: member="log4cxx::helpers::DateFormat::~DateFormat" ref="a62fd555fe5202905c53ad8630d8bfec" 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_1helpers_1_1_date_format.html">DateFormat</a> </td> | |
<td class="md" valign="top">( </td> | |
<td class="mdname1" valign="top" nowrap> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap><code> [virtual]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
Destructor. | |
<p> | |
</td> | |
</tr> | |
</table> | |
<a class="anchor" name="4ed3a759825dfb2e3acacc178dd13416"></a><!-- doxytag: member="log4cxx::helpers::DateFormat::DateFormat" ref="4ed3a759825dfb2e3acacc178dd13416" 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"><a class="el" href="classlog4cxx_1_1helpers_1_1_date_format.html">DateFormat</a> </td> | |
<td class="md" valign="top">( </td> | |
<td class="mdname1" valign="top" nowrap> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap><code> [protected]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
Constructor. | |
<p> | |
</td> | |
</tr> | |
</table> | |
<hr><h2>Member Function Documentation</h2> | |
<a class="anchor" name="96fc17cefabd50dec2d68967e45d36f1"></a><!-- doxytag: member="log4cxx::helpers::DateFormat::format" ref="96fc17cefabd50dec2d68967e45d36f1" args="(LogString &s, log4cxx_time_t tm, log4cxx::helpers::Pool &p) const =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 format </td> | |
<td class="md" valign="top">( </td> | |
<td class="md" nowrap valign="top"><a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> | |
<td class="mdname" nowrap> <em>s</em>, </td> | |
</tr> | |
<tr> | |
<td class="md" nowrap align="right"></td> | |
<td class="md"></td> | |
<td class="md" nowrap>log4cxx_time_t </td> | |
<td class="mdname" nowrap> <em>tm</em>, </td> | |
</tr> | |
<tr> | |
<td class="md" nowrap align="right"></td> | |
<td class="md"></td> | |
<td class="md" nowrap><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> & </td> | |
<td class="mdname" nowrap> <em>p</em></td> | |
</tr> | |
<tr> | |
<td class="md"></td> | |
<td class="md">) </td> | |
<td class="md" colspan="2"> const<code> [pure virtual]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
Formats an log4cxx_time_t into a date/time string. | |
<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>s</em> </td><td>string to which the date/time string is appended. </td></tr> | |
<tr><td valign="top"></td><td valign="top"><em>tm</em> </td><td>date to be formatted. </td></tr> | |
<tr><td valign="top"></td><td valign="top"><em>p</em> </td><td>memory pool used during formatting. </td></tr> | |
</table> | |
</dl> | |
<p> | |
Implemented in <a class="el" href="classlog4cxx_1_1pattern_1_1_cached_date_format.html#a7657d218e7a6847b2160d87ae4389c0">CachedDateFormat</a>, <a class="el" href="classlog4cxx_1_1helpers_1_1_relative_time_date_format.html#cf35afd137bc3c07de6c16c83c650220">RelativeTimeDateFormat</a>, <a class="el" href="classlog4cxx_1_1helpers_1_1_simple_date_format.html#cf35afd137bc3c07de6c16c83c650220">SimpleDateFormat</a>, and <a class="el" href="classlog4cxx_1_1helpers_1_1_strftime_date_format.html#cf35afd137bc3c07de6c16c83c650220">StrftimeDateFormat</a>. </td> | |
</tr> | |
</table> | |
<a class="anchor" name="d5f69e832f2e604c0bf64b1fecb9ce82"></a><!-- doxytag: member="log4cxx::helpers::DateFormat::numberFormat" ref="d5f69e832f2e604c0bf64b1fecb9ce82" args="(LogString &s, int n, log4cxx::helpers::Pool &p) const " --><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 numberFormat </td> | |
<td class="md" valign="top">( </td> | |
<td class="md" nowrap valign="top"><a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> | |
<td class="mdname" nowrap> <em>s</em>, </td> | |
</tr> | |
<tr> | |
<td class="md" nowrap align="right"></td> | |
<td class="md"></td> | |
<td class="md" nowrap>int </td> | |
<td class="mdname" nowrap> <em>n</em>, </td> | |
</tr> | |
<tr> | |
<td class="md" nowrap align="right"></td> | |
<td class="md"></td> | |
<td class="md" nowrap><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> & </td> | |
<td class="mdname" nowrap> <em>p</em></td> | |
</tr> | |
<tr> | |
<td class="md"></td> | |
<td class="md">) </td> | |
<td class="md" colspan="2"> const<code> [virtual]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
Format an integer consistent with the format method. | |
<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>s</em> </td><td>string to which the numeric string is appended. </td></tr> | |
<tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>integer value. </td></tr> | |
<tr><td valign="top"></td><td valign="top"><em>p</em> </td><td>memory pool used during formatting. </td></tr> | |
</table> | |
</dl> | |
<dl compact><dt><b>Remarks:</b></dt><dd>This method is used by CachedDateFormat to format the milliseconds. </dd></dl> | |
<p> | |
Reimplemented in <a class="el" href="classlog4cxx_1_1pattern_1_1_cached_date_format.html#d5f69e832f2e604c0bf64b1fecb9ce82">CachedDateFormat</a>. </td> | |
</tr> | |
</table> | |
<a class="anchor" name="4eb964c1a542b0bcf877227ec3909414"></a><!-- doxytag: member="log4cxx::helpers::DateFormat::setTimeZone" ref="4eb964c1a542b0bcf877227ec3909414" args="(const TimeZonePtr &zone)" --><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 setTimeZone </td> | |
<td class="md" valign="top">( </td> | |
<td class="md" nowrap valign="top">const TimeZonePtr & </td> | |
<td class="mdname1" valign="top" nowrap> <em>zone</em> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap><code> [virtual]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
Sets the time zone. | |
<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>zone</em> </td><td>the given new time zone. </td></tr> | |
</table> | |
</dl> | |
<p> | |
Reimplemented in <a class="el" href="classlog4cxx_1_1helpers_1_1_simple_date_format.html#3ade83b8918728e2a05ee6ede0ba6d9f">SimpleDateFormat</a>, and <a class="el" href="classlog4cxx_1_1helpers_1_1_strftime_date_format.html#3ade83b8918728e2a05ee6ede0ba6d9f">StrftimeDateFormat</a>. </td> | |
</tr> | |
</table> | |
<hr>The documentation for this class was generated from the following file:<ul> | |
<li><a class="el" href="dateformat_8h.html">dateformat.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> |