Loading...
Searching...
No Matches
cf_assert.h File Reference

assertions for Factory More...

`#include <stdio.h>`
`#include <stdlib.h>`

Go to the source code of this file.

## Macros

#define | __ASSERT(expression, message, file, line)
#define | __ASSERT1(expression, message, parameter1, file, line)
#define | STICKYASSERT(expression, message)
#define | STICKYASSERT1(expression, message, parameter1)
#define | __WARN(expression, message, file, line)
#define | STICKYWARN(expression, message)
#define | ASSERT(expression, message)
#define | ASSERT1(expression, message, parameter1)
#define | WARN(expression, message)
#define | PVIRT_VOID(msg)
#define | PVIRT_INTCF(msg)
#define | PVIRT_BOOL(msg)
#define | PVIRT_INT(msg)
#define | PVIRT_CHARCC(msg)

## Detailed Description

assertions for Factory

Note
  needs –enable-assertions at configure

Definition in file cf_assert.h.

## Macro Definition Documentation

## __ASSERT

#define __ASSERT | ( |  | expression,
|  |  | message,
|  |  | file,
|  |  | line )

Value:
(fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \
file, line, expression ), abort(), 0 )
message
void message(int i, int *olddeg, int *reduc, kStrategy strat, int red_result)
Definition kutil.cc:7463

Definition at line 57 of file cf_assert.h.

#define __ASSERT(expression, message, file, line) \
(fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \
file, line, expression ), abort(), 0 )

## __ASSERT1

#define __ASSERT1 | ( |  | expression,
|  |  | message,
|  |  | parameter1,
|  |  | file,
|  |  | line )

Value:
(fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \
parameter1, file, line, expression ), abort(), 0 )

Definition at line 60 of file cf_assert.h.

#define __ASSERT1(expression, message, parameter1, file, line) \
(fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \
parameter1, file, line, expression ), abort(), 0 )

## __WARN

#define __WARN | ( |  | expression,
|  |  | message,
|  |  | file,
|  |  | line )

Value:
(fprintf( stderr, "warning: " message "\n%s:%u: failed assertion `%s'\n", \
file, line, expression ), 0 )

Definition at line 69 of file cf_assert.h.

#define __WARN(expression, message, file, line) \
(fprintf( stderr, "warning: " message "\n%s:%u: failed assertion `%s'\n", \
file, line, expression ), 0 )

## ASSERT

#define ASSERT | ( |  | expression,
|  |  | message )

Value:
((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__)))
__ASSERT
#define __ASSERT(expression, message, file, line)
Definition cf_assert.h:57

Definition at line 99 of file cf_assert.h.

#define ASSERT(expression, message) \
((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__)))

## ASSERT1

#define ASSERT1 | ( |  | expression,
|  |  | message,
|  |  | parameter1 )

Value:
((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__)))
__ASSERT1
#define __ASSERT1(expression, message, parameter1, file, line)
Definition cf_assert.h:60

Definition at line 101 of file cf_assert.h.

#define ASSERT1(expression, message, parameter1) \
((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__)))

## PVIRT_BOOL

#define PVIRT_BOOL | ( |  | msg | ) |

Value:
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return false; }

Definition at line 121 of file cf_assert.h.

#define PVIRT_BOOL(msg) \
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return false; }

## PVIRT_CHARCC

#define PVIRT_CHARCC | ( |  | msg | ) |

Value:
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }

Definition at line 125 of file cf_assert.h.

#define PVIRT_CHARCC(msg) \
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }

## PVIRT_INT

#define PVIRT_INT | ( |  | msg | ) |

Value:
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }

Definition at line 123 of file cf_assert.h.

#define PVIRT_INT(msg) \
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }

## PVIRT_INTCF

#define PVIRT_INTCF | ( |  | msg | ) |

Value:
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }

Definition at line 119 of file cf_assert.h.

#define PVIRT_INTCF(msg) \
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }

## PVIRT_VOID

#define PVIRT_VOID | ( |  | msg | ) |

Value:
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); }

Definition at line 117 of file cf_assert.h.

#define PVIRT_VOID(msg) \
{ fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); }

## STICKYASSERT

#define STICKYASSERT | ( |  | expression,
|  |  | message )

Value:
((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__)))

Definition at line 64 of file cf_assert.h.

#define STICKYASSERT(expression, message) \
((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__)))

## STICKYASSERT1

#define STICKYASSERT1 | ( |  | expression,
|  |  | message,
|  |  | parameter1 )

Value:
((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__)))

Definition at line 66 of file cf_assert.h.

#define STICKYASSERT1(expression, message, parameter1) \
((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__)))

## STICKYWARN

#define STICKYWARN | ( |  | expression,
|  |  | message )

Value:
((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__)))
__WARN
#define __WARN(expression, message, file, line)
Definition cf_assert.h:69

Definition at line 72 of file cf_assert.h.

#define STICKYWARN(expression, message) \
((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__)))

## WARN

#define WARN | ( |  | expression,
|  |  | message )

Value:
((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__)))

Definition at line 104 of file cf_assert.h.

#define WARN(expression, message) \
((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__)))