MrSID Decode SDK for LiDAR Reference Manual
1.1.3.4427
|
00001 /* ////////////////////////////////////////////////////////////////////////// 00002 // // 00003 // This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western // 00004 // Avenue, Suite 200, Seattle, WA 98104. Unauthorized use or distribution // 00005 // prohibited. Access to and use of this code is permitted only under // 00006 // license from LizardTech, Inc. Portions of the code are protected by // 00007 // US and foreign patents and other filings. All Rights Reserved. // 00008 // // 00010 /* PUBLIC */ 00011 00012 #ifndef __LIDAR_PROGRESS_DELEGATE_H__ 00013 #define __LIDAR_PROGRESS_DELEGATE_H__ 00014 00015 #include "lidar/Base.h" 00016 00017 LT_BEGIN_LIDAR_NAMESPACE 00018 00029 class ProgressDelegate 00030 { 00031 DISABLE_COPY(ProgressDelegate); 00032 public: 00033 virtual ~ProgressDelegate(void); 00034 00044 virtual void reportProgress(double progress, const char *message) = 0; 00053 virtual bool getCancelled(void) = 0; 00054 00063 void setTotal(double total); 00072 void updateCompleted(double delta, const char *message); 00073 00081 double getProgress(void) const; 00082 00083 protected: 00084 ProgressDelegate(void); 00085 00086 private: 00087 double m_completed; 00088 double m_total; 00089 }; 00090 00091 class PercentProgressDelegate : public ProgressDelegate 00092 { 00093 DISABLE_COPY(PercentProgressDelegate); 00094 public: 00095 PercentProgressDelegate(void); 00096 ~PercentProgressDelegate(void); 00097 00098 void reportProgress(double fractionDone, const char *message); 00099 bool getCancelled(void); 00100 00101 void setCancelled(bool cancel); 00102 private: 00103 int m_lastUpdate; 00104 const char *m_lastMessage; 00105 bool m_cancelled; 00106 }; 00107 00108 LT_END_LIDAR_NAMESPACE 00109 #endif // __LIDAR_PROGRESS_DELEGATE_H__