4
\brief basic definitions for the img module
6
This header contains the basic module definitions.
9
/// base of the static assertion mechanism
10
template<bool> struct NON_TRUE_EXPR_CompileTimeError;
11
/// partial instantiation for the static assertion mechanism
12
template<> struct NON_TRUE_EXPR_CompileTimeError<true> {};
14
/// the static assertion mechanism
15
#define STATIC_ASSERT(exp) (NON_TRUE_EXPR_CompileTimeError< (exp) >())
17
/// base of the static typecheck mechanism
18
template<typename> struct NON_FLOAT_OR_DOUBLE_TYPE_CompileTimeError;
19
/// partial instantiation for the static typecheck mechanism
20
template<> struct NON_FLOAT_OR_DOUBLE_TYPE_CompileTimeError<float> {};
21
/// partial instantiation for the static typecheck mechanism
22
template<> struct NON_FLOAT_OR_DOUBLE_TYPE_CompileTimeError<double> {};
24
/// the static typecheck mechanism
25
#define STATIC_FLOAT_OR_DOUBLE_TYPECHECK(type) (NON_FLOAT_OR_DOUBLE_TYPE_CompileTimeError< type >())
27
/// define NULL pointer value
32
#define NULL ((void *)0)
41
/*! \brief the img module namespace
43
this is the main image module namespace.
47
/*! \brief the basic exception class
49
this is the basic image exception class, it simply carries an error string to the console.
51
class ImageException: public std::exception
56
/// default constructor
57
ImageException():exception(),message("no message"){}
58
/*! \brief message carrying constructor
60
\param arg_message the error string
62
ImageException(const char *arg_message):exception(),message(arg_message){}
64
virtual ~ImageException () throw (){}
69
#endif /*IMG_BASE_H_*/