OpenCL C++ Wrapper API 1.1
 All Classes Namespaces Files Functions Variables Typedefs Defines
Public Member Functions | Private Attributes
cl::Error Class Reference

Exception class. More...

#include <cl.hpp>

List of all members.

Public Member Functions

 Error (cl_int err, const char *errStr=NULL)
 ~Error () throw ()
virtual const char * what () const throw ()
 Get error string associated with exception.
cl_int err (void) const
 Get error code associated with exception.

Private Attributes

cl_int err_
const char * errStr_

Detailed Description

Exception class.

Definition at line 220 of file cl.hpp.


Constructor & Destructor Documentation

cl::Error::Error ( cl_int  err,
const char *  errStr = NULL 
) [inline]

Create a new CL error exception for a given error code and corresponding message.

Definition at line 229 of file cl.hpp.

                                                  : err_(err), errStr_(errStr)
    {}
cl::Error::~Error ( ) throw () [inline]

Definition at line 232 of file cl.hpp.

{}

Member Function Documentation

cl_int cl::Error::err ( void  ) const [inline]

Get error code associated with exception.

Returns:
The error code.

Definition at line 252 of file cl.hpp.

{ return err_; }
virtual const char* cl::Error::what ( ) const throw () [inline, virtual]

Get error string associated with exception.

Returns:
A memory pointer to the error message string.

Definition at line 238 of file cl.hpp.

    {
        if (errStr_ == NULL) {
            return "empty";
        }
        else {
            return errStr_;
        }
    }

Member Data Documentation

cl_int cl::Error::err_ [private]

Definition at line 223 of file cl.hpp.

const char* cl::Error::errStr_ [private]

Definition at line 224 of file cl.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Defines