MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Run-time activation/deactivation of debug flags. More...
#include <MsqDebug.hpp>
Classes | |
class | FormatPrinter |
class | InitializeFlags |
Public Types | |
enum | { WARN = 1, INFO = 2 } |
Static Public Member Functions | |
static void | enable (unsigned flag) |
Enable a debug flag. | |
static void | disable (unsigned flag) |
Disable a debug flag. | |
static void | set (unsigned flag, bool state) |
Set a debug flag. | |
static bool | get (unsigned flag) |
Check a debug flag. | |
static void | disable_all () |
Disable all debug streams. | |
static std::ostream & | get_stream (unsigned flag) |
Get the output stream to be used for a given debug flag. | |
static void | set_stream (unsigned flag, std::ostream &stream) |
Set the output stream to be used for a given debug flag. | |
Static Private Attributes | |
static std::vector < std::ostream * > | streams |
static std::vector< bool > | flags |
static InitializeFlags | init |
Run-time activation/deactivation of debug flags.
Wrap static functions for managing debug flags and associated output streams. Output is expected do be done using the provided macros MSQ_DBGOUT(), MSQ_PRINT(), and MSQ_DBG().
The default output stream for all flags is cout.
Definition at line 73 of file MsqDebug.hpp.
anonymous enum |
static void MBMesquite::MsqDebug::disable | ( | unsigned | flag | ) | [inline, static] |
void MBMesquite::MsqDebug::disable_all | ( | ) | [static] |
Disable all debug streams.
Definition at line 102 of file MsqDebug.cpp.
References flags.
Referenced by MBMesquite::VertexMover::loop_over_mesh().
{ flags.clear(); }
static void MBMesquite::MsqDebug::enable | ( | unsigned | flag | ) | [inline, static] |
Enable a debug flag.
Definition at line 84 of file MsqDebug.hpp.
Referenced by main(), ParShapeImprover::run(), and MBMesquite::save_or_restore_debug_state().
{
set( flag, true );
}
bool MBMesquite::MsqDebug::get | ( | unsigned | flag | ) | [static] |
Check a debug flag.
Definition at line 81 of file MsqDebug.cpp.
References flags.
Referenced by MBMesquite::MsqDebug::FormatPrinter::print(), and MBMesquite::save_or_restore_debug_state().
std::ostream & MBMesquite::MsqDebug::get_stream | ( | unsigned | flag | ) | [static] |
Get the output stream to be used for a given debug flag.
Definition at line 107 of file MsqDebug.cpp.
References streams.
Referenced by MBMesquite::MsqDebug::FormatPrinter::print().
void MBMesquite::MsqDebug::set | ( | unsigned | flag, |
bool | state | ||
) | [static] |
void MBMesquite::MsqDebug::set_stream | ( | unsigned | flag, |
std::ostream & | stream | ||
) | [static] |
Set the output stream to be used for a given debug flag.
Definition at line 115 of file MsqDebug.cpp.
References streams.
std::vector< bool > MBMesquite::MsqDebug::flags [static, private] |
Definition at line 132 of file MsqDebug.hpp.
Referenced by disable_all(), get(), and set().
MsqDebug::InitializeFlags MBMesquite::MsqDebug::init [static, private] |
Definition at line 133 of file MsqDebug.hpp.
std::vector< std::ostream * > MBMesquite::MsqDebug::streams [static, private] |
Definition at line 131 of file MsqDebug.hpp.
Referenced by get_stream(), and set_stream().