DOLFIN
DOLFIN C++ interface
Event.h
1 // Copyright (C) 2004-2007 Anders Logg
2 //
3 // This file is part of DOLFIN.
4 //
5 // DOLFIN is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // DOLFIN is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // First added: 2004-01-03
19 // Last changed: 2007-05-14
20 
21 #ifndef __EVENT_H
22 #define __EVENT_H
23 
24 #include <string>
25 
26 namespace dolfin
27 {
28 
45 
46  class Event
47  {
48  public:
49 
51  Event(const std::string msg, unsigned int maxcount = 1);
52 
54  ~Event();
55 
57  void operator() ();
58 
60  unsigned int count() const;
61 
63  unsigned int maxcount() const;
64 
65  private:
66 
67  std::string _msg;
68  unsigned int _maxcount;
69  unsigned int _count;
70 
71  };
72 
73 }
74 
75 #endif
Definition: Event.h:46
Definition: adapt.h:29
Event(const std::string msg, unsigned int maxcount=1)
Constructor.
Definition: Event.cpp:27
void operator()()
Display message.
Definition: Event.cpp:38
~Event()
Destructor.
Definition: Event.cpp:33
unsigned int maxcount() const
Maximum display count.
Definition: Event.cpp:54
unsigned int count() const
Display count.
Definition: Event.cpp:49