My Project
Loading...
Searching...
No Matches
Macros
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)   ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__)))
 
#define STICKYASSERT1(expression, message, parameter1)   ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__)))
 
#define __WARN(expression, message, file, line)
 
#define STICKYWARN(expression, message)   ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__)))
 
#define ASSERT(expression, message)   ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__)))
 
#define ASSERT1(expression, message, parameter1)   ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__)))
 
#define WARN(expression, message)   ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__)))
 
#define PVIRT_VOID(msg)   { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); }
 
#define PVIRT_INTCF(msg)   { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }
 
#define PVIRT_BOOL(msg)   { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return false; }
 
#define PVIRT_INT(msg)   { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }
 
#define PVIRT_CHARCC(msg)   { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; }
 

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 )
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
Definition: kutil.cc:7512

Definition at line 57 of file cf_assert.h.

◆ __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.

◆ __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.

◆ ASSERT

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

Definition at line 99 of file cf_assert.h.

◆ ASSERT1

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

Definition at line 101 of file cf_assert.h.

◆ PVIRT_BOOL

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

Definition at line 121 of file cf_assert.h.

◆ PVIRT_CHARCC

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

Definition at line 125 of file cf_assert.h.

◆ PVIRT_INT

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

Definition at line 123 of file cf_assert.h.

◆ PVIRT_INTCF

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

Definition at line 119 of file cf_assert.h.

◆ PVIRT_VOID

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

Definition at line 117 of file cf_assert.h.

◆ STICKYASSERT

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

Definition at line 64 of file cf_assert.h.

◆ STICKYASSERT1

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

Definition at line 66 of file cf_assert.h.

◆ STICKYWARN

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

Definition at line 72 of file cf_assert.h.

◆ WARN

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

Definition at line 104 of file cf_assert.h.