The Battle for Wesnoth  1.15.2+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 36 of file tracer.hpp.

Constructor & Destructor Documentation

◆ printer() [1/2]

tracer::printer::printer ( const printer )
delete

◆ printer() [2/2]

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

Definition at line 20 of file tracer.cpp.

◆ ~printer()

tracer::printer::~printer ( )

Definition at line 25 of file tracer.cpp.

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

Member Function Documentation

◆ operator=()

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

Member Data Documentation

◆ tracer_

const tracer* const tracer::printer::tracer_

The tracer, whose statistics to print.

Definition at line 46 of file tracer.hpp.

Referenced by ~printer().


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