MIDI2LR 6.1.0.0
MIDI2LR is an application that interfaces MIDI controllers with Lightroom 6+/CC Classic. It processes MIDI input into develop parameter updates and photo actions, and sends MIDI output when parameters are changed for motorized feedback (on controllers that have motorized faders). A listing of available LightRoom commands is in the Wiki. Assistance on the code and design is welcome.
Loading...
Searching...
No Matches
fmt::formatter< rsj::MessageType, Char > Struct Template Reference

#include <MidiUtilities.h>

Public Member Functions

template<typename FormatContext >
auto format (const rsj::MessageType &p, FormatContext &ctx) const
 
template<typename ParseContext >
constexpr auto parse (ParseContext &ctx)
 

Private Attributes

basic_memory_buffer< Char > tm_format_
 

Member Function Documentation

◆ format()

template<typename Char >
template<typename FormatContext >
auto fmt::formatter< rsj::MessageType, Char >::format ( const rsj::MessageType p,
FormatContext &  ctx 
) const
inline
107 {
108 if (tm_format_[0] == 'n') {
109 return fmt::format_to(ctx.out(), "{}", rsj::MessageTypeToName(p));
110 }
111 return fmt::format_to(ctx.out(), "{}", rsj::MessageTypeToLabel(p));
112 }
const char * MessageTypeToLabel(MessageType from) noexcept
Definition MidiUtilities.h:82
const char * MessageTypeToName(MessageType from) noexcept
Definition MidiUtilities.h:72
basic_memory_buffer< Char > tm_format_
Definition MidiUtilities.h:115

◆ parse()

template<typename Char >
template<typename ParseContext >
constexpr auto fmt::formatter< rsj::MessageType, Char >::parse ( ParseContext &  ctx)
inlineconstexpr
95 { /* parsing copied from fmt's chrono.h */
96 auto it {ctx.begin()};
97 if (!it) { return ctx.end(); }
98 if (it != ctx.end() && *it == ':') { std::advance(it, 1); }
99 auto end {std::find(it, ctx.end(), '}')};
100 tm_format_.reserve(detail::to_unsigned(end - it + 1));
101 tm_format_.append(it, end);
102 tm_format_.push_back('\0');
103 return end;
104 }

Member Data Documentation

◆ tm_format_

template<typename Char >
basic_memory_buffer<Char> fmt::formatter< rsj::MessageType, Char >::tm_format_
private

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