LifeV
AssertContext Class Reference

contains details about a failed assertion More...

#include <LifeAssertSmart.hpp>

+ Collaboration diagram for AssertContext:

Private Attributes

std::string M_file
 
int M_contextLine
 
std::string M_expression
 
valueArray_Type M_values
 
int M_level
 
std::string M_message
 

Public typedefs

typedef std::pair< std::string, std::string > valueAndString_Type
 
typedef std::vector< valueAndString_TypevalueArray_Type
 

Constructor

 AssertContext ()
 
virtual ~AssertContext ()
 

Public methods

void addValue (const std::string &val, const std::string &str)
 

Set methods

void setFileLine (const char *file, int line)
 
void setExpression (const std::string &str)
 
void setLevel (int nLevel)
 
void setLevelMsg (const char *strMsg)
 

Get methods

const std::string & file () const
 
int contextLine () const
 
const std::string & expression () const
 
const valueArray_Typevalues () const
 
const int & level () const
 
const std::string & message () const
 

Detailed Description

contains details about a failed assertion

Definition at line 70 of file LifeAssertSmart.hpp.

Member Typedef Documentation

◆ valueAndString_Type

typedef std::pair< std::string, std::string> valueAndString_Type

Definition at line 75 of file LifeAssertSmart.hpp.

◆ valueArray_Type

typedef std::vector< valueAndString_Type> valueArray_Type

Definition at line 76 of file LifeAssertSmart.hpp.

Constructor & Destructor Documentation

◆ AssertContext()

AssertContext ( )
inline

Definition at line 81 of file LifeAssertSmart.hpp.

◆ ~AssertContext()

virtual ~AssertContext ( )
inlinevirtual

Definition at line 82 of file LifeAssertSmart.hpp.

Member Function Documentation

◆ addValue()

void addValue ( const std::string &  val,
const std::string &  str 
)
inline

Definition at line 88 of file LifeAssertSmart.hpp.

◆ setFileLine()

void setFileLine ( const char *  file,
int  line 
)
inline

Definition at line 96 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ setExpression()

void setExpression ( const std::string &  str)
inline

Definition at line 102 of file LifeAssertSmart.hpp.

◆ setLevel()

void setLevel ( int  nLevel)
inline

Definition at line 107 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ setLevelMsg()

void setLevelMsg ( const char *  strMsg)
inline

Definition at line 112 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ file()

const std::string& file ( ) const
inline

Definition at line 127 of file LifeAssertSmart.hpp.

◆ contextLine()

int contextLine ( ) const
inline

Definition at line 132 of file LifeAssertSmart.hpp.

◆ expression()

const std::string& expression ( ) const
inline

Definition at line 137 of file LifeAssertSmart.hpp.

◆ values()

const valueArray_Type& values ( ) const
inline

Definition at line 142 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ level()

const int& level ( ) const
inline

Definition at line 147 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

◆ message()

const std::string& message ( ) const
inline

Definition at line 152 of file LifeAssertSmart.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_file

std::string M_file
private

Definition at line 160 of file LifeAssertSmart.hpp.

◆ M_contextLine

int M_contextLine
private

Definition at line 161 of file LifeAssertSmart.hpp.

◆ M_expression

std::string M_expression
private

Definition at line 164 of file LifeAssertSmart.hpp.

◆ M_values

valueArray_Type M_values
private

Definition at line 165 of file LifeAssertSmart.hpp.

◆ M_level

int M_level
private

Definition at line 168 of file LifeAssertSmart.hpp.

◆ M_message

std::string M_message
private

Definition at line 169 of file LifeAssertSmart.hpp.


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