ocra-recipes
Doxygen documentation for the ocra-recipes repository
Classes | Namespaces | Macros
ocra_assert.h File Reference
#include <cstdio>
Include dependency graph for ocra_assert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ocra::ocra_static_assert< condition >
 
struct  ocra::ocra_static_assert< true >
 
struct  ocra_assertion_fired
 

Namespaces

 ocra
 Optimization-based Robot Controller namespace. a library of classes to write and solve optimization problems dedicated to the control of multi-body systems.
 

Macros

#define OCRA_STATIC_ASSERT(CONDITION, MSG)   if (ocra::ocra_static_assert<CONDITION ? true : false>::MSG) {}
 
#define OCRA_ASSERT_ACTIVE
 
#define ocra_assert(ocra_expression)   if(!(ocra_expression)) { fprintf(stderr, #ocra_expression"\n"); fflush(stderr); throw ocra_assertion_fired(); }
 

Macro Definition Documentation

#define ocra_assert (   ocra_expression)    if(!(ocra_expression)) { fprintf(stderr, #ocra_expression"\n"); fflush(stderr); throw ocra_assertion_fired(); }

Definition at line 45 of file ocra_assert.h.

#define OCRA_ASSERT_ACTIVE

Definition at line 38 of file ocra_assert.h.

#define OCRA_STATIC_ASSERT (   CONDITION,
  MSG 
)    if (ocra::ocra_static_assert<CONDITION ? true : false>::MSG) {}

Definition at line 26 of file ocra_assert.h.