utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
utility::logging::Loggable< ClassType, LoggerType > Class Template Reference

Mixin base class providing logging capabilities to derived classes. More...

#include <headers/utility/logging/loggable.hpp>

Public Member Functions

virtual ~Loggable (void)=default
 Virtual destructor for proper cleanup.
 

Protected Member Functions

 Loggable (void)
 Construct a Loggable with the specified LoggerType.
 
 Loggable (Loggable &&other) noexcept
 Move constructor for Loggable.
 
Loggableoperator= (Loggable &&other) noexcept
 Move assignment operator for Loggable.
 
LoggerType & getLogger (void)
 Get the internal logger.
 
LoggerType & getLogger (void) const
 Get the internal logger.
 

Detailed Description

template<typename ClassType, InheritFromLogger LoggerType>
class utility::logging::Loggable< ClassType, LoggerType >

Mixin base class providing logging capabilities to derived classes.

Template Parameters
ClassTypeThe derived class type.
LoggerTypeThe logger type, must inherit from Logger.

Any class that inherits from Loggable can use logging methods to output debug, info, warning, and error messages.

Definition at line 54 of file loggable.hpp.

Constructor & Destructor Documentation

◆ Loggable() [1/2]

template<typename ClassType , InheritFromLogger LoggerType>
utility::logging::Loggable< ClassType, LoggerType >::Loggable ( void  )
inlineexplicitprotected

Construct a Loggable with the specified LoggerType.

Definition at line 64 of file loggable.hpp.

◆ Loggable() [2/2]

template<typename ClassType , InheritFromLogger LoggerType>
utility::logging::Loggable< ClassType, LoggerType >::Loggable ( Loggable< ClassType, LoggerType > &&  other)
inlineprotectednoexcept

Move constructor for Loggable.

Parameters
otherThe Loggable instance to move from.

Definition at line 74 of file loggable.hpp.

Member Function Documentation

◆ getLogger() [1/2]

template<typename ClassType , InheritFromLogger LoggerType>
LoggerType & utility::logging::Loggable< ClassType, LoggerType >::getLogger ( void  )
inlineprotected

Get the internal logger.

Returns
Reference to the internal Logger instance.

Definition at line 98 of file loggable.hpp.

◆ getLogger() [2/2]

template<typename ClassType , InheritFromLogger LoggerType>
LoggerType & utility::logging::Loggable< ClassType, LoggerType >::getLogger ( void  ) const
inlineprotected

Get the internal logger.

Returns
Reference to the internal Logger instance.

Definition at line 107 of file loggable.hpp.

◆ operator=()

template<typename ClassType , InheritFromLogger LoggerType>
Loggable & utility::logging::Loggable< ClassType, LoggerType >::operator= ( Loggable< ClassType, LoggerType > &&  other)
inlineprotectednoexcept

Move assignment operator for Loggable.

Parameters
otherThe Loggable instance to move from.
Returns
Reference to this Loggable instance.

Definition at line 85 of file loggable.hpp.


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