Traces service.
More...
#include <traces.h>
Traces service.
Definition at line 114 of file traces.h.
◆ Traces()
◆ ~Traces()
virtual Traces::~Traces |
( |
void |
| ) |
|
|
virtual |
◆ Declare()
const bool Traces::Declare |
( |
const TraceClass & |
CLI_Class | ) |
|
Trace class declaration.
- Returns
- true if the class has been declared successfully or the class was already declared.
-
false if an error as occurred.
- Parameters
-
CLI_Class | Trace class to declare. |
◆ GetAllClasses()
All classes accessor.
- Returns
- List of all trace classes that have been registered.
◆ GetCurrentFilter()
Current filter retrieval.
- Returns
- List of trace classes that constitutes the current trace filter.
◆ GetInstance()
static Traces& Traces::GetInstance |
( |
void |
| ) |
|
|
static |
Singleton.
- Returns
- Only one instance of the kind.
◆ GetStream()
Stream access.
- Returns
- Trace stream reference.
◆ IsTraceOn()
const bool Traces::IsTraceOn |
( |
const TraceClass & |
CLI_Class | ) |
const |
Trace status.
- Returns
- true if the trace is active, false otherwise.
- Parameters
-
◆ SafeTrace()
Safe trace routine.
- Returns
- Trace output stream prepared to receive the trace. Null device if trace is avoided.
- Note
- Prevents output from infinite loops.
- Parameters
-
CLI_Class | Trace class. |
CLI_AvoidStream | Avoid stream from being sent characters. |
◆ SetAllFilter()
const bool Traces::SetAllFilter |
( |
const bool |
B_ShowTraces | ) |
|
All filter management.
- Returns
- true for success, false otherwise.
Same as above but for all filters in one operation.
- Parameters
-
B_ShowTraces | Show traces flag. |
◆ SetFilter()
const bool Traces::SetFilter |
( |
const TraceClass & |
CLI_Class, |
|
|
const bool |
B_ShowTraces |
|
) |
| |
Current filter modification.
- Returns
- true if the filter has been set (or was set previously), false otherwise.
- Parameters
-
CLI_Class | Trace class. |
B_ShowTraces | Show traces flag. |
◆ SetStream()
Stream positionning (if not already set).
- Returns
- true: success, false: failure.
- Warning
- For consistency reasons, if you use this method, you should better call UnsetStream() before program termination.
When SetStream() has not been called previously, then it takes CLI_Stream in account immediately for tracing. Otherwise it stacks the stream (for consistency concerns) and waits for the previous ones to be released possibly.
- Parameters
-
CLI_Stream | Stream reference. |
◆ Trace()
Trace routine.
- Returns
- Trace output stream prepared to receive the trace.
- Note
- If enabled, the trace is directed to the output stream of the shell corresponding to context element.
- Parameters
-
◆ UnsetStream()
Stream dereferencing.
- Returns
- true: success, false: failure.
This method should be called if you have previously called SetStream().
- Parameters
-
CLI_Stream | Stream reference. |
The documentation for this class was generated from the following file: