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;
103  ComponentVector _components;
104 
105  std::string _conversionPattern;
106 };
108 
109 #endif // _LOG4CPP_PATTERNLAYOUT_HH
virtual std::string format(const LoggingEvent &event)=0
Formats the LoggingEvent data to a string that appenders can log.
#define LOG4CPP_NS_END
Definition: Portability.hh:50
The top level namespace for all &#39;Log for C++&#39; types and classes.
Definition: LoggingEvent.hh:32
PatternLayout is a simple fixed format Layout implementation.
static const char * BASIC_CONVERSION_PATTERN
A conversion pattern equivalent to the BasicLayout.
std::string _conversionPattern
#define LOG4CPP_EXPORT
Definition: Export.hh:21
std::vector< PatternComponent * > ComponentVector
Extend this abstract class to create your own log layout format.
Definition: Layout.hh:22
static const char * SIMPLE_CONVERSION_PATTERN
A conversion pattern equivalent to the SimpleLayout.
static const char * TTCC_CONVERSION_PATTERN
A conversion pattern equivalent to the TTCCLayout.
static const char * DEFAULT_CONVERSION_PATTERN
The default conversion pattern.
ComponentVector _components
#define LOG4CPP_NS_BEGIN
Definition: Portability.hh:49


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:41