IOSS 2.0
Loading...
Searching...
No Matches
Ioss_SmartAssert.h File Reference
#include "ioss_export.h"
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for Ioss_SmartAssert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Ioss::assert_context
 
struct  Ioss::Private::is_null_finder< T >
 
struct  Ioss::Private::is_null_finder< char * >
 
struct  Ioss::Private::is_null_finder< const char * >
 
struct  Ioss::Assert
 

Namespaces

namespace  Ioss
 The main namespace for the Ioss library.
 
namespace  Ioss::SmartAssert
 
namespace  Ioss::Private
 

Macros

#define SMART_ASSERT_DEBUG
 
#define SMART_ASSERT(expr)
 
#define SMART_VERIFY(expr)
 
#define SMART_ASSERT_A(x)   SMART_ASSERT_OP(x, B)
 
#define SMART_ASSERT_B(x)   SMART_ASSERT_OP(x, A)
 
#define SMART_ASSERT_OP(x, next)   SMART_ASSERT_A.print_current_val((x), #x).SMART_ASSERT_##next
 

Typedefs

using Ioss::SmartAssert::assert_func = void (*)(const assert_context &)
 

Enumerations

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

Functions

std::string Ioss::SmartAssert::get_typeof_level (int nLevel)
 
void Ioss::SmartAssert::dump_context_summary (const assert_context &context, std::ostream &out)
 
void Ioss::SmartAssert::dump_context_detail (const assert_context &context, std::ostream &out)
 
void Ioss::SmartAssert::default_warn_handler (const assert_context &context)
 
void Ioss::SmartAssert::default_debug_handler (const assert_context &context)
 
void Ioss::SmartAssert::default_error_handler (const assert_context &context)
 
void Ioss::SmartAssert::default_fatal_handler (const assert_context &context)
 
void Ioss::SmartAssert::default_logger (const assert_context &context)
 
void Ioss::Private::init_assert ()
 
void Ioss::Private::set_default_log_stream (std::ostream &out)
 
void Ioss::Private::set_default_log_name (const char *str)
 
Assert Ioss::SmartAssert::make_assert (const char *expr)
 

Macro Definition Documentation

◆ SMART_ASSERT

#define SMART_ASSERT ( expr)
Value:
if ((expr)) \
; \
else \
.print_context(__FILE__, __LINE__) \
Assert make_assert(const char *expr)
Definition Ioss_SmartAssert.h:297
Assert & SMART_ASSERT_A
Definition Ioss_SmartAssert.h:158
Assert & print_context(const char *file, int line)
Definition Ioss_SmartAssert.h:201

◆ SMART_ASSERT_A

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

◆ SMART_ASSERT_B

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

◆ SMART_ASSERT_DEBUG

#define SMART_ASSERT_DEBUG

◆ SMART_ASSERT_OP

#define SMART_ASSERT_OP ( x,
next )   SMART_ASSERT_A.print_current_val((x), #x).SMART_ASSERT_##next

◆ SMART_VERIFY

#define SMART_VERIFY ( expr)
Value:
if ((expr)) \
; \
else \
.error() \
.print_context(__FILE__, __LINE__) \
Assert & error(const char *strMsg=nullptr)
Definition Ioss_SmartAssert.h:224