IOSS 2.0
Loading...
Searching...
No Matches
Ioss::Assert Struct Reference

#include <Ioss_SmartAssert.h>

Collaboration diagram for Ioss::Assert:
[legend]

Public Types

using assert_func = SmartAssert::assert_func
 

Public Member Functions

 Assert (const char *expr)
 
 Assert (const Assert &other)
 
 ~Assert ()
 
template<class type >
Assertprint_current_val (const type &val, const char *my_msg)
 
Assertprint_context (const char *file, int line)
 
Assertmsg (const char *strMsg)
 
Assertlevel (int nLevel, const char *strMsg=nullptr)
 
Assertwarn (const char *strMsg=nullptr)
 
Assertdebug (const char *strMsg=nullptr)
 
Asserterror (const char *strMsg=nullptr)
 
Assertfatal (const char *strMsg=nullptr)
 

Static Public Member Functions

static void set_log (const char *strFileName)
 
static void set_log (std::ostream &out)
 
static void set_log (assert_func log)
 
static void set_handler (int nLevel, assert_func handler)
 

Public Attributes

AssertSMART_ASSERT_A
 
AssertSMART_ASSERT_B
 

Private Types

using handlers_collection = std::map<int, assert_func>
 

Private Member Functions

void handle_assert ()
 

Static Private Member Functions

static assert_funclogger ()
 
static handlers_collectionhandlers ()
 
static assert_func get_handler (int nLevel)
 

Private Attributes

assert_context context_
 
bool needs_handling_ {true}
 

Member Typedef Documentation

◆ assert_func

◆ handlers_collection

using Ioss::Assert::handlers_collection = std::map<int, assert_func>
private

Constructor & Destructor Documentation

◆ Assert() [1/2]

Ioss::Assert::Assert ( const char * expr)
inlineexplicit

◆ Assert() [2/2]

Ioss::Assert::Assert ( const Assert & other)
inline

◆ ~Assert()

Ioss::Assert::~Assert ( )
inline

Member Function Documentation

◆ debug()

Assert & Ioss::Assert::debug ( const char * strMsg = nullptr)
inline

◆ error()

Assert & Ioss::Assert::error ( const char * strMsg = nullptr)
inline

◆ fatal()

Assert & Ioss::Assert::fatal ( const char * strMsg = nullptr)
inline

◆ get_handler()

static assert_func Ioss::Assert::get_handler ( int nLevel)
inlinestaticprivate

◆ handle_assert()

void Ioss::Assert::handle_assert ( )
inlineprivate

◆ handlers()

static handlers_collection & Ioss::Assert::handlers ( )
inlinestaticprivate

◆ level()

Assert & Ioss::Assert::level ( int nLevel,
const char * strMsg = nullptr )
inline

◆ logger()

static assert_func & Ioss::Assert::logger ( )
inlinestaticprivate

◆ msg()

Assert & Ioss::Assert::msg ( const char * strMsg)
inline

◆ print_context()

Assert & Ioss::Assert::print_context ( const char * file,
int line )
inline

◆ print_current_val()

template<class type >
Assert & Ioss::Assert::print_current_val ( const type & val,
const char * my_msg )
inline

◆ set_handler()

static void Ioss::Assert::set_handler ( int nLevel,
assert_func handler )
inlinestatic

◆ set_log() [1/3]

static void Ioss::Assert::set_log ( assert_func log)
inlinestatic

◆ set_log() [2/3]

static void Ioss::Assert::set_log ( const char * strFileName)
inlinestatic

◆ set_log() [3/3]

static void Ioss::Assert::set_log ( std::ostream & out)
inlinestatic

◆ warn()

Assert & Ioss::Assert::warn ( const char * strMsg = nullptr)
inline

Member Data Documentation

◆ context_

assert_context Ioss::Assert::context_
private

◆ needs_handling_

bool Ioss::Assert::needs_handling_ {true}
mutableprivate

◆ SMART_ASSERT_A

Assert& Ioss::Assert::SMART_ASSERT_A

◆ SMART_ASSERT_B

Assert& Ioss::Assert::SMART_ASSERT_B

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