MyraMath
NullProgressMeter.h
Go to the documentation of this file.
1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
6 #ifndef MYRAMATH_JOBGRAPH_NULLPROGRESSMETER_H
7 #define MYRAMATH_JOBGRAPH_NULLPROGRESSMETER_H
8 
14 #include <myramath/utility/detail/LIBPUBLIC.h>
15 
17 
18 namespace myra {
19 
22  {
23  public:
24 
25  // Default constructor.
27  { }
28 
29  // Virtual destructor, so subtypes can release resources.
30  virtual ~NullProgressMeter()
31  { }
32 
33  protected:
34 
35  // Does nothing.
36  virtual void begin(const std::string& name, uint64_t total)
37  { }
38 
39  // Does nothing.
40  virtual void increment(uint64_t delta)
41  { }
42 
43  // Does nothing.
44  virtual void end()
45  { }
46 
47  // Returns false.
48  virtual bool kill()
49  { return false; }
50 
51  // Virtual copy constructor.
52  virtual ProgressMeterBase* clone() const
53  { return new NullProgressMeter(); }
54 
55  };
56 
58 LIBPUBLIC ProgressMeter make_NullProgressMeter();
59 
60 } // namespace
61 
62 #endif
Definition: syntax.dox:1
Interface for measuring progress via callbacks. Wraps an underlying polymorphic ProgressMeterBase.
Definition: ProgressMeter.h:55
Base/contract class for all other ProgressMeter&#39;s.
Definition: ProgressMeter.h:25
Interface type for progress measurement and control within JobGraph&#39;s.
A ProgressMeter that doesn&#39;t do anything.
Definition: NullProgressMeter.h:21