TPIE

v1.1rc1-6-g0c97303
progress_indicator_subindicator.h
Go to the documentation of this file.
1 // -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
2 // vi:set ts=4 sts=4 sw=4 noet :
3 // Copyright 2008, The TPIE development team
4 //
5 // This file is part of TPIE.
6 //
7 // TPIE is free software: you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License as published by the
9 // Free Software Foundation, either version 3 of the License, or (at your
10 // option) any later version.
11 //
12 // TPIE is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with TPIE. If not, see <http://www.gnu.org/licenses/>
19 
24 
25 #ifndef __TPIE_PROGRESS_INDICATOR_SUBINDICATOR_H__
26 #define __TPIE_PROGRESS_INDICATOR_SUBINDICATOR_H__
27 #include <tpie/portability.h>
28 #include <tpie/util.h>
30 
31 namespace tpie {
32 
34 public:
35  void refresh();
36  virtual void push_breadcrumb(const char * crumb, description_importance importance);
37  virtual void pop_breadcrumb();
38  virtual void init(stream_size_type range);
39  virtual void done();
40 
41  void setup(progress_indicator_base * parent,
42  stream_size_type outerRange,
43  const char * crumb=0,
44  description_importance importance=IMPORTANCE_MAJOR);
45 
47 
49  stream_size_type outerRange,
50  const char * crumb=0,
51  description_importance importance=IMPORTANCE_MAJOR);
52 #ifndef TPIE_NDEBUG
54 #endif
55 protected:
56  progress_indicator_base * m_parent;
57  stream_size_type m_outerRange;
58  stream_size_type m_oldValue;
59  std::string m_crumb;
60  description_importance m_importance;
61 #ifndef TPIE_NDEBUG
62  bool m_init_called;
63  bool m_done_called;
64 #endif
65 };
66 
67 } //namespace tpie
68 #endif //__TPIE_PROGRESS_INDICATOR_SUBINDICATOR_H__
The base class for indicating the progress of some task.
virtual void done()
Advance the indicator to the end.
This file contains a few deprecated definitions for legacy code.
Progress indicator base.
Miscellaneous utility functions.
virtual void init(stream_size_type range)
Initialize progress indicator.
void refresh()
Display the indicator.