DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
Classes | Typedefs | Enumerations | Functions
smart_assert Namespace Reference

Classes

struct  Assert
 
class  assert_context
 
struct  is_null_finder
 
struct  is_null_finder< char * >
 
struct  is_null_finder< const char * >
 

Typedefs

typedef void(* assert_func) (const assert_context &context)
 

Enumerations

enum  {
  lvl_log = 0,
  lvl_warn = 100,
  lvl_debug = 200,
  lvl_error = 300,
  lvl_fatal = 1000
}
 
enum  {
  lvl_condition_assert = 0,
  lvl_condition_exception = 1
}
 

Functions

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

Typedef Documentation

typedef void(* smart_assert::assert_func) (const assert_context &context)

Definition at line 167 of file utlSmartAssert.h.

Enumeration Type Documentation

anonymous enum
Enumerator
lvl_log 
lvl_warn 
lvl_debug 
lvl_error 
lvl_fatal 

Definition at line 68 of file utlSmartAssert.h.

anonymous enum
Enumerator
lvl_condition_assert 
lvl_condition_exception 

Definition at line 89 of file utlSmartAssert.h.

Function Documentation

void smart_assert::default_debug_handler ( const assert_context context)
inline

Definition at line 601 of file utlSmartAssert.h.

References break_into_debugger(), dump_context_summary(), smart_assert::assert_context::get_context_file(), smart_assert::assert_context::get_context_line(), and SA_Abort.

Referenced by init_assert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void smart_assert::default_error_handler ( const assert_context context)
inline

Definition at line 653 of file utlSmartAssert.h.

References dump_context_detail().

Referenced by init_assert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void smart_assert::default_fatal_handler ( const assert_context context)
inline

Definition at line 661 of file utlSmartAssert.h.

References dump_context_detail(), and SA_Abort.

Referenced by init_assert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void smart_assert::default_log_handler ( const assert_context context)
inline

Definition at line 586 of file utlSmartAssert.h.

References dump_context_log_detail().

Referenced by init_assert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void smart_assert::default_logger ( const assert_context context)
inline

Definition at line 573 of file utlSmartAssert.h.

References dump_context_log_detail().

Referenced by init_assert(), and smart_assert::Assert::set_log().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void smart_assert::default_warn_handler ( const assert_context context)
inline

Definition at line 595 of file utlSmartAssert.h.

References dump_context_detail().

Referenced by init_assert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void smart_assert::dump_context_detail ( const assert_context context,
std::ostream &  out 
)
inline
void smart_assert::dump_context_log_detail ( const assert_context context,
std::ostream &  out 
)
inline
void smart_assert::dump_context_summary ( const assert_context context,
std::ostream &  out 
)
inline
std::string smart_assert::get_typeof_level ( int  nLevel)
inline
void smart_assert::init_assert ( )
inline
Assert smart_assert::make_assert ( const char *  expr)
inline

Definition at line 370 of file utlSmartAssert.h.

void smart_assert::set_default_log_name ( const char *  str)
inline

Definition at line 686 of file utlSmartAssert.h.

Referenced by smart_assert::Assert::set_log().

+ Here is the caller graph for this function:

void smart_assert::set_default_log_stream ( std::ostream &  out)
inline

Definition at line 680 of file utlSmartAssert.h.

Referenced by smart_assert::Assert::set_log().

+ Here is the caller graph for this function: