The Battle for Wesnoth  1.19.7+dev
Classes | Namespaces | Typedefs | Enumerations | Functions
help_impl.hpp File Reference
#include "color.hpp"
#include "exceptions.hpp"
#include "font/constants.hpp"
#include "font/standard_colors.hpp"
#include "gettext.hpp"
#include "serialization/string_utils.hpp"
#include "utils/optional_fwd.hpp"
#include <cstring>
#include <list>
#include <memory>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <boost/logic/tribool.hpp>
#include "config.hpp"
Include dependency graph for help_impl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  help::topic_generator
 Generate a topic text on the fly. More...
 
class  help::text_topic_generator
 
class  help::topic_text
 The text displayed in a topic. More...
 
struct  help::topic
 A topic contains a title, an id and some text. More...
 
struct  help::section
 A section contains topics and sections along with title and ID. More...
 
class  help::has_id
 To be used as a function object to locate sections and topics with a specified ID. More...
 
class  help::title_less
 To be used as a function object when sorting topic lists on the title. More...
 
class  help::section_less
 To be used as a function object when sorting section lists on the title. More...
 
class  help::string_less
 
struct  help::parse_error
 Thrown when the help system fails to parse something. More...
 

Namespaces

 help
 

Typedefs

typedef std::list< section > help::section_list
 
typedef std::list< topic > help::topic_list
 

Enumerations

enum  help::UNIT_DESCRIPTION_TYPE { help::FULL_DESCRIPTION , help::NO_DESCRIPTION , help::HIDDEN_BUT_SHOW_MACROS }
 

Functions

void help::generate_contents ()
 Generate the help contents from the configurations given to the manager. More...
 
void help::generate_sections (const config *help_cfg, const std::string &generator, section &sec, int level)
 Dispatch generators to their appropriate functions. More...
 
std::vector< topic > help::generate_topics (const bool sort_generated, const std::string &generator)
 
std::string help::generate_topic_text (const std::string &generator, const config *help_cfg, const section &sec)
 
std::string help::generate_contents_links (const std::string &section_name, config const *help_cfg)
 
std::string help::generate_contents_links (const section &sec)
 
std::string help::make_unit_link (const std::string &type_id)
 return a hyperlink with the unit's name and pointing to the unit page return empty string if this unit is hidden. More...
 
std::vector< std::string > help::make_unit_links_list (const std::vector< std::string > &type_id_list, bool ordered=false)
 return a list of hyperlinks to unit's pages (ordered or not) More...
 
void help::generate_races_sections (const config *help_cfg, section &sec, int level)
 
void help::generate_terrain_sections (section &sec, int)
 
std::vector< topic > help::generate_unit_topics (const bool sort_generated, const std::string &race)
 
void help::generate_unit_sections (const config *, section &sec, int, const bool, const std::string &race)
 
UNIT_DESCRIPTION_TYPE help::description_type (const unit_type &type)
 Return the type of description that should be shown for a unit of the given kind. More...
 
std::vector< topic > help::generate_ability_topics (const bool sort_generated)
 
std::vector< topic > help::generate_time_of_day_topics (const bool)
 
std::vector< topic > help::generate_weapon_special_topics (const bool sort_generated)
 
void help::generate_era_sections (const config *help_cfg, section &sec, int level)
 
std::vector< topic > help::generate_faction_topics (const config &era, const bool sort_generated)
 
std::vector< topic > help::generate_era_topics (const bool sort_generated, const std::string &era_id)
 
std::vector< topic > help::generate_trait_topics (const bool sort_generated)
 
section help::parse_config (const config *cfg)
 Parse a help config, return the top level section. More...
 
void help::parse_config_internal (const config *help_cfg, const config *section_cfg, section &sec, int level=0)
 Recursive function used by parse_config. More...
 
bool help::section_is_referenced (const std::string &section_id, const config &cfg)
 Return true if the section with id section_id is referenced from another section in the config, or the toplevel. More...
 
bool help::topic_is_referenced (const std::string &topic_id, const config &cfg)
 Return true if the topic with id topic_id is referenced from another section in the config, or the toplevel. More...
 
const topic * help::find_topic (const section &sec, const std::string &id)
 Search for the topic with the specified identifier in the section and its subsections. More...
 
const section * help::find_section (const section &sec, const std::string &id)
 Search for the section with the specified identifier in the section and its subsections. More...
 
section * help::find_section (section &sec, const std::string &id)
 
std::string help::remove_first_space (const std::string &text)
 
std::string help::get_first_word (const std::string &s)
 Return the first word in s, not removing any spaces in the start of it. More...
 
std::shared_ptr< terrain_type_datahelp::load_terrain_types_data ()
 Load the appropriate terrain types data to use. More...
 
std::string help::hidden_symbol (bool hidden)
 
bool help::is_visible_id (const std::string &id)
 
bool help::is_valid_id (const std::string &id)
 Return true if the id is valid for user defined topics and sections. More...