Simple-Log  alpha-v0.7
sl::log::SetChan< TChannel > Class Template Reference

Manipulates the channel of the current RecordBuilder object. More...

#include <RecordBuilder.hpp>

Public Types

using Chan_t = TChannel
 

Public Member Functions

constexpr SetChan (TChannel data) noexcept(std::is_nothrow_move_constructible_v< Chan_t >)
 Constructor accepting channel data. More...
 
template<Record TRecord>
void operator() (TRecord &rec) const
 Changes channel of the passed Record object. More...
 

Detailed Description

template<class TChannel>
class sl::log::SetChan< TChannel >

Manipulates the channel of the current RecordBuilder object.

Template Parameters
TChannelChannel type which must later on be convertible to Record's channel type.

This type is generally designed to be directly used in logging expressions. When handed-over to a RecordBuilder instance by operator <<, it will then manipulate the Channel data of its constructing Record object.

Examples
CustomizeBaseRecord/main.cpp.

Member Typedef Documentation

◆ Chan_t

template<class TChannel >
using sl::log::SetChan< TChannel >::Chan_t = TChannel

Constructor & Destructor Documentation

◆ SetChan()

template<class TChannel >
constexpr sl::log::SetChan< TChannel >::SetChan ( TChannel  data)
inlineexplicitconstexprnoexcept

Constructor accepting channel data.

Parameters
dataChannel data.

Member Function Documentation

◆ operator()()

template<class TChannel >
template<Record TRecord>
void sl::log::SetChan< TChannel >::operator() ( TRecord &  rec) const
inline

Changes channel of the passed Record object.

Template Parameters
TRecordUsed Record type.
Parameters
recThe Record which is about to change

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