STIR
6.4.0
STIR
src
include
stir
warning.h
Go to the documentation of this file.
1
//
2
//
3
#ifndef __stir_warning_H__
4
#define __stir_warning_H__
5
/*
6
Copyright (C) 2010- 2013, Hammersmith Imanet Ltd
7
This file is part of STIR.
8
SPDX-License-Identifier: Apache-2.0
9
10
See STIR/LICENSE.txt for details
11
*/
20
#include "
stir/Verbosity.h
"
21
#include "stir/TextWriter.h"
22
#include <sstream>
23
24
START_NAMESPACE_STIR
25
27
39
void
warning
(
const
char
*
const
s, ...);
40
42
61
62
template
<
class
STRING>
63
inline
void
64
warning
(
const
STRING&
string
,
const
int
verbosity_level = 1)
65
{
66
if
(Verbosity::get() >= verbosity_level)
67
{
68
std::stringstream sstr;
69
sstr <<
"\nWARNING: "
<<
string
<< std::endl;
70
writeText(sstr.str().c_str(), WARNING_CHANNEL);
71
}
72
}
73
END_NAMESPACE_STIR
74
#endif
Verbosity.h
Declaration of class stir::Verbosity.
stir::warning
void warning(const char *const s,...)
Print warning with format string a la printf.
Definition
warning.cxx:41
Generated on Wed May 27 2026 17:04:05 for STIR by
1.13.2