MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
simple_assert.hpp File Reference
#include <assert.h>
#include <cstdlib>
#include <iostream>
#include "current_function.hpp"
+ Include dependency graph for simple_assert.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 moose
 
 moose::assertion
 
 moose::assertion::detail
 

Macros

#define SIMPLE_ASSERT(expr)   assert(expr)
 
#define SIMPLE_ASSERT_HPP
 
#define SIMPLE_ASSERT_MSG(expr, msg)
 
#define SIMPLE_ASSERT_MSG_OSTREAM   std::cerr
 
#define SIMPLE_VERIFY(expr)   MOOSE_ASSERT(expr)
 
#define SIMPLE_WARN(condition, msg)
 

Functions

void moose::assertion::detail::assertion_failed_msg (char const *expr, char const *msg, char const *function, char const *file, long line)
 

Macro Definition Documentation

#define SIMPLE_ASSERT (   expr)    assert(expr)

Definition at line 58 of file simple_assert.hpp.

#define SIMPLE_ASSERT_HPP

Definition at line 87 of file simple_assert.hpp.

#define SIMPLE_ASSERT_MSG (   expr,
  msg 
)
Value:
((expr) \
? ((void)0) \
SIMPLE_CURRENT_FUNCTION, __FILE__, __LINE__))
void assertion_failed_msg(char const *expr, char const *msg, char const *function, char const *file, long line)
#define SIMPLE_CURRENT_FUNCTION

Definition at line 123 of file simple_assert.hpp.

Referenced by HSolveUtils::gates().

#define SIMPLE_ASSERT_MSG_OSTREAM   std::cerr

Definition at line 95 of file simple_assert.hpp.

Referenced by moose::assertion::detail::assertion_failed_msg().

#define SIMPLE_VERIFY (   expr)    MOOSE_ASSERT(expr)

Definition at line 141 of file simple_assert.hpp.

#define SIMPLE_WARN (   condition,
  msg 
)
Value:
if(! (condition) ) { \
std::ostringstream ss; \
ss << endl << "[WARN] " << msg; \
std::cout << ss.str() \
<< std::endl; \
std::cout << "\n\t|- " << "In function: " << SIMPLE_CURRENT_FUNCTION \
<< "\n\t+ In file: " << __FILE__ << ":" << __LINE__ << std::endl; \
}
#define SIMPLE_CURRENT_FUNCTION

Definition at line 149 of file simple_assert.hpp.