19#ifndef _LOG4CXX_HELPER_PATTERN_CONVERTER_H
20#define _LOG4CXX_HELPER_PATTERN_CONVERTER_H
34typedef std::function<PatternConverterPtr(
const std::vector<LogString>& options)>
PatternConstructor;
35typedef std::map<LogString, PatternConstructor>
PatternMap;
55 static const logchar ESCAPE_CHAR;
87 static size_t extractConverter(
88 logchar lastChar,
const LogString& pattern,
89 LogString::size_type i,
LogString& convBuf,
99 static size_t extractOptions(
const LogString& pattern, LogString::size_type i,
100 std::vector<LogString>& options);
112 std::vector<PatternConverterPtr>& patternConverters,
113 std::vector<FormattingInfoPtr>& formattingInfos,
128 static PatternConverterPtr createConverter(
132 std::vector<LogString>& options);
147 static size_t finalizeConverter(
148 logchar c,
const LogString& pattern,
size_t i,
151 std::vector<PatternConverterPtr>& patternConverters,
152 std::vector<FormattingInfoPtr>& formattingInfos);
154 static bool isUnicodeIdentifierStart(logchar c);
155 static bool isUnicodeIdentifierPart(logchar c);
Most of the work of the PatternLayout class is delegated to the PatternParser class.
Definition: patternparser.h:51
static void parse(const LogString &pattern, std::vector< PatternConverterPtr > &patternConverters, std::vector< FormattingInfoPtr > &formattingInfos, const PatternMap &rules)
Parse a format specifier.
#define LOG4CXX_EXPORT
Definition: log4cxx.h:101
#define LOG4CXX_NS
Definition: log4cxx.h:104
std::function< PatternConverterPtr(const std::vector< LogString > &options)> PatternConstructor
Definition: patternparser.h:34
std::map< LogString, PatternConstructor > PatternMap
Definition: patternparser.h:35
std::shared_ptr< FormattingInfo > FormattingInfoPtr
Definition: formattinginfo.h:32
std::basic_string< logchar > LogString
Definition: logstring.h:60