#include <cstdio>
#include <cstdarg>
#include <cstring>


Go to the source code of this file.
Classes | |
| struct | Error |
| struct | RangeError |
| struct | LocateError |
Defines | |
| #define | CHECK(msg, testvalid) { if(testvalid==0) throw LOCATE(Error(msg)); } |
| #define | CHECKRANGE(msg, val, low, up) { if(val<low || val>=up) throw LOCATE(RangeError(msg,(float)val,(float)low,(float)up)); } |
| #define | CHECKMIN(msg, val, min) { if(val<min) throw LOCATE(RangeError(msg,(float)val,(float)min,0)); } |
| #define | CHECKMAX(msg, val, max) { if(val>=max) throw LOCATE(RangeError(msg,(float)val,0,(float)max)); } |
| #define | LOCATE(Error) LocateError(Error, __FILE__, __LINE__) |
| #define CHECK | ( | msg, | |||
| testvalid | ) | { if(testvalid==0) throw LOCATE(Error(msg)); } |
Check a test
Referenced by Image< T, N >::get(), Image< T, N >::set(), and Image< T, N >::setSize().
| #define CHECKMAX | ( | msg, | |||
| val, | |||||
| max | ) | { if(val>=max) throw LOCATE(RangeError(msg,(float)val,0,(float)max)); } |
Check maximum, test is val < max
| #define CHECKMIN | ( | msg, | |||
| val, | |||||
| min | ) | { if(val<min) throw LOCATE(RangeError(msg,(float)val,(float)min,0)); } |
Check minimum, test is val >= min
| #define CHECKRANGE | ( | msg, | |||
| val, | |||||
| low, | |||||
| up | ) | { if(val<low || val>=up) throw LOCATE(RangeError(msg,(float)val,(float)low,(float)up)); } |
Check range, test is low <= val < up
Referenced by Image< T, N >::get(), Image< T, N >::getSize(), Image< T, N >::set(), and Image< T, N >::size().
| #define LOCATE | ( | Error | ) | LocateError(Error, __FILE__, __LINE__) |
Tag error with filename, code line
Referenced by IO::Raw::read(), Tools::TransferFunction::Editor::update(), Display::Volume4D::update(), Display::Volume::update(), and IO::Raw::write().
1.5.5