STIR 6.4.0
info.h
Go to the documentation of this file.
1//
2//
3#ifndef __stir_info_H__
4#define __stir_info_H__
5/*
6 Copyright (C) 2006- 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/common.h"
21#include "stir/Verbosity.h"
22#include <iostream>
23#include <sstream>
24
25#include "TextWriter.h"
26
27START_NAMESPACE_STIR
28
30
49template <class STRING>
50void
51info(const STRING& string, const int verbosity_level = 1)
52{
53 if (Verbosity::get() >= verbosity_level)
54 {
55 std::stringstream ss;
56 ss << "\nINFO: " << string << std::endl;
57 writeText(ss.str().c_str(), INFORMATION_CHANNEL);
58 }
59}
60
61END_NAMESPACE_STIR
62#endif
Declaration of class stir::Verbosity.
basic configuration include file
void info(const STRING &string, const int verbosity_level=1)
Use this function for writing informational messages.
Definition info.h:51