libIntegra
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Static Public Member Functions | List of all members
integra_api::CTrace Class Reference

Handles console output. More...

#include "api/trace.h"

Static Public Member Functions

static void set_categories_to_trace (bool errors, bool progress, bool verbose)
 Customise the types of message which should be traced. More...
 
static void set_details_to_trace (bool timestamp, bool location, bool thread)
 Customise the additional information which should be written with each message. More...
 
static std::ostream & error (const char *location)
 
static std::ostream & progress (const char *location)
 
static std::ostream & verbose (const char *location)
 

Detailed Description

Handles console output.

libIntegra handles errors and reports progress by writing to the console. This is done by the macros INTEGRA_TRACE_ERROR, INTEGRA_TRACE_PROGRESS and INTEGRA_TRACE_VERBOSE, which in turn call methods in CTrace

CTrace is exposed in libIntegra's api in order to allow users of the api to customise what is traced.

Note
CTrace need never be instantiated - all its methods are static and stateless.

Member Function Documentation

static std::ostream& integra_api::CTrace::error ( const char *  location)
static

Internal use only

static std::ostream& integra_api::CTrace::progress ( const char *  location)
static

Internal use only

static void integra_api::CTrace::set_categories_to_trace ( bool  errors,
bool  progress,
bool  verbose 
)
static

Customise the types of message which should be traced.

By default, errors and progress are traced, verbose messages are not

static void integra_api::CTrace::set_details_to_trace ( bool  timestamp,
bool  location,
bool  thread 
)
static

Customise the additional information which should be written with each message.

By default, messages are stamped with time and location, but not thread ID.

Parameters
timestampWrite the date/time into each message
locationWrite the source file, line number and function name into each message
threadWrite id of the currently executing thread into each message
static std::ostream& integra_api::CTrace::verbose ( const char *  location)
static

Internal use only


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