Simple-Log  alpha-v0.7
Record Concepts

Classes

struct  sl::log::RecordTypedefs< TRecord >
 Provides a layer of abstraction to Record member types. More...
 
struct  sl::log::RecordGetters< TRecord >
 Provides a layer of abstraction to Record member setter. More...
 
struct  sl::log::RecordSetters< TRecord >
 Provides a layer of abstraction to Record member setter. More...
 

Typedefs

template<class TRecord >
using sl::log::RecordMessage_t = typename RecordTypedefs< TRecord >::Message_t
 Typedef for easier access to Record's message type. More...
 
template<class TRecord >
using sl::log::RecordSeverity_t = typename RecordTypedefs< TRecord >::Severity_t
 Typedef for easier access to Record's severity type. More...
 
template<class TRecord >
using sl::log::RecordChannel_t = typename RecordTypedefs< TRecord >::Channel_t
 Typedef for easier access to Record's channel type. More...
 
template<class TRecord >
using sl::log::RecordTimePoint_t = typename RecordTypedefs< TRecord >::TimePoint_t
 Typedef for easier access to Record's time-point type. More...
 

Variables

template<class TRecord >
concept sl::log::RecordMemberTypedefs
 Concept which checks for the necessary member typedefs of a Record type. More...
 
template<class TRecord >
concept sl::log::RecordMemberGetters
 Concept which checks for the necessary member projections of a Record type. More...
 
template<class TRecord >
concept sl::log::RecordMemberSetters
 Concept which checks for the necessary member setters of a Record type. More...
 
template<class TRecord >
concept sl::log::Record
 Concept which all the necessary concepts for Record types. More...
 

Detailed Description

Users usually do not have to dig into the details of this part of the library, unless they try to inject an already existing but with incompatible interface Record type into the framework. Therefore the library provides several helper structs, which built a layer of abstraction onto the regular Record type interface, which users may specialize for their given types.

Typedef Documentation

◆ RecordChannel_t

template<class TRecord >
sl::log::RecordChannel_t

Typedef for easier access to Record's channel type.

Template Parameters
TRecordThe used Record type.
Version
since alpha-v0.7

◆ RecordMessage_t

template<class TRecord >
sl::log::RecordMessage_t

Typedef for easier access to Record's message type.

Template Parameters
TRecordThe used Record type.
Version
since alpha-v0.7

◆ RecordSeverity_t

template<class TRecord >
sl::log::RecordSeverity_t

Typedef for easier access to Record's severity type.

Template Parameters
TRecordThe used Record type.
Version
since alpha-v0.7

◆ RecordTimePoint_t

template<class TRecord >
sl::log::RecordTimePoint_t

Typedef for easier access to Record's time-point type.

Template Parameters
TRecordThe used Record type.
Version
since alpha-v0.7

Variable Documentation

◆ Record

template<class TRecord >
concept sl::log::Record
Initial value:
=
std::movable<TRecord> &&
RecordMemberTypedefs<TRecord> &&
RecordMemberGetters<TRecord> &&
RecordMemberSetters<TRecord>

Concept which all the necessary concepts for Record types.

◆ RecordMemberGetters

template<class TRecord >
concept sl::log::RecordMemberGetters
Initial value:
=
RecordMemberTypedefs<TRecord> &&
requires(const TRecord& rec)
{
{ RecordGetters<TRecord>::message(rec) } -> std::convertible_to<RecordMessage_t<TRecord>>;
{ RecordGetters<TRecord>::severity(rec) } -> std::convertible_to<RecordSeverity_t<TRecord>>;
{ RecordGetters<TRecord>::channel(rec) } -> std::convertible_to<RecordChannel_t<TRecord>>;
{ RecordGetters<TRecord>::timePoint(rec) } -> std::convertible_to<RecordTimePoint_t<TRecord>>;
}

Concept which checks for the necessary member projections of a Record type.

Version
since alpha-v0.7

◆ RecordMemberSetters

template<class TRecord >
concept sl::log::RecordMemberSetters
Initial value:
=
RecordMemberTypedefs<TRecord> &&
requires(TRecord& rec)
{
{ RecordSetters<TRecord>::setMessage(rec, std::declval<RecordMessage_t<TRecord>>()) };
{ RecordSetters<TRecord>::setTimePoint(rec, std::declval<RecordTimePoint_t<TRecord>>()) };
{ RecordSetters<TRecord>::setSeverity(rec, std::declval<RecordSeverity_t<TRecord>>()) };
{ RecordSetters<TRecord>::setChannel(rec, std::declval<RecordChannel_t<TRecord>>()) };
}

Concept which checks for the necessary member setters of a Record type.

Version
since alpha-v0.7

◆ RecordMemberTypedefs

template<class TRecord >
concept sl::log::RecordMemberTypedefs
Initial value:
=
requires
{
typename RecordMessage_t<TRecord>;
typename RecordSeverity_t<TRecord>;
typename RecordChannel_t<TRecord>;
typename RecordTimePoint_t<TRecord>;
}

Concept which checks for the necessary member typedefs of a Record type.

Version
since alpha-v0.7