OGS
Functions
anonymous_namespace{PrjProcessing.cpp} Namespace Reference
Functions
std::string
iostateToString
(std::ios_base::iostate const state)
Function Documentation
◆
iostateToString()
std::string anonymous_namespace{PrjProcessing.cpp}::iostateToString
(
std::ios_base::iostate const
state
)
Definition at line
29
of file
PrjProcessing.cpp
.
30
{
31
std::string result;
32
33
if
(state == std::ios_base::goodbit)
34
{
35
result =
"goodbit"
;
36
}
37
else
38
{
39
if
(state & std::ios_base::eofbit)
40
{
41
result +=
"eofbit "
;
42
}
43
if
(state & std::ios_base::failbit)
44
{
45
result +=
"failbit "
;
46
}
47
if
(state & std::ios_base::badbit)
48
{
49
result +=
"badbit"
;
50
}
51
// Remove trailing space if there is one
52
if
(!result.empty() && result.back() ==
' '
)
53
{
54
result.pop_back();
55
}
56
}
57
return
result;
58
}
anonymous_namespace{PrjProcessing.cpp}
Generated by
1.12.0