LifeV
LifeAssertSmart.hpp File Reference

Complex assertion mechanism. More...

#include <sstream>
#include <utility>
#include <vector>
#include <map>
#include <iostream>
#include <set>
+ Include dependency graph for LifeAssertSmart.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  AssertContext
 contains details about a failed assertion More...
 
struct  isNullFinder< T >
 
struct  isNullFinder< char * >
 
struct  isNullFinder< const char * >
 
struct  Assert
 

Namespaces

 LifeV
 Default Physical Solver.
 
 LifeV::SmartAssert
 
 LifeV::Private
 

Macros

#define LIFEV_SMART_ASSERT(expr)
 
#define LIFEV_ASSERT(expr)   LIFEV_SMART_ASSERT(expr)
 
#define LIFEV_SMART_VERIFY(expr)
 
#define LIFEV_VERIFY(expr)   LIFEV_SMART_VERIFY(expr)
 
#define SMART_ASSERT_A(x)   LIFEV_SMART_ASSERT_OP(x, B)
 
#define SMART_ASSERT_B(x)   LIFEV_SMART_ASSERT_OP(x, A)
 
#define LIFEV_SMART_ASSERT_OP(x, next)   SMART_ASSERT_A.printCurrentValue((x), #x).SMART_ASSERT_ ## next \
 

Typedefs

typedef void(* assertFunction_Type) (const AssertContext &context)
 

Enumerations

enum  { lvl_warn = 100, lvl_debug = 200, lvl_error = 300, lvl_fatal = 1000 }
 

Functions

std::string getTypeofLevel (int nLevel)
 
void dumpContextSummary (const AssertContext &context, std::ostream &out)
 
void dumpContextDetail (const AssertContext &context, std::ostream &out)
 
void defaultWarnHandler (const AssertContext &context)
 
void defaultDebugHandler (const AssertContext &context)
 
void defaultErrorHandler (const AssertContext &context)
 
void defaultFatalHandler (const AssertContext &context)
 
void defaultLogger (const AssertContext &context)
 
void initAssert ()
 
void setDefaultLogStream (std::ostream &out)
 
void setDefaultLogName (const char *str)
 
inline ::LifeV::Assert makeAssert (const char *expr)
 

Detailed Description

Complex assertion mechanism.

Date
16-01-2005
Author
Christophe Prud'homme chris.nosp@m.toph.nosp@m.e.pru.nosp@m.dhom.nosp@m.me@ep.nosp@m.fl.c.nosp@m.h
Maintainer:
Radu Popescu radu..nosp@m.pope.nosp@m.scu@e.nosp@m.pfl..nosp@m.ch

Definition in file LifeAssertSmart.hpp.

Macro Definition Documentation

◆ LIFEV_SMART_ASSERT

#define LIFEV_SMART_ASSERT (   expr)
Value:
if ( true ) ; \
inline ::LifeV::Assert makeAssert(const char *expr)
Assert & SMART_ASSERT_A

Definition at line 468 of file LifeAssertSmart.hpp.

◆ LIFEV_ASSERT

#define LIFEV_ASSERT (   expr)    LIFEV_SMART_ASSERT(expr)

Definition at line 476 of file LifeAssertSmart.hpp.

◆ LIFEV_SMART_VERIFY

#define LIFEV_SMART_VERIFY (   expr)
Value:
if ( (expr) ) ; \
Assert & printContext(const char *file, int line)
inline ::LifeV::Assert makeAssert(const char *expr)
Assert & error(const char *strMsg=0)
Assert & SMART_ASSERT_A

Definition at line 479 of file LifeAssertSmart.hpp.

◆ LIFEV_VERIFY

#define LIFEV_VERIFY (   expr)    LIFEV_SMART_VERIFY(expr)

Definition at line 483 of file LifeAssertSmart.hpp.

◆ SMART_ASSERT_A

#define SMART_ASSERT_A (   x)    LIFEV_SMART_ASSERT_OP(x, B)

Definition at line 486 of file LifeAssertSmart.hpp.

◆ SMART_ASSERT_B

#define SMART_ASSERT_B (   x)    LIFEV_SMART_ASSERT_OP(x, A)

Definition at line 487 of file LifeAssertSmart.hpp.

◆ LIFEV_SMART_ASSERT_OP

#define LIFEV_SMART_ASSERT_OP (   x,
  next 
)    SMART_ASSERT_A.printCurrentValue((x), #x).SMART_ASSERT_ ## next \

Definition at line 489 of file LifeAssertSmart.hpp.