synfig-core  1.0.3
progress.h
Go to the documentation of this file.
1 /* === S Y N F I G ========================================================= */
22 /* ========================================================================= */
23 
24 #ifndef __SYNFIG_PROGRESS_H
25 #define __SYNFIG_PROGRESS_H
26 
27 #include <synfig/string.h>
28 #include "definitions.h"
29 
31 {
32  const char *program;
33 
34 public:
35 
36  Progress(const char *name):program(name) { }
37 
38  virtual bool
40  {
41  VERBOSE_OUT(1)<<program<<": "<<task<<std::endl;
42  return true;
43  }
44 
45  virtual bool
47  {
48  std::cerr<<program<<": "<<_("error")<<": "<<task<<std::endl;
49  return true;
50  }
51 
52  virtual bool
54  {
55  std::cerr<<program<<": "<<_("warning")<<": "<<task<<std::endl;
56  return true;
57  }
58 
59  virtual bool
60  amount_complete(int /*current*/, int /*total*/)
61  {
62  return true;
63  }
64 };
65 
66 #endif