ifw-odp  2.0.0-alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
odp::Error Class Reference

This class handle the errors produced by the calling of image processing routines. More...

#include <error.hpp>

Inheritance diagram for odp::Error:
odp::Array odp::Image odp::ImageCube odp::ImageExtensions odp::ImageStatistics odp::Mask odp::Matrix odp::Recipe

Public Member Functions

 Error ()
 Class constructor. More...
 
virtual ~Error ()
 Class destructor. More...
 
void ResetCplError ()
 Reset CPL error and internal error flag. More...
 
bool CheckCplError () const
 Check if there is an error in CPL. More...
 

Protected Member Functions

void AddCplError () const
 Add CPL error to the error stack. More...
 
std::string GetErrorMsg () const
 Get CPL error message. More...
 

Static Protected Member Functions

static void DumpError (unsigned self, unsigned first, unsigned last)
 Dump current CPL error. More...
 

Detailed Description

This class handle the errors produced by the calling of image processing routines.

Error - class that handles CPL errors. Each CPL error will trigger a standard C++ runtime exception.

This class should be used as parent for classes where there will be an interface with CPL routines. This class also takes care of initializing and cleaning up CPL calling the corresponding CPL functions.

Constructor & Destructor Documentation

odp::Error::Error ( )
explicit

Class constructor.

Returns
none

Initialize CPL core library. This is done only for the creation of the first object of this type.

odp::Error::~Error ( )
virtual

Class destructor.

Returns
none

Stop internal CPL subsystems for the last object destroyed.

Member Function Documentation

void odp::Error::AddCplError ( ) const
protected

Add CPL error to the error stack.

Returns
FAILURE in case of an error, SUCCESS otherwise.
bool odp::Error::CheckCplError ( ) const

Check if there is an error in CPL.

Returns
TRUE in case CPL return error code different from zero.
void odp::Error::DumpError ( unsigned  self,
unsigned  first,
unsigned  last 
)
staticprotected

Dump current CPL error.

Parameters
selfThe number of the current error to be copied
firstThe number of the first error to be copied
lastThe number of the last error to be copied
Returns
none
std::string odp::Error::GetErrorMsg ( ) const
protected

Get CPL error message.

Returns
Error message in a std::string object.
void odp::Error::ResetCplError ( )

Reset CPL error and internal error flag.

Returns
none

The documentation for this class was generated from the following files: