Iguana 0.0.0
Implementation Guardian of Analysis Algorithms
Loading...
Searching...
No Matches
iguana::Object Class Reference

#include <Object.h>

Detailed Description

A named object with a Logger instance.

Definition at line 11 of file Object.h.

Public Member Functions

 Object (std::string_view name="", Logger::Level lev=Logger::DEFAULT_LEVEL)
 
std::unique_ptr< Logger > & Log ()
 
void SetName (std::string_view name)
 
std::string GetName () const
 
void SetLogLevel (std::string_view lev)
 
void SetLogLevel (Logger::Level const lev)
 
std::unique_ptr< Logger > & GetLog ()
 

Protected Attributes

std::string m_name
 The name of this object.
 
std::unique_ptr< Loggerm_log
 Logger instance for this object
 
Inheritance diagram for iguana::Object:
Inheritance graph

Constructor & Destructor Documentation

◆ Object()

iguana::Object::Object ( std::string_view name = "",
Logger::Level lev = Logger::DEFAULT_LEVEL )
Parameters
namethe name of this object
levthe log level

◆ ~Object()

iguana::Object::~Object ( )
inline

Definition at line 19 of file Object.h.

Member Function Documentation

◆ GetLog()

std::unique_ptr< Logger > & iguana::Object::GetLog ( )
Returns
reference to this object's logger

◆ GetName()

std::string iguana::Object::GetName ( ) const
Returns
the name of this object

◆ Log()

std::unique_ptr< Logger > & iguana::Object::Log ( )

Get the logger

Returns
the logger used by this object

◆ SetLogLevel() [1/2]

void iguana::Object::SetLogLevel ( Logger::Level const lev)

Set the log level to this level. Log messages with a lower level will not be printed.

See also
Logger::Level for available levels.
Parameters
levthe log level

◆ SetLogLevel() [2/2]

void iguana::Object::SetLogLevel ( std::string_view lev)

Set the log level to this level. Log messages with a lower level will not be printed.

See also
Logger::Level for available levels.
Parameters
levthe log level name

◆ SetName()

void iguana::Object::SetName ( std::string_view name)

Change the name of this object

Parameters
namethe new name

Member Data Documentation

◆ m_log

std::unique_ptr<Logger> iguana::Object::m_log
protected

Logger instance for this object

Definition at line 52 of file Object.h.

◆ m_name

std::string iguana::Object::m_name
protected

The name of this object.

Definition at line 49 of file Object.h.


The documentation for this class was generated from the following file: