IOSS 2.0

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Assert Struct Reference

`#include <Ioss_SmartAssert.h>`

Collaboration diagram for 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 >
Assert & | print_current_val (const type &val, const char *my_msg)
Assert & | print_context (const char *file, int line)
Assert & | msg (const char *strMsg)
Assert & | level (int nLevel, const char *strMsg=nullptr)
Assert & | warn (const char *strMsg=nullptr)
Assert & | debug (const char *strMsg=nullptr)
Assert & | error (const char *strMsg=nullptr)
Assert & | fatal (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
Assert & | SMART_ASSERT_A
Assert & | SMART_ASSERT_B

## Private Types
typedef std::map< int, assert_func > | handlers_collection

## Private Member Functions
void | handle_assert ()

## Static Private Member Functions
static assert_func & | logger ()
static handlers_collection & | handlers ()
static assert_func | get_handler (int nLevel)

## Private Attributes
assert_context | context_
bool | needs_handling_

## Member Typedef Documentation

## ◆ assert_func

using Assert::assert_func = SmartAssert::assert_func

## ◆ handlers_collection

typedef std::map<int, assert_func> Assert::handlers_collection
| private

## Constructor & Destructor Documentation

## ◆ Assert() [1/2]

Assert::Assert | ( | const char * | expr | ) |
| inline explicit

## ◆ Assert() [2/2]

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

## ◆ ~Assert()

Assert::~Assert | ( |  | ) |
| inline

## Member Function Documentation

## ◆ debug()

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

## ◆ error()

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

## ◆ fatal()

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

## ◆ get_handler()

static assert_func Assert::get_handler | ( | int | nLevel | ) |
| inline static private

## ◆ handle_assert()

void Assert::handle_assert | ( |  | ) |
| inline private

## ◆ handlers()

static handlers_collection& Assert::handlers | ( |  | ) |
| inline static private

## ◆ level()

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

## ◆ logger()

static assert_func& Assert::logger | ( |  | ) |
| inline static private

## ◆ msg()

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

## ◆ print_context()

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

## ◆ print_current_val()

template<class type >

Assert& Assert::print_current_val | ( | const type & | val,
|  | const char * | my_msg
| ) |  |
| inline

## ◆ set_handler()

static void Assert::set_handler | ( | int | nLevel,
|  | assert_func | handler
| ) |  |
| inline static

## ◆ set_log() [1/3]

static void Assert::set_log | ( | const char * | strFileName | ) |
| inline static

## ◆ set_log() [2/3]

static void Assert::set_log | ( | std::ostream & | out | ) |
| inline static

## ◆ set_log() [3/3]

static void Assert::set_log | ( | assert_func | log | ) |
| inline static

## ◆ warn()

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

## Member Data Documentation

## ◆ context_

assert_context Assert::context_
| private

## ◆ needs_handling_

bool Assert::needs_handling_
| mutable private

## ◆ SMART_ASSERT_A

Assert& Assert::SMART_ASSERT_A

## ◆ SMART_ASSERT_B

Assert& Assert::SMART_ASSERT_B

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

- src/Ioss_SmartAssert.h