IBAMR  IBAMR version 0.19.
Classes | Namespaces | Macros
Utilities.h File Reference
#include "SAMRAI_config.h"
#include <string>
#include "tbox/IOStream.h"
#include <sys/types.h>
#include <sys/stat.h>
#include "Logger.h"

Classes

struct  SAMRAI::tbox::Utilities
 

Namespaces

 SAMRAI
 
 SAMRAI::tbox
 

Macros

#define included_String
 
#define included_sys_types
 
#define included_sys_stat
 
#define NULL_STATEMENT
 
#define NULL_USE(variable)   (void)(variable)
 
#define TBOX_ERROR(X)
 
#define TBOX_WARNING(X)
 
#define TBOX_DEBUG(X)
 
#define TBOX_ASSERT(EXP)
 
#define TBOX_CHECK_ASSERT(EXP)   TBOX_ASSERT(EXP)
 

Macro Definition Documentation

◆ included_String

#define included_String

◆ included_sys_types

#define included_sys_types

◆ included_sys_stat

#define included_sys_stat

◆ NULL_STATEMENT

#define NULL_STATEMENT

A statement that does nothing, for insure++ make it something more complex than a simple C null statement to avoid a warning.

◆ NULL_USE

#define NULL_USE (   variable)    (void)(variable)

A null use of a variable, use to avoid GNU compiler warnings about unused variables.

◆ TBOX_ERROR

#define TBOX_ERROR (   X)
Value:
do { \
std::ostringstream tboxos; \
tboxos << X << std::ends; \
SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__);\
} while (0)

Throw an error exception from within any C++ source code. The macro argument may be any standard ostream expression. The file and line number of the abort are also printed.

◆ TBOX_WARNING

#define TBOX_WARNING (   X)
Value:
do { \
std::ostringstream tboxos; \
tboxos << X << std::ends; \
SAMRAI::tbox::Logger::getInstance() -> logWarning(tboxos.str(), __FILE__, __LINE__);\
} while (0)

Print a warning without exit. Print file and line number of the warning.

◆ TBOX_DEBUG

#define TBOX_DEBUG (   X)
Value:
do { \
std::ostringstream tboxos; \
tboxos << X << std::ends; \
SAMRAI::tbox::Logger::getInstance() -> logDebug(tboxos.str(), __FILE__, __LINE__);\
} while (0)

Print a debug without exit. Print file and line number of the debug.

◆ TBOX_ASSERT

#define TBOX_ASSERT (   EXP)
Value:
do { \
if ( !(EXP) ) { \
std::ostringstream tboxos; \
tboxos << "Failed assertion: " << #EXP << std::ends; \
SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__);\
} \
} while (0)

Throw an error exception from within any C++ source code if the given expression is not true. This is a parallel-friendly version of assert. The file and line number of the abort are also printed.

◆ TBOX_CHECK_ASSERT

#define TBOX_CHECK_ASSERT (   EXP)    TBOX_ASSERT(EXP)

Macro for use when assertions are to be included only when debugging.

SAMRAI::tbox::Logger::getInstance
static Logger * getInstance()
SAMRAI::tbox::Utilities::abort
static void abort(const std::string &message, const std::string &filename, const int line)