monotone

monotone Mtn Source Tree

Root/src/mtn-sanity.cc

1// Copyright (C) 2006 Timothy Brownawell <tbrownaw@gmail.com>
2//
3// This program is made available under the GNU GPL version 2.0 or
4// greater. See the accompanying file COPYING for details.
5//
6// This program is distributed WITHOUT ANY WARRANTY; without even the
7// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8// PURPOSE.
9
10#include "base.hh"
11#include "mtn-sanity.hh"
12#include "ui.hh"
13#include "mt_version.hh"
14
15extern sanity & global_sanity;
16static mtn_sanity real_sanity;
17sanity & global_sanity = real_sanity;
18
19mtn_sanity::mtn_sanity()
20{}
21
22mtn_sanity::~mtn_sanity()
23{}
24
25void
26mtn_sanity::initialize(int argc, char ** argv, char const * lc_all)
27{
28 this->sanity::initialize(argc, argv, lc_all);
29
30 std::string full_version_string;
31 get_full_version(full_version_string);
32 PERM_MM(full_version_string);
33}
34
35void
36mtn_sanity::inform_log(std::string const &msg)
37{
38 if (debug_p())
39 {
40 ui.inform(msg);
41 }
42}
43
44void
45mtn_sanity::inform_message(std::string const &msg)
46{
47 ui.inform(msg);
48}
49
50void
51mtn_sanity::inform_warning(std::string const &msg)
52{
53 ui.warn(msg);
54}
55
56void
57mtn_sanity::inform_error(std::string const &msg)
58{
59 ui.inform(msg);
60}
61
62// Local Variables:
63// mode: C++
64// fill-column: 76
65// c-file-style: "gnu"
66// indent-tabs-mode: nil
67// End:
68// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status