Tag Parser
7.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
diagnostics.cpp
Go to the documentation of this file.
1
#include "
./diagnostics.h
"
2
3
using namespace
std
;
4
5
namespace
TagParser
{
6
22
const
char
*
diagLevelName
(
DiagLevel
diagLevel)
23
{
24
switch
(diagLevel) {
25
case
DiagLevel::Information:
26
return
"information"
;
27
case
DiagLevel::Warning:
28
return
"warning"
;
29
case
DiagLevel::Critical:
30
return
"critical"
;
31
case
DiagLevel::None
:
32
default
:
33
return
""
;
34
}
35
}
36
40
bool
Diagnostics::has(
DiagLevel
level)
const
41
{
42
for
(
const
auto
&msg : *
this
) {
43
if
(msg.level() >= level) {
44
return
true
;
45
}
46
}
47
return
false
;
48
}
49
53
DiagLevel
Diagnostics::level()
const
54
{
55
auto
level =
DiagLevel::None
;
56
for
(
const
auto
&msg : *
this
) {
57
if
((level |= msg.level()) >=
worstDiagLevel
) {
58
return
level;
59
}
60
}
61
return
level;
62
}
63
64
}
// namespace TagParser
TagParser::worstDiagLevel
constexpr auto worstDiagLevel
The worst diag level.
Definition:
diagnostics.h:26
std
STL namespace.
diagnostics.h
TagParser::SubFormats::None
Definition:
mediaformat.h:108
TagParser::diagLevelName
TAG_PARSER_EXPORT const char * diagLevelName(DiagLevel diagLevel)
Returns the string representation of the specified diagLevel.
Definition:
diagnostics.cpp:22
TagParser
Contains all classes and functions of the TagInfo library.
Definition:
aaccodebook.h:9
TagParser::DiagLevel
DiagLevel
Specifies the level of the diagnostic message.
Definition:
diagnostics.h:16
Generated on Sun Jun 3 2018 20:16:58 for Tag Parser by
1.8.14