The Battle for Wesnoth  1.17.4+dev
Public Member Functions | Public Attributes | List of all members
tracer::printer Struct Reference

Helper structure to print the tracing statistics. More...

#include <tracer.hpp>

Public Member Functions

 printer (const printer &)=delete
printeroperator= (const printer &)=delete
 printer (const tracer *const tracer__)
 ~printer ()

Public Attributes

const tracer *const tracer_
 The tracer, whose statistics to print. More...

Detailed Description

Helper structure to print the tracing statistics.

When the constructor gets a valid tracer pointer it prints the tracing statistics in its destructor. This allows the structure to be initialised at the beginning of a scope and print the statistics once the scope is left. (This makes it easier to write the tracing macros.)

Definition at line 37 of file tracer.hpp.

Constructor & Destructor Documentation

◆ printer() [1/2]

tracer::printer::printer ( const printer )

◆ printer() [2/2]

tracer::printer::printer ( const tracer *const  tracer__)

Definition at line 21 of file tracer.cpp.

◆ ~printer()

tracer::printer::~printer ( )

Definition at line 26 of file tracer.cpp.

References tracer::counters, tracer::function, tracer::run, and tracer_.

Member Function Documentation

◆ operator=()

printer& tracer::printer::operator= ( const printer )

Member Data Documentation

◆ tracer_

const tracer* const tracer::printer::tracer_

The tracer, whose statistics to print.

Definition at line 47 of file tracer.hpp.

Referenced by ~printer().

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