Sygaldry
Loading...
Searching...
No Matches
sygup-cstdio_logger.hpp
1
/*
2
Copyright 2023 Travis J. West, https://traviswest.ca, Input Devices and Music
3
Interaction Laboratory (IDMIL), Centre for Interdisciplinary Research in Music
4
Media and Technology (CIRMMT), McGill University, Montréal, Canada, and Univ.
5
Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France
6
7
SPDX-License-Identifier: MIT
8
*/
9
10
#pragma once
11
#include <cstdio>
12
#include <cstdlib>
13
#include "sygup-basic_logger.hpp"
14
15
namespace
sygaldry {
namespace
sygup {
20
21
struct
CstdioPutter
22
{
23
void
operator()(
char
c)
24
{
25
auto
retcode = std::putchar(c);
26
if
(retcode == EOF)
27
{
28
// I guess we're unexpectedly done now?
29
std::exit(EXIT_FAILURE);
30
}
31
}
32
};
33
34
using
CstdioLogger =
BasicLogger<CstdioPutter>
;
35
38
} }
sygaldry::sygup::BasicLogger
Definition
sygup-basic_logger.hpp:26
sygaldry::sygup::CstdioPutter
Definition
sygup-cstdio_logger.hpp:22
sygaldry
sygup-cstdio_logger
sygup-cstdio_logger.hpp
Generated by
1.9.8