LifeV
Assert Struct Reference

#include <LifeAssertSmart.hpp>

+ Collaboration diagram for Assert:

Private Attributes

AssertContext M_context
 
bool M_needsHandling
 

Helpers and Typedefs

typedef SmartAssert::assertFunction_Type assertFunction_Type
 
AssertSMART_ASSERT_A
 
AssertSMART_ASSERT_B
 

Constructors and destructor

 Assert (const char *expr)
 
 Assert (const Assert &other)
 
virtual ~Assert ()
 

Public methods

template<class type >
AssertprintCurrentValue (const type &val, const char *msg)
 
AssertprintContext (const char *file, int line)
 
Assertmsg (const char *strMsg)
 
Assertlevel (int nLevel, const char *strMsg=0)
 
Assertwarn (const char *strMsg=0)
 
Assertdebug (const char *strMsg=0)
 
Asserterror (const char *strMsg=0)
 
Asserterror (const std::string strMsg)
 
Assertfatal (const char *strMsg=0)
 

Static methods

static void setLog (const char *strFileName)
 
static void setLog (std::ostream &out)
 
static void setLog (assertFunction_Type log)
 
static void setHandler (int nLevel, assertFunction_Type handler)
 

Private methods

void handleAssert ()
 

Private static methods

typedef std::map< int, assertFunction_TypehandlerCollection_Type
 
static assertFunction_Typelogger ()
 
static handlerCollection_Typehandlers ()
 
static assertFunction_Type handler (int nLevel)
 

Detailed Description

Definition at line 230 of file LifeAssertSmart.hpp.

Member Typedef Documentation

◆ assertFunction_Type

typedef SmartAssert::assertFunction_Type assertFunction_Type

Definition at line 234 of file LifeAssertSmart.hpp.

◆ handlerCollection_Type

typedef std::map< int, assertFunction_Type> handlerCollection_Type
private

Definition at line 402 of file LifeAssertSmart.hpp.

Constructor & Destructor Documentation

◆ Assert() [1/2]

Assert ( const char *  expr)
inline

Definition at line 243 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ Assert() [2/2]

Assert ( const Assert other)
inline

Definition at line 257 of file LifeAssertSmart.hpp.

◆ ~Assert()

virtual ~Assert ( )
inlinevirtual

Definition at line 266 of file LifeAssertSmart.hpp.

Member Function Documentation

◆ printCurrentValue()

Assert& printCurrentValue ( const type &  val,
const char *  msg 
)
inline

Definition at line 278 of file LifeAssertSmart.hpp.

◆ printContext()

Assert& printContext ( const char *  file,
int  line 
)
inline

Definition at line 297 of file LifeAssertSmart.hpp.

◆ msg()

Assert& msg ( const char *  strMsg)
inline

Definition at line 303 of file LifeAssertSmart.hpp.

◆ level()

Assert& level ( int  nLevel,
const char *  strMsg = 0 
)
inline

Definition at line 309 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ warn()

Assert& warn ( const char *  strMsg = 0)
inline

Definition at line 316 of file LifeAssertSmart.hpp.

◆ debug()

Assert& debug ( const char *  strMsg = 0)
inline

Definition at line 321 of file LifeAssertSmart.hpp.

◆ error() [1/2]

Assert& error ( const char *  strMsg = 0)
inline

Definition at line 326 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ error() [2/2]

Assert& error ( const std::string  strMsg)
inline

Definition at line 331 of file LifeAssertSmart.hpp.

◆ fatal()

Assert& fatal ( const char *  strMsg = 0)
inline

Definition at line 336 of file LifeAssertSmart.hpp.

◆ setLog() [1/3]

static void setLog ( const char *  strFileName)
inlinestatic

Definition at line 346 of file LifeAssertSmart.hpp.

◆ setLog() [2/3]

static void setLog ( std::ostream &  out)
inlinestatic

Definition at line 354 of file LifeAssertSmart.hpp.

◆ setLog() [3/3]

static void setLog ( assertFunction_Type  log)
inlinestatic

Definition at line 360 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ setHandler()

static void setHandler ( int  nLevel,
assertFunction_Type  handler 
)
inlinestatic

Definition at line 365 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ handleAssert()

void handleAssert ( )
inlineprivate

Definition at line 375 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ logger()

static assertFunction_Type& logger ( )
inlinestaticprivate

Definition at line 395 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ handlers()

static handlerCollection_Type& handlers ( )
inlinestaticprivate

Definition at line 403 of file LifeAssertSmart.hpp.

◆ handler()

static assertFunction_Type handler ( int  nLevel)
inlinestaticprivate

Definition at line 409 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ SMART_ASSERT_A

Assert& SMART_ASSERT_A

Definition at line 237 of file LifeAssertSmart.hpp.

◆ SMART_ASSERT_B

Assert& SMART_ASSERT_B

Definition at line 238 of file LifeAssertSmart.hpp.

◆ M_context

AssertContext M_context
private

Definition at line 425 of file LifeAssertSmart.hpp.

◆ M_needsHandling

bool M_needsHandling
mutableprivate

Definition at line 426 of file LifeAssertSmart.hpp.


The documentation for this struct was generated from the following file: