1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>log4cpp: PatternLayout.hh Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<div class="nav">
<a class="el" href="dir_000001.html">include</a> / <a class="el" href="dir_000002.html">log4cpp</a></div>
<h1>PatternLayout.hh</h1><a href="PatternLayout_8hh.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
00002 <span class="comment"> * PatternLayout.hh</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * Copyright 2002, Bastiaan Bakker. All rights reserved.</span>
00005 <span class="comment"> *</span>
00006 <span class="comment"> * See the COPYING file for the terms of usage and distribution.</span>
00007 <span class="comment"> */</span>
00008
00009 <span class="preprocessor">#ifndef _LOG4CPP_PATTERNLAYOUT_HH</span>
00010 <span class="preprocessor"></span><span class="preprocessor">#define _LOG4CPP_PATTERNLAYOUT_HH</span>
00011 <span class="preprocessor"></span>
00012 <span class="preprocessor">#include <<a class="code" href="Portability_8hh.html">log4cpp/Portability.hh</a>></span>
00013 <span class="preprocessor">#include <<a class="code" href="Layout_8hh.html">log4cpp/Layout.hh</a>></span>
00014 <span class="preprocessor">#include <<a class="code" href="Configurator_8hh.html">log4cpp/Configurator.hh</a>></span>
00015 <span class="preprocessor">#include <vector></span>
00016 <span class="preprocessor">#ifdef LOG4CPP_HAVE_SSTREAM</span>
00017 <span class="preprocessor"></span><span class="preprocessor">#include <sstream></span>
00018 <span class="preprocessor">#endif</span>
00019 <span class="preprocessor"></span>
00020 <span class="keyword">namespace </span>log4cpp {
00021
<a name="l00025"></a><a class="code" href="classlog4cpp_1_1PatternLayout.html">00025</a> <span class="keyword">class </span><a class="code" href="Export_8hh.html#a0">LOG4CPP_EXPORT</a> PatternLayout : <span class="keyword">public</span> <a class="code" href="classlog4cpp_1_1Layout.html">Layout</a> {
00026 <span class="keyword">public</span>:
00030 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* DEFAULT_CONVERSION_PATTERN;
00031
00035 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* SIMPLE_CONVERSION_PATTERN;
00036
00040 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* BASIC_CONVERSION_PATTERN;
00041
00046 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* TTCC_CONVERSION_PATTERN;
00047
00048 PatternLayout();
00049 <span class="keyword">virtual</span> ~PatternLayout();
00050
00051 <span class="comment">// NOTE: All double percentage signs ('%%') followed by a character</span>
00052 <span class="comment">// in the following comments should actually be a single char.</span>
00053 <span class="comment">// The doubles are included so that doxygen will print them correctly.</span>
00059 <span class="comment"></span> <span class="keyword">virtual</span> std::string format(<span class="keyword">const</span> <a class="code" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a>& event);
00060
00084 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setConversionPattern(<span class="keyword">const</span> std::string& conversionPattern)
00085 <span class="keywordflow">throw</span>(<a class="code" href="classlog4cpp_1_1ConfigureFailure.html">ConfigureFailure</a>);
00086
00087 <span class="keyword">virtual</span> std::string getConversionPattern() <span class="keyword">const</span>;
00088
00089 <span class="keyword">virtual</span> <span class="keywordtype">void</span> clearConversionPattern();
00090
<a name="l00091"></a><a class="code" href="classlog4cpp_1_1PatternLayout_1_1PatternComponent.html">00091</a> <span class="keyword">class </span><a class="code" href="Export_8hh.html#a0">LOG4CPP_EXPORT</a> PatternComponent {
00092 <span class="keyword">public</span>:
<a name="l00093"></a><a class="code" href="classlog4cpp_1_1PatternLayout_1_1PatternComponent.html#a0">00093</a> <span class="keyword">inline</span> <span class="keyword">virtual</span> ~PatternComponent() {};
00094 <span class="keyword">virtual</span> <span class="keywordtype">void</span> append(<a class="code" href="classstd_1_1ostringstream.html">std::ostringstream</a>& out, <span class="keyword">const</span> <a class="code" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a>& event) = 0;
00095 };
00096
00097 <span class="keyword">private</span>:
00098 <span class="keyword">typedef</span> std::vector<PatternComponent*> ComponentVector;
00099 ComponentVector _components;
00100
00101 std::string _conversionPattern;
00102 };
00103 }
00104
00105 <span class="preprocessor">#endif // _LOG4CPP_PATTERNLAYOUT_HH</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Jul 29 14:07:33 2005 for log4cpp by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
|