Scine::Core  3.0.0
Module management and core interface definitions
 All Classes Files Functions Variables Typedefs Pages
ObjectWithLog.h
Go to the documentation of this file.
1 
8 #ifndef INCLUDE_CORE_OBJECT_WITH_LOG_H
9 #define INCLUDE_CORE_OBJECT_WITH_LOG_H
10 
11 #include "Core/ExportControl.h"
12 #include "Core/Log.h"
13 
14 namespace Scine {
15 namespace Core {
16 
25 class CORE_EXPORT ObjectWithLog {
26  public:
28  inline Log& getLog() {
29  return log_;
30  }
31 
33  void setLog(Log log) {
34  log_ = std::move(log);
35  }
36 
37  private:
38  Log log_;
39 };
40 
41 } // namespace Core
42 } // namespace Scine
43 
44 #endif
Base class for objects with a Log member.
Definition: ObjectWithLog.h:25
Multi-domain multi-sink logger.
Definition: Log.h:57
Log & getLog()
Fetches a reference to the owned log instance.
Definition: ObjectWithLog.h:28
void setLog(Log log)
Sets the log instance.
Definition: ObjectWithLog.h:33