Iguana 0.0.0
Implementation Guardian of Analysis Algorithms
Loading...
Searching...
No Matches
Object.h
1#pragma once
2
3#include <memory>
4#include <string>
5
6#include "Logger.h"
7
8namespace iguana {
9
11 class Object
12 {
13
14 public:
15
18 Object(std::string_view name = "", Logger::Level lev = Logger::DEFAULT_LEVEL);
19 ~Object() {}
20
23 std::unique_ptr<Logger>& Log();
24
27 void SetName(std::string_view name);
28
30 std::string GetName() const;
31
35 void SetLogLevel(std::string_view lev);
36
40 void SetLogLevel(Logger::Level const lev);
41
43 std::unique_ptr<Logger>& GetLog();
44
45
46 protected:
47
49 std::string m_name;
50
52 std::unique_ptr<Logger> m_log;
53 };
54}
static Level const DEFAULT_LEVEL
The default log level.
Definition Logger.h:56
A named object with a Logger instance.
Definition Object.h:12
std::unique_ptr< Logger > & GetLog()
void SetLogLevel(std::string_view lev)
void SetName(std::string_view name)
void SetLogLevel(Logger::Level const lev)
std::unique_ptr< Logger > & Log()
std::string m_name
The name of this object.
Definition Object.h:49
std::unique_ptr< Logger > m_log
Logger instance for this object
Definition Object.h:52
std::string GetName() const
Object(std::string_view name="", Logger::Level lev=Logger::DEFAULT_LEVEL)
General, top-level namespace for algorithms and infrastructure. For algorithms and bindings,...
Definition Algorithm.h:14