numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::logging::logging_mixin Class Reference

Class to incorporate logging in algorithms. More...

#include <num_collect/logging/logging_mixin.h>

+ Inheritance diagram for num_collect::logging::logging_mixin:
+ Collaboration diagram for num_collect::logging::logging_mixin:

Public Member Functions

 logging_mixin (log_tag_view tag)
 Constructor.
 
template<typename Child >
void configure_child_algorithm_logger_if_exists (Child &child)
 Configure a logger of a child algorithm if exists.
 
auto logger () const noexcept -> const num_collect::logging::logger &
 Access to the logger.
 
auto logger () noexcept -> num_collect::logging::logger &
 Access to the logger.
 

Private Attributes

num_collect::logging::logger logger_
 Logger.
 

Detailed Description

Class to incorporate logging in algorithms.

Inherit this class to use logger with the common interface.

Definition at line 32 of file logging_mixin.h.

Constructor & Destructor Documentation

◆ logging_mixin()

num_collect::logging::logging_mixin::logging_mixin ( log_tag_view tag)
inlineexplicit

Constructor.

Parameters
[in]tagTag.

Definition at line 39 of file logging_mixin.h.

Member Function Documentation

◆ configure_child_algorithm_logger_if_exists()

template<typename Child >
void num_collect::logging::logging_mixin::configure_child_algorithm_logger_if_exists ( Child & child)
inline

Configure a logger of a child algorithm if exists.

Template Parameters
ChildType of the child algorithm.
Parameters
[in]childChild algorithm.

Definition at line 67 of file logging_mixin.h.

◆ logger() [1/2]

auto num_collect::logging::logging_mixin::logger ( ) const -> const num_collect::logging::logger&
inlinenodiscardnoexcept

Access to the logger.

Returns
Logger.

Definition at line 46 of file logging_mixin.h.

◆ logger() [2/2]

auto num_collect::logging::logging_mixin::logger ( ) -> num_collect::logging::logger&
inlinenodiscardnoexcept

Access to the logger.

Returns
Logger.

Definition at line 56 of file logging_mixin.h.

Member Data Documentation

◆ logger_

num_collect::logging::logger num_collect::logging::logging_mixin::logger_
private

Logger.

Definition at line 75 of file logging_mixin.h.


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