#include "tstring.hpp"
#include <string>
Go to the source code of this file.
Classes | |
struct | twml_exception |
Helper class, don't construct this directly. More... | |
Defines | |
#define | VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __FUNCTION__, message) |
The macro to use for the validation of WML. | |
Functions | |
void | wml_exception (const char *cond, const char *file, const int line, const char *function, const t_string &message) |
Helper function, don't call this directly. | |
void | wml_exception (const char *cond, const char *file, const int line, const char *function, const char *message) |
Helper function, don't call this directly. | |
void | wml_exception (const char *cond, const char *file, const int line, const char *function, const std::string &message) |
Helper function, don't call this directly. | |
t_string | missing_mandatory_wml_key (const std::string §ion, const std::string &key, const std::string &primary_key="", const std::string &primary_value="") |
Returns a standard message for a missing wml key. |
Definition in file wml_exception.hpp.
#define VALIDATE | ( | cond, | |||
message | ) | if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __FUNCTION__, message) |
The macro to use for the validation of WML.
cond | The condition to test, if false and exception is generated. | |
message | The translatable message to show at the user. |
Definition at line 46 of file wml_exception.hpp.
Referenced by ai::analyze_potential_recruit_combat(), battle_context::battle_context(), shortest_path_calculator::cost(), move_cost_calculator::cost(), default_generate_map(), gui2::ttext::draw(), gui2::trectangle::draw(), gui2::tline::draw(), get_player_info(), gamestatus::get_time_of_day(), gamestatus::get_time_of_day_turn(), image::getMinimap(), gui2::tgui_definition::load_definitions(), gui2::tcontrol_definition::load_resolutions(), gui2::load_settings(), gamestatus::next_time_of_day(), gui2::twindow_builder::read(), gui2::tgui_definition::read(), gamemap::read(), preferences::server_list(), gui2::tmp_method_selection::show(), gui2::tlanguage_selection::show(), t_translation::string_to_layer_(), theme::tborder::tborder(), gui2::tbuilder_grid::tbuilder_grid(), gui2::tbuilder_listbox::tbuilder_listbox(), gui2::tbuilder_panel::tbuilder_panel(), gui2::tcontrol_definition::tcontrol_definition(), terrain_type::terrain_type(), gui2::twindow_builder::tresolution::tresolution(), gui2::tvertical_scrollbar_definition::tresolution::tresolution(), gui2::tlistbox_definition::tresolution::tresolution(), gui2::tstate_definition::tstate_definition(), and font::word_wrap_text().
t_string missing_mandatory_wml_key | ( | const std::string & | section, | |
const std::string & | key, | |||
const std::string & | primary_key = "" , |
|||
const std::string & | primary_value = "" | |||
) |
Returns a standard message for a missing wml key.
section | The section is which the key should appear. | |
key | The ommitted key. | |
primary_key | The primary key of the section. | |
primary_value | The value of the primary key (mandatory if primary key isn't empty). |
Definition at line 60 of file wml_exception.cpp.
References vgettext().
Referenced by gui2::twindow_builder::read(), gui2::tgui_definition::read(), gui2::tcontrol_definition::tcontrol_definition(), terrain_type::terrain_type(), gui2::twindow_builder::tresolution::tresolution(), and gui2::tvertical_scrollbar_definition::tresolution::tresolution().
void wml_exception | ( | const char * | cond, | |
const char * | file, | |||
const int | line, | |||
const char * | function, | |||
const std::string & | message | |||
) | [inline] |
Helper function, don't call this directly.
Definition at line 69 of file wml_exception.hpp.
References wml_exception().
void wml_exception | ( | const char * | cond, | |
const char * | file, | |||
const int | line, | |||
const char * | function, | |||
const char * | message | |||
) | [inline] |
Helper function, don't call this directly.
Definition at line 62 of file wml_exception.hpp.
References wml_exception().
void wml_exception | ( | const char * | cond, | |
const char * | file, | |||
const int | line, | |||
const char * | function, | |||
const t_string & | message | |||
) |
Helper function, don't call this directly.
cond | The textual presentation of the test that failed. | |
file | The file in which the test failed. | |
line | The line at which the test failed. | |
function | The funtion in which the test failed. | |
message | The translatable message to show the user. |
Definition at line 30 of file wml_exception.cpp.
References t_string::str().
Referenced by wml_exception().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |