ifw-odp  2.0.0-alpha
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
error.hpp
Go to the documentation of this file.
1 
9 #ifndef ODP_ERROR_HPP
10 #define ODP_ERROR_HPP
11 
12 #ifndef __cplusplus
13 #error This is a C++ include file and cannot be used from plain C
14 #endif
15 
17 
18 namespace odp {
19 
34  class Error
35  {
36  public:
37 
47  explicit Error();
48 
56  virtual ~Error();
57 
64  void ResetCplError();
65 
72  bool CheckCplError() const;
73 
74 
75  protected:
82  void AddCplError() const;
91  static void DumpError(unsigned self, unsigned first, unsigned last);
92 
99  std::string GetErrorMsg() const;
100  private:
101 
102 
103  private:
104  static int m_obj_num;
105  cpl_errorstate m_cpl_error_state;
106  };
107 }
108 #endif
This class handle the errors produced by the calling of image processing routines.
Definition: error.hpp:34
std::string GetErrorMsg() const
Get CPL error message.
Definition: error.cpp:77
static void DumpError(unsigned self, unsigned first, unsigned last)
Dump current CPL error.
Definition: error.cpp:62
void AddCplError() const
Add CPL error to the error stack.
Definition: error.cpp:52
virtual ~Error()
Class destructor.
Definition: error.cpp:31
void ResetCplError()
Reset CPL error and internal error flag.
Definition: error.cpp:38
Error()
Class constructor.
Definition: error.cpp:24
bool CheckCplError() const
Check if there is an error in CPL.
Definition: error.cpp:44