All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PatternLayout.hh
Go to the documentation of this file.
1 /*
2  * PatternLayout.hh
3  *
4  * Copyright 2002, Bastiaan Bakker. All rights reserved.
5  *
6  * See the COPYING file for the terms of usage and distribution.
7  */
8 
9 #ifndef _LOG4CPP_PATTERNLAYOUT_HH
10 #define _LOG4CPP_PATTERNLAYOUT_HH
11 
12 #include "Base/GCException.h"
13 #include <log4cpp/Portability.hh>
14 #include <log4cpp/Layout.hh>
15 #include <log4cpp/Configurator.hh>
16 #include <vector>
17 #ifdef LOG4CPP_HAVE_SSTREAM
18 #include <sstream>
19 #endif
20 
22 
27 public:
31  static const char* DEFAULT_CONVERSION_PATTERN;
32 
36  static const char* SIMPLE_CONVERSION_PATTERN;
37 
41  static const char* BASIC_CONVERSION_PATTERN;
42 
47  static const char* TTCC_CONVERSION_PATTERN;
48 
49  PatternLayout();
50  virtual ~PatternLayout();
51 
52  // NOTE: All double percentage signs ('%%') followed by a character
53  // in the following comments should actually be a single char.
54  // The doubles are included so that doxygen will print them correctly.
60  virtual std::string format(const LoggingEvent& event);
61 
85  virtual void setConversionPattern(const std::string& conversionPattern);
86  //throw (GenICam::InvalidArgumentException);
87 
88  virtual void setConversionPattern(const char* conversionPattern);
89  //throw (GenICam::InvalidArgumentException);
90 
91  virtual std::string getConversionPattern() const;
92 
93  virtual void clearConversionPattern();
94 
96  public:
97  inline virtual ~PatternComponent() {};
98  virtual void append(std::ostringstream& out, const LoggingEvent& event) = 0;
99  };
100 
101 private:
102  typedef std::vector<PatternComponent*> ComponentVector;
104 
105  std::string _conversionPattern;
106 };
108 
109 #endif // _LOG4CPP_PATTERNLAYOUT_HH
LoggingEvent
The top level namespace for all 'Log for C++' types and classes.
Definition: LoggingEvent.hh:32
Portability.hh
PatternLayout::PatternComponent
Definition: PatternLayout.hh:95
Layout
Extend this abstract class to create your own log layout format.
Definition: Layout.hh:22
Layout.hh
PatternLayout::BASIC_CONVERSION_PATTERN
static const char * BASIC_CONVERSION_PATTERN
A conversion pattern equivalent to the BasicLayout.
Definition: PatternLayout.hh:41
PatternLayout::PatternComponent::~PatternComponent
virtual ~PatternComponent()
Definition: PatternLayout.hh:97
PatternLayout::TTCC_CONVERSION_PATTERN
static const char * TTCC_CONVERSION_PATTERN
A conversion pattern equivalent to the TTCCLayout.
Definition: PatternLayout.hh:47
PatternLayout::DEFAULT_CONVERSION_PATTERN
static const char * DEFAULT_CONVERSION_PATTERN
The default conversion pattern.
Definition: PatternLayout.hh:31
PatternLayout::_conversionPattern
std::string _conversionPattern
Definition: PatternLayout.hh:105
Configurator.hh
LOG4CPP_NS_BEGIN
#define LOG4CPP_NS_BEGIN
Definition: Portability.hh:49
PatternLayout::ComponentVector
std::vector< PatternComponent * > ComponentVector
Definition: PatternLayout.hh:102
LOG4CPP_NS_END
#define LOG4CPP_NS_END
Definition: Portability.hh:50
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition: Export.hh:21
PatternLayout
PatternLayout is a simple fixed format Layout implementation.
Definition: PatternLayout.hh:26
PatternLayout::_components
ComponentVector _components
Definition: PatternLayout.hh:103
std::ostringstream
Definition: Portability.hh:42
GCException.h
Layout::format
virtual std::string format(const LoggingEvent &event)=0
Formats the LoggingEvent data to a string that appenders can log.
PatternLayout::SIMPLE_CONVERSION_PATTERN
static const char * SIMPLE_CONVERSION_PATTERN
A conversion pattern equivalent to the SimpleLayout.
Definition: PatternLayout.hh:36


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11