MrSID Decode SDK for LiDAR Reference Manual  1.1.5.5244
ProgressDelegate.h
Go to the documentation of this file.
1 //
2 // This code is property of Celartem, Inc dba Extensis.
3 // Copyright (c) 1995-2023. All rights reserved.
4 // Use permitted only under license from Extensis.
5 //
6 /* PUBLIC */
7 
8 #ifndef __LIDAR_PROGRESS_DELEGATE_H__
9 #define __LIDAR_PROGRESS_DELEGATE_H__
10 
11 #include "lidar/Base.h"
12 
13 LT_BEGIN_LIDAR_NAMESPACE
14 
26 {
27  DISABLE_COPY(ProgressDelegate);
28 public:
29  virtual ~ProgressDelegate(void);
30 
40  virtual void reportProgress(double progress, const char *message) = 0;
49  virtual bool getCancelled(void) = 0;
50 
59  void setTotal(double total);
68  void updateCompleted(double delta, const char *message);
69 
77  double getProgress(void) const;
78 
79 
80  void warning(const char *format, ...);
81  virtual void displayWarning(const char *message);
82 
83 protected:
85 
86 private:
87  double m_completed;
88  double m_total;
89 };
90 
92 {
93  DISABLE_COPY(PercentProgressDelegate);
94 public:
97 
98  void reportProgress(double fractionDone, const char *message);
99  bool getCancelled(void);
100  void displayWarning(const char *message);
101 
102  void setCancelled(bool cancel);
103 private:
104  int m_lastUpdate;
105  const char *m_lastMessage;
106  bool m_cancelled;
107 };
108 
109 LT_END_LIDAR_NAMESPACE
110 #endif // __LIDAR_PROGRESS_DELEGATE_H__
ProgressDelegate is the base class for progress and interrupt reporting.
virtual void displayWarning(const char *message)
virtual ~ProgressDelegate(void)
void setTotal(double total)
Set the total amount of work that must be done.
double getProgress(void) const
Get the fraction the work completed.
virtual void reportProgress(double progress, const char *message)=0
Displays the progress of the operation.
void updateCompleted(double delta, const char *message)
Update the amount of work that has been done.
virtual bool getCancelled(void)=0
Indicate weather the operation should be cancelled.
void warning(const char *format,...)
void displayWarning(const char *message)
bool getCancelled(void)
Indicate weather the operation should be cancelled.
void setCancelled(bool cancel)
void reportProgress(double fractionDone, const char *message)
Displays the progress of the operation.

Extensis