|
Namespaces |
| namespace | debuget |
Defines |
|
#define | ASSERT(b, msgstream) {if(!(b)) { std::stringstream ss; ss << msgstream; debuget::displayAssert(__FILE__,__LINE__,ss.str().c_str()); }} |
| | if the bool b is false, std::cout the string
|
|
#define | ASSERTRET(b, msgstream) {if(!(b)) { std::stringstream ss; ss << msgstream; debuget::displayAssert(__FILE__,__LINE__,ss.str().c_str()); return; }} |
| | if the bool b is false, std::cout the string and return
|
|
#define | ASSERTRETVAL(b, msgstream, v) {if(!(b)) { std::stringstream ss; ss << msgstream; debuget::displayAssert(__FILE__,__LINE__,ss.str().c_str()); return v; }} |
| | if the bool b is false, std::cout the string and return the value
|
|
#define | ASSERTFATAL(b, msgstream, x) {if(!(b)) { std::stringstream ss; ss << msgstream; debuget::displayAssert(__FILE__,__LINE__,ss.str().c_str()); exit(x); }} |
| | if the bool b is false, std::cout the string and exit(x)
|
Functions |
|
const char * | debuget::extractFilename (const char *path) |
| | for display, just use the filename, not the whole path
|
|
void | debuget::displayAssert (const char *file, unsigned int line, const char *msg) |
| | mostly for use with a debugger -- set a breakpoint on this function and you can catch anytime an assertion is generated
|
|
char | debuget::hexdigit (int c) |
| | returns the hex char that corresponds to c, which should be 0-16 (returns '.' otherwise)
|
|
void | debuget::charhexout (char c) |
| | printf's the two hex digits coresponding to a byte
|
|
void | debuget::hexout (const void *p, size_t n) |
| | charhexout's n bytes starting at p
|
|
void | debuget::hexout2 (const void *p, size_t size) |
| | displays hex and ascii values of size bytes from p
|
|
void | debuget::hexout3 (const char *buf, size_t size) |
| | displays hex and ascii values of size bytes from p
|