From 3a5a0e7b42d34baa238895f9e4d86cfd902ace7d Mon Sep 17 00:00:00 2001 From: TravisBot <> Date: Sat, 23 Dec 2017 00:51:44 +0000 Subject: [Travis] Rebuilding documentation --- logsink_8h_source.html | 228 ------------------------------------------------- 1 file changed, 228 deletions(-) delete mode 100644 logsink_8h_source.html (limited to 'logsink_8h_source.html') diff --git a/logsink_8h_source.html b/logsink_8h_source.html deleted file mode 100644 index 24a05458..00000000 --- a/logsink_8h_source.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - -YAGE: yage/core/logsink.h Source File - - - - - - - - - - - - - -
-
- - - - - - -
-
YAGE -  v0.1.3 -
-
Yet Another Game Engine
-
-
- - - - - -
-
- -
-
-
- -
- -
- All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
- - -
- -
- -
-
-
logsink.h
-
-
-Go to the documentation of this file.
1 
-
9 
-
11 #ifndef YAGE_CORE_LOGSINK_H
-
12 #define YAGE_CORE_LOGSINK_H
-
13 
-
15 #include "logmessage.h"
-
16 
-
17 #include <memory>
-
18 #include <string>
-
19 
-
20 namespace yage
-
21 {
-
22 
-
23 class LogSink
-
24 {
-
25 public:
-
26  template <typename T>
-
27  LogSink(T impl);
-
28 
-
29  LogSink(const LogSink &sink);
-
30  LogSink(LogSink &&sink);
-
31 
-
32  LogSink &operator=(const LogSink &sink);
-
33  LogSink &operator=(LogSink &&sink);
-
34  bool operator==(const LogSink &sink);
-
35 
-
36  void write(const LogMessage::Meta &meta, const std::string &msg) const;
-
37 
-
38 private:
-
39  struct Concept {
-
40  virtual ~Concept() = default;
-
41 
-
42  virtual Concept *clone() const = 0;
-
43  virtual void write(const LogMessage::Meta &meta,
-
44  const std::string &msg) const = 0;
-
45  };
-
46 
-
47  template <typename T>
-
48  struct Model : Concept {
-
49  Model(T impl_i);
-
50  virtual Concept *clone() const override;
-
51  virtual void write(const LogMessage::Meta &meta,
-
52  const std::string &msg) const override;
-
53 
-
54  T impl;
-
55  };
-
56 
-
57  std::unique_ptr<Concept> wrapper_;
-
58 };
-
59 
- -
61 
-
62 LogSink makeFileSink(const std::string &filename);
-
63 LogSink makeFileSink(std::string &&filename);
-
64 
-
65 /* -----------------------------------------------------------------------------
-
66  * Template Implementation
-
67  * -----------------------------------------------------------------------------
-
68  */
-
69 
-
70 template <typename T>
-
71 LogSink::LogSink(T impl) : wrapper_(new Model<T>(std::move(impl)))
-
72 {
-
73 }
-
74 
-
75 template <typename T>
-
76 LogSink::Model<T>::Model(T impl_i) : impl(impl_i)
-
77 {
-
78 }
-
79 
-
80 template <typename T>
- -
82 {
-
83  return new Model<T>(impl);
-
84 }
-
85 
-
86 template <typename T>
- -
88  const std::string &msg) const
-
89 {
-
90  impl(meta, msg);
-
91 }
-
92 
-
93 } // namespace yage
-
94 
-
95 #endif
-
std::unique_ptr< Concept > wrapper_
Definition: logsink.h:57
-
virtual Concept * clone() const override
Definition: logsink.h:81
-
T impl
Definition: logsink.h:54
-
virtual void write(const LogMessage::Meta &meta, const std::string &msg) const override
Definition: logsink.h:87
-
LogSink makeConsoleSink()
Definition: logsink.cpp:46
-
LogSink(T impl)
Definition: logsink.h:71
-
LogSink makeFileSink(const std::string &filename)
Definition: logsink.cpp:95
-
Model(T impl_i)
Definition: logsink.h:76
-
void write(const LogMessage::Meta &meta, const std::string &msg) const
Definition: logsink.cpp:41
-
virtual Concept * clone() const =0
-
Definition: logsink.h:39
-
virtual ~Concept()=default
-
LogSink & operator=(const LogSink &sink)
Definition: logsink.cpp:24
- -
virtual void write(const LogMessage::Meta &meta, const std::string &msg) const =0
-
Definition: logmessage.h:36
-
bool operator==(const LogSink &sink)
Definition: logsink.cpp:36
-
Definition: logsink.h:48
-
Definition: logsink.h:23
-
-
- - - - -- cgit