Lumiera  0.pre.03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
diagnostic-context.hpp File Reference

Go to the source code of this file.


Facility for collecting diagnostic context information explicitly.

Unlike a trace logging run, this facility is intended to be fed explicitly with diagnostic information describing the currently ongoing operation in a semantic high-level manner. The rationale is to pinpoint those pieces of information, which aren't obvious when just looking at a callstack with the debugger. Instances of the class DiagnosticContext should be placed explicitly as automatic (stack) variable into selected relevant scopes; these "information frames" could be accessed from an enclosed scope as a per-thread stack. DiagnosticContext provides an controlled environment for adding diagnostic code on demand; typically to be configured such as to resolve into an empty class for release builds.

As of 2/10, this is an experimental feature in evaluation. To start with, I'll use it to solve the problem of providing a NoBug resource tracker handle without tangling the object monitor code (sync.hpp) with low level, NoBug related implementation details.

add the actual diagnostic content

Definition in file diagnostic-context.hpp.

#include "lib/error.hpp"
#include "lib/nocopy.hpp"
#include "lib/thread-local.hpp"
#include <nobug.h>


class  DiagnosticContext< VAL >
 Diagnostic data frame to collect specific information concerning a scope. More...


 Implementation namespace for support and library code.