The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Public Attributes | List of all members
ttracer Struct Reference

Helper structure for gathering the tracing statistics. More...

#include <tracer.hpp>

Inheritance diagram for ttracer:
Inheritance graph

Classes

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

Public Member Functions

 ttracer (const char *const function__)
 

Public Attributes

int run
 The total number of runs. More...
 
const char *const function
 The function being traced. More...
 
std::map< std::pair< int,
std::string >, int
counters
 The tracer counters. More...
 

Detailed Description

Helper structure for gathering the tracing statistics.

Definition at line 29 of file tracer.hpp.

Constructor & Destructor Documentation

ttracer::ttracer ( const char *const  function__)
explicit

Definition at line 58 of file tracer.cpp.

Member Data Documentation

std::map<std::pair<int, std::string>, int> ttracer::counters

The tracer counters.

The first pair contains a line number and a name of the marker. This has two advantages:

  • A line number is always unique, thus if using markers with the same name, they are not the same marker.
  • The markers are sorted in order of appearance and not in order of their names.

The second pair contains the number of times a marker is hit.

Definition at line 71 of file tracer.hpp.

const char* const ttracer::function

The function being traced.

Definition at line 57 of file tracer.hpp.

int ttracer::run

The total number of runs.

Definition at line 54 of file tracer.hpp.


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