[go: up one dir, main page]

Menu

[r189]: / tags / 0.10 / porg / out.h  Maximize  Restore  History

Download this file

44 lines (28 with data), 993 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//=======================================================================
// out.h
//-----------------------------------------------------------------------
// This file is part of the package porg
// Copyright (C) 2015 David Ricart
// For more information visit http://porg.sourceforge.net
//=======================================================================
#ifndef PORG_OUT_H
#define PORG_OUT_H
#include "config.h"
#include <iosfwd>
namespace Porg {
class Out
{
public:
static void inc_verbosity() { s_verbosity++; }
static bool debug() { return s_verbosity >= DEBUG; }
static bool verbose() { return s_verbosity >= VERBOSE; }
static void vrb(std::string const&, int errno_ = 0);
static void dbg(std::string const&, bool print_prog_name = true);
static void dbg_title(std::string const& title = "");
protected:
enum { QUIET, VERBOSE, DEBUG };
static const int DEFAULT_SCREEN_WIDTH = 70;
static int s_verbosity;
};
} // namespace Porg
#endif // PORG_OUT_H