Claw 1.7.3
|
Some assert macros to strengthen you code. More...
#include <iostream>
#include <sstream>
#include <cstdlib>
Go to the source code of this file.
Namespaces | |
namespace | claw |
This is the main namespace. | |
Macros | |
#define | CLAW_ASSERT(b, s) |
Print a message on std::cerr and stop the program if a condition is not true. | |
#define | CLAW_FAIL(s) |
Print a message on std::cerr and stop the program. | |
#define | CLAW_PRECOND(b) |
Abort the program if a precondition is not true. | |
#define | CLAW_POSTCOND(b) |
Abort the program if a postcondition is not true. | |
Functions | |
void | claw::debug_assert (const char *file, const char *func, unsigned int line, bool b, const std::string &s) |
The method used by CLAW_ASSERT macro. Souldn't be used elsewhere. | |
Some assert macros to strengthen you code.
Definition in file assert.hpp.
#define CLAW_ASSERT | ( | b, | |
s ) |
Print a message on std::cerr and stop the program if a condition is not true.
b | Condition to verify. |
s | An error message. |
Definition at line 90 of file assert.hpp.
Referenced by claw::arguments::add_argument(), claw::arguments::get_integer(), claw::arguments::get_real(), and claw::arguments::get_string().
#define CLAW_FAIL | ( | s | ) |
Print a message on std::cerr and stop the program.
s | An error message. |
Definition at line 94 of file assert.hpp.
#define CLAW_POSTCOND | ( | b | ) |
Abort the program if a postcondition is not true.
b | Condition to verify. |
Definition at line 101 of file assert.hpp.
Referenced by claw::graphic::image::base_iterator< Image, Pixel >::base_iterator(), and claw::tween::base_tweener::update().
#define CLAW_PRECOND | ( | b | ) |
Abort the program if a precondition is not true.
b | Condition to verify. |
Definition at line 98 of file assert.hpp.
Referenced by claw__graphic__jpeg__destination_manager__empty_output_buffer(), claw__graphic__jpeg__destination_manager__term_destination(), claw__graphic__jpeg__source_manager__fill_input_buffer(), claw__graphic__jpeg__source_manager__skip_input_data(), claw::socket_traits_unix::connect(), claw::socket_traits_win32::connect(), claw::arguments_table::get_integer(), claw::arguments_table::get_real(), claw::arguments_table::get_string(), claw::socket_traits_unix::listen(), claw::socket_traits_win32::listen(), claw::graphic::bitmap::reader::load(), claw::graphic::jpeg::reader::load(), claw::graphic::pcx::reader::load(), claw::graphic::png::reader::load(), claw::graphic::targa::reader::load(), claw::graphic::xbm::reader::load(), claw::graphic::image::base_iterator< Image, Pixel >::operator*(), claw::graphic::image::base_iterator< Image, Pixel >::operator++(), claw::graphic::image::base_iterator< Image, Pixel >::operator+=(), claw::graphic::image::base_iterator< Image, Pixel >::operator-(), claw::graphic::image::base_iterator< Image, Pixel >::operator--(), claw::graphic::image::base_iterator< Image, Pixel >::operator-=(), claw::graphic::image::base_iterator< Image, Pixel >::operator->(), claw::graphic::jpeg::writer::save(), claw::graphic::png::writer::save(), claw::graphic::xbm::writer::save(), claw::socket_traits_unix::select_read(), claw::socket_traits_win32::select_read(), claw::graphic::jpeg::reader::source_manager::skip_input_data(), claw::graphic::png::reader::source_manager::source_manager(), claw::graphic::png::writer::target_manager::target_manager(), and claw::tween::base_tweener::update().