ug4
ug::DebugID Class Reference

#include <debug_id.h>

Public Member Functions

 DebugID (const char *str)
 registers the DebugID at DebugIDManager More...
 
 DebugID (uint32 hash)
 
int get_debug_level () const
 returns the debug level via GetDebugIDManager. More...
 
bool set_debug_level (int level)
 sets the debug level via GetDebugIDManager. More...
 

Private Attributes

uint32 m_hash
 

Friends

class DebugIDManager
 

Detailed Description

A DebugID is an object to control the debug level of parts of the code. It can be used in

ug4's standard DebugIDs are APP, LIB_GRID, LIB_GRID_REFINER, LIB_DISC, LIB_DISC_ASSEMBLE, LIB_DISC_D3F, LIB_DISC_MULTIGRID, LIB_DISC_NEWTON, LIB_DISC_LINKER, LIB_DISC_TRANSFER, LIB_DISC_DISCRETE_FUNCTION, LIB_DISC_OUTPUT, LIB_DISC_OPERATOR_INVERSE, LIB_ALG_LINEAR_OPERATOR, LIB_ALG_LINEAR_SOLVER, LIB_ALG_VECTOR, LIB_ALG_MATRIX, LIB_ALG_AMG, LIB_PCL

They are managed with

See also
DebugIDManager. You can define your own DebugID the following way: In a cpp file:
DebugID DID_MYAPP("MyApp")
DebugID DID_MYAPP_PARALLELIZATION("MyApp.Parallelization")
DebugID(const char *str)
registers the DebugID at DebugIDManager
Definition: debug_id.cpp:50

{.cpp}

Now to use it in other files you need to add there

extern DebugID DID_MYAPP, DID_MYAPP_PARALLELIZATION;
...
UG_DLOG(DID_MYAPP, 3, "bla");

{.cpp}

Note that the DebugID OBJECT is called DID_MYAPP, but its string identifier is "MyApp" (this is used in the script system). In LUA script you can do

GetLogAssistant():set_debug_level("MyApp", 3) or, with completion (UGIDE) SetDebugLevel(debugID.MyApp, 3)

Note
The actual DebugID level is stored in DebugIDManager.

The documentation for this class was generated from the following files: