#include <debug.h>
|
static void | delete_statics () |
|
static void | turn_off () |
| turn_off Turn off all debug printing for all flags More...
|
|
static void | turn_on () |
| turn_on All debug flags that have been registered or previously turned on are reactivated More...
|
|
static void | turn_off (debug_int &di) |
| turn_off Turn off a specific type of debug output More...
|
|
static void | turn_on (debug_int &di) |
| turn_on Turn on a specific type of debug output More...
|
|
static void | register_debug_slot (const std::string &str, debug_int *dint_ptr, const std::string &docstring) |
| register_debug_slot Register a new debug slot that can be activated via the command line or input file flags More...
|
|
static void | turn_on (const std::string &str) |
| turn_on Another option for activating debug slots. More...
|
|
static void | print_debug_string (const std::string &str, std::ostream &os=std::cout) |
| print_debug_string Extra detail (prefix_fxn) can be added to each debug print. More...
|
|
static bool | slot_active (const debug_int &allowed) |
| slot_active Determine whether a debug slot is active. More...
|
|
static void | print_all_debug_slots (std::ostream &os=std::cout) |
| print_all_debug_slots Print all of the possible debug slots registered with the debug system and any associated doc strings More...
|
|
|
static void | assign_slot (debug_int &dint) |
| assign_slot If a given debug slot is activated, it must be assigned a unique integer index to allow bitwise AND checking of slots to see if they are active. More...
|
|
Definition at line 103 of file debug.h.
static void sprockit::debug::assign_slot |
( |
debug_int & |
dint | ) |
|
|
staticprivate |
assign_slot If a given debug slot is activated, it must be assigned a unique integer index to allow bitwise AND checking of slots to see if they are active.
This method should never be called by external code
- Parameters
-
dint | A reference to the integer that must be assigned a value |
static void sprockit::debug::delete_statics |
( |
| ) |
|
|
static |
static void sprockit::debug::print_all_debug_slots |
( |
std::ostream & |
os = std::cout | ) |
|
|
static |
print_all_debug_slots Print all of the possible debug slots registered with the debug system and any associated doc strings
- Parameters
-
static void sprockit::debug::print_debug_string |
( |
const std::string & |
str, |
|
|
std::ostream & |
os = std::cout |
|
) |
| |
|
static |
print_debug_string Extra detail (prefix_fxn) can be added to each debug print.
This provides a wrapper function that prints a given string with all associated prefix metadata. This ALWAYS prints, and is not dependent on certain debug slots being active.
- Parameters
-
str | The string to print after prefix metadata |
os | The stream to print to |
static void sprockit::debug::register_debug_slot |
( |
const std::string & |
str, |
|
|
debug_int * |
dint_ptr, |
|
|
const std::string & |
docstring |
|
) |
| |
|
static |
register_debug_slot Register a new debug slot that can be activated via the command line or input file flags
- Parameters
-
str | The unique string identifying the slot |
dint_ptr | A pointer to the debug integer that will be used for checking if debug printing is active. After registration, the debug integer pointed to will be updated. |
docstring | An docstring describing the output produced by the debug when the debug slot is active |
Referenced by sprockit::debug_register_slot::debug_register_slot().
static bool sprockit::debug::slot_active |
( |
const debug_int & |
allowed | ) |
|
|
static |
slot_active Determine whether a debug slot is active.
This is usually just a bitwise AND of the input parameter and a debug int with bits set to 1 for all the active slots
- Parameters
-
allowed | A debug integer indicating one or more possible debug slots |
- Returns
- Whether the slots in the input parameter match any of the active debug slots
static void sprockit::debug::turn_off |
( |
| ) |
|
|
static |
turn_off Turn off all debug printing for all flags
static void sprockit::debug::turn_off |
( |
debug_int & |
di | ) |
|
|
static |
turn_off Turn off a specific type of debug output
- Parameters
-
di | The identifier for the debug printing to deactivate |
static void sprockit::debug::turn_on |
( |
| ) |
|
|
static |
turn_on All debug flags that have been registered or previously turned on are reactivated
static void sprockit::debug::turn_on |
( |
debug_int & |
di | ) |
|
|
static |
turn_on Turn on a specific type of debug output
- Parameters
-
di | The identifier for the debug printing to activate |
static void sprockit::debug::turn_on |
( |
const std::string & |
str | ) |
|
|
static |
turn_on Another option for activating debug slots.
Instead of activating via debug_int, activate via the associated string name
- Parameters
-
str | The string name associated with a debug slot |
<= start_bitmask_ - some debug slots may have been selectively deactivated
Definition at line 116 of file debug.h.
std::map<std::string, debug_int*>* sprockit::debug::debug_ints_ |
|
static |
std::map<std::string, std::string>* sprockit::debug::docstrings_ |
|
static |
int sprockit::debug::num_bits_assigned |
|
static |
The number of debug slots that have been assigned unique indices.
Definition at line 118 of file debug.h.
The bitmask corresponding to all slots that were active at the beginning.
Definition at line 114 of file debug.h.
The documentation for this class was generated from the following file: