GCC Code Coverage Report


Directory: ./
File: src/iguana/services/Object.cc
Date: 2025-03-24 18:50:00
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 201 Object::Object(std::string_view name, Logger::Level lev)
6 201 : m_name(name)
7
1/2
✓ Branch 0 (3→4) taken 201 times.
✗ Branch 1 (3→5) not taken.
201 , m_log(std::make_unique<Logger>(m_name, lev))
8 201 {}
9
10 std::unique_ptr<Logger>& Object::Log()
11 {
12 return m_log;
13 }
14
15 100 void Object::SetName(std::string_view name)
16 {
17 100 m_name = name;
18 100 m_log->m_name = name;
19 100 }
20
21 76 std::string Object::GetName() const
22 {
23 76 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 41 void Object::SetLogLevel(Logger::Level const lev)
32 {
33 41 m_log->SetLevel(lev);
34 41 }
35
36 std::unique_ptr<Logger>& Object::GetLog()
37 {
38 return m_log;
39 }
40 }
41