The Battle for Wesnoth  1.15.2+dev
build_info.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2015 - 2018 by Iris Morelle <shadowm2006@gmail.com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
17 #include <string>
18 #include <vector>
19 
20 namespace game_config
21 {
22 
24 {
26 
28 
31 
37 
39 };
40 
42 {
43  std::string name;
44  bool enabled;
45 
46  optional_feature(const char* n) : name(n), enabled(false) {}
47 };
48 
49 /**
50  * Return a localized features table.
51  */
52 std::vector<optional_feature> optional_features_table();
53 
54 /**
55  * Produce a plain-text report of features suitable for stdout/stderr.
56  */
57 std::string optional_features_report();
58 
59 /**
60  * Retrieve the build-time version number of the given library.
61  */
62 const std::string& library_build_version(LIBRARY_ID lib);
63 
64 /**
65  * Retrieve the runtime version number of the given library.
66  */
67 const std::string& library_runtime_version(LIBRARY_ID lib);
68 
69 /**
70  * Retrieve the user-visible name for the given library.
71  */
72 const std::string& library_name(LIBRARY_ID lib);
73 
74 /**
75  * Produce a plain-text report of library versions suitable for stdout/stderr.
76  */
77 std::string library_versions_report();
78 
79 /**
80  * Produce a bug report-style info dump.
81  */
82 std::string full_build_report();
83 
84 } // end namespace game_config
std::string library_versions_report()
Produce a plain-text report of library versions suitable for stdout/stderr.
Definition: build_info.cpp:371
std::string optional_features_report()
Produce a plain-text report of features suitable for stdout/stderr.
Definition: build_info.cpp:411
const std::string & library_build_version(LIBRARY_ID lib)
Retrieve the build-time version number of the given library.
Definition: build_info.cpp:322
const std::string & library_name(LIBRARY_ID lib)
Retrieve the user-visible name for the given library.
Definition: build_info.cpp:340
std::vector< optional_feature > optional_features_table()
Return a localized features table.
Definition: build_info.cpp:312
Game configuration data as global variables.
Definition: build_info.cpp:49
const std::string & library_runtime_version(LIBRARY_ID lib)
Retrieve the runtime version number of the given library.
Definition: build_info.cpp:331
optional_feature(const char *n)
Definition: build_info.hpp:46
static map_location::DIRECTION n
std::string full_build_report()
Produce a bug report-style info dump.
Definition: build_info.cpp:443