The Battle for Wesnoth  1.19.17+dev
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
reports Class Reference

#include <reports.hpp>

Classes

class  context
 
struct  generator
 

Public Types

using generator_function = std::function< config(const reports::context &)>
 
typedef std::map< std::string, std::shared_ptr< reports::generator > > dynamic_report_generators
 

Public Member Functions

void register_generator (const std::string &name, generator *)
 
config generate_report (const std::string &name, const context &ct)
 Generate the specified report using the given context. More...
 
config generate_builtin_report (const std::string &name, const context &rc)
 Generate the specified report using the given context, excluding dynamic generators. More...
 
const std::set< std::string > & report_list ()
 

Private Attributes

std::set< std::string > all_reports_
 
dynamic_report_generators dynamic_generators_
 

Detailed Description

Definition at line 45 of file reports.hpp.

Member Typedef Documentation

◆ dynamic_report_generators

typedef std::map<std::string, std::shared_ptr<reports::generator> > reports::dynamic_report_generators

Definition at line 90 of file reports.hpp.

◆ generator_function

using reports::generator_function = std::function<config(const reports::context&)>

Definition at line 88 of file reports.hpp.

Member Function Documentation

◆ generate_builtin_report()

config reports::generate_builtin_report ( const std::string &  name,
const context rc 
)

Generate the specified report using the given context, excluding dynamic generators.

Definition at line 1867 of file reports.cpp.

References static_generators.

Referenced by generate_report(), and game_lua_kernel::impl_theme_item().

◆ generate_report()

config reports::generate_report ( const std::string &  name,
const context ct 
)

Generate the specified report using the given context.

Definition at line 1857 of file reports.cpp.

References dynamic_generators_, and generate_builtin_report().

Referenced by display::refresh_report().

◆ register_generator()

void reports::register_generator ( const std::string &  name,
reports::generator g 
)

◆ report_list()

const std::set< std::string > & reports::report_list ( )

Member Data Documentation

◆ all_reports_

std::set<std::string> reports::all_reports_
private

Definition at line 94 of file reports.hpp.

Referenced by register_generator(), and report_list().

◆ dynamic_generators_

dynamic_report_generators reports::dynamic_generators_
private

Definition at line 96 of file reports.hpp.

Referenced by generate_report(), register_generator(), and report_list().


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