diff options
author | gabime <gmelman1@gmail.com> | 2016-04-03 02:14:54 +0300 |
---|---|---|
committer | gabime <gmelman1@gmail.com> | 2016-04-03 02:14:54 +0300 |
commit | 495ecaeaee527c5e1468b0479d0d546346fe7665 (patch) | |
tree | 08000321b01eff0df4739f139e7a4961959d5826 /include/spdlog/formatter.h | |
parent | 9230d9e63d1b060a4f40677319b4e38f92e15f9a (diff) |
astyle
Diffstat (limited to 'include/spdlog/formatter.h')
-rw-r--r-- | include/spdlog/formatter.h | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/include/spdlog/formatter.h b/include/spdlog/formatter.h index 0ffcec03..ffbc7eb2 100644 --- a/include/spdlog/formatter.h +++ b/include/spdlog/formatter.h @@ -1,45 +1,45 @@ -// -// Copyright(c) 2015 Gabi Melman. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) -// - -#pragma once - -#include <spdlog/details/log_msg.h> - -#include <vector> -#include <string> -#include <memory> - -namespace spdlog -{ -namespace details -{ -class flag_formatter; -} - -class formatter -{ -public: - virtual ~formatter() {} - virtual void format(details::log_msg& msg) = 0; -}; - -class pattern_formatter : public formatter -{ - -public: - explicit pattern_formatter(const std::string& pattern); - pattern_formatter(const pattern_formatter&) = delete; - pattern_formatter& operator=(const pattern_formatter&) = delete; - void format(details::log_msg& msg) override; -private: - const std::string _pattern; - std::vector<std::unique_ptr<details::flag_formatter>> _formatters; - void handle_flag(char flag); - void compile_pattern(const std::string& pattern); -}; -} - -#include <spdlog/details/pattern_formatter_impl.h> - +//
+// Copyright(c) 2015 Gabi Melman.
+// Distributed under the MIT License (http://opensource.org/licenses/MIT)
+//
+
+#pragma once
+
+#include <spdlog/details/log_msg.h>
+
+#include <vector>
+#include <string>
+#include <memory>
+
+namespace spdlog
+{
+namespace details
+{
+class flag_formatter;
+}
+
+class formatter
+{
+public:
+ virtual ~formatter() {}
+ virtual void format(details::log_msg& msg) = 0;
+};
+
+class pattern_formatter : public formatter
+{
+
+public:
+ explicit pattern_formatter(const std::string& pattern);
+ pattern_formatter(const pattern_formatter&) = delete;
+ pattern_formatter& operator=(const pattern_formatter&) = delete;
+ void format(details::log_msg& msg) override;
+private:
+ const std::string _pattern;
+ std::vector<std::unique_ptr<details::flag_formatter>> _formatters;
+ void handle_flag(char flag);
+ void compile_pattern(const std::string& pattern);
+};
+}
+
+#include <spdlog/details/pattern_formatter_impl.h>
+
|