GCC Code Coverage Report


Directory: ./
File: src/iguana/services/Object.cc
Date: 2025-01-05 09:03:17
Exec Total Coverage
Lines: 16 20 80.0%
Functions: 5 7 71.4%
Branches: 1 2 50.0%

Line Branch Exec Source
1 #include "Object.h"
2
3 namespace iguana {
4
5 186 Object::Object(std::string_view name, Logger::Level lev)
6 186 : m_name(name)
7
1/2
✓ Branch 0 taken 186 times.
✗ Branch 1 not taken.
186 , m_log(std::make_unique<Logger>(m_name, lev))
8 186 {}
9
10 std::unique_ptr<Logger>& Object::Log()
11 {
12 return m_log;
13 }
14
15 89 void Object::SetName(std::string_view name)
16 {
17 89 m_name = name;
18 89 m_log->m_name = name;
19 89 }
20
21 66 std::string Object::GetName() const
22 {
23 66 return m_name;
24 }
25
26 9 void Object::SetLogLevel(std::string_view lev)
27 {
28 9 m_log->SetLevel(lev);
29 9 }
30
31 39 void Object::SetLogLevel(Logger::Level const lev)
32 {
33 39 m_log->SetLevel(lev);
34 39 }
35
36 std::unique_ptr<Logger>& Object::GetLog()
37 {
38 return m_log;
39 }
40 }
41