Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
wire-cell-build
util
inc
spdlog
details
console_globals.h
Go to the documentation of this file.
1
#pragma once
2
//
3
// Copyright(c) 2018 Gabi Melman.
4
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
5
//
6
7
#include "
spdlog/details/null_mutex.h
"
8
#include <cstdio>
9
#include <mutex>
10
11
#ifdef _WIN32
12
13
#ifndef NOMINMAX
14
#define NOMINMAX // prevent windows redefining min/max
15
#endif
16
17
#ifndef WIN32_LEAN_AND_MEAN
18
#define WIN32_LEAN_AND_MEAN
19
#endif
20
21
#include <windows.h>
22
#endif
23
24
namespace
spdlog
{
25
namespace
details
{
26
struct
console_stdout
27
{
28
static
std::FILE *
stream
()
29
{
30
return
stdout
;
31
}
32
#ifdef _WIN32
33
static
HANDLE handle()
34
{
35
return ::GetStdHandle(STD_OUTPUT_HANDLE);
36
}
37
#endif
38
};
39
40
struct
console_stderr
41
{
42
static
std::FILE *
stream
()
43
{
44
return
stderr
;
45
}
46
#ifdef _WIN32
47
static
HANDLE handle()
48
{
49
return ::GetStdHandle(STD_ERROR_HANDLE);
50
}
51
#endif
52
};
53
54
struct
console_mutex
55
{
56
using
mutex_t
=
std::mutex
;
57
static
mutex_t
&
mutex
()
58
{
59
static
mutex_t
s_mutex;
60
return
s_mutex;
61
}
62
};
63
64
struct
console_nullmutex
65
{
66
using
mutex_t
=
null_mutex
;
67
static
mutex_t
&
mutex
()
68
{
69
static
mutex_t
s_mutex;
70
return
s_mutex;
71
}
72
};
73
}
// namespace details
74
}
// namespace spdlog
spdlog::details::console_mutex::mutex_t
std::mutex mutex_t
Definition:
console_globals.h:56
generate_datataset.stdout
stdout
Definition:
generate_datataset.py:30
spdlog::details::console_stdout::stream
static std::FILE * stream()
Definition:
console_globals.h:28
null_mutex.h
spdlog
Definition:
async.h:27
spdlog::details::console_nullmutex::mutex
static mutex_t & mutex()
Definition:
console_globals.h:67
spdlog::details::console_stdout
Definition:
console_globals.h:26
spdlog::details::console_mutex
Definition:
console_globals.h:54
generate_CCQE_events.mutex
mutex
Definition:
generate_CCQE_events.py:53
details
Definition:
RawDataDrawer.cxx:106
spdlog::details::console_stderr
Definition:
console_globals.h:40
plot_model.stderr
stderr
Definition:
plot_model.py:26
spdlog::details::console_nullmutex
Definition:
console_globals.h:64
spdlog::details::console_stderr::stream
static std::FILE * stream()
Definition:
console_globals.h:42
spdlog::details::null_mutex
Definition:
null_mutex.h:13
spdlog::details::console_mutex::mutex
static mutex_t & mutex()
Definition:
console_globals.h:57
Generated by
1.8.11