#include "deprecation.hpp"
#include "exceptions.hpp"
#include "filesystem.hpp"
#include "game_version.hpp"
#include "utils/optional_fwd.hpp"
#include <iosfwd>
#include <map>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
struct | preproc_define |
struct | preproc_config |
struct | preproc_config::error |
Typedefs | |
typedef std::map< std::string, struct preproc_define > | preproc_map |
Functions | |
std::ostream & | operator<< (std::ostream &stream, const preproc_define &def) |
std::string | lineno_string (const std::string &lineno) |
std::ostream & | operator<< (std::ostream &stream, const preproc_map::value_type &def) |
filesystem::scoped_istream | preprocess_file (const std::string &fname, preproc_map *defines=nullptr) |
Function to use the WML preprocessor on a file. More... | |
void | preprocess_resource (const std::string &res_name, preproc_map *defines_map, bool write_cfg=false, bool write_plain_cfg=false, const std::string &target_directory="") |
typedef std::map<std::string, struct preproc_define> preproc_map |
Definition at line 34 of file preprocessor.hpp.
std::string lineno_string | ( | const std::string & | lineno | ) |
Definition at line 527 of file preprocessor.cpp.
References get_filename(), i, draw::line(), preprocessor_error_detail_prefix, and utils::quoted_split().
Referenced by schema_validation::at(), preprocessor_streambuf::error(), preprocessor_data::get_chunk(), and preprocessor_streambuf::warning().
std::ostream& operator<< | ( | std::ostream & | stream, |
const preproc_define & | def | ||
) |
Definition at line 237 of file preprocessor.cpp.
References preproc_define::location, and preproc_define::value.
std::ostream& operator<< | ( | std::ostream & | stream, |
const preproc_map::value_type & | def | ||
) |
Definition at line 242 of file preprocessor.cpp.
filesystem::scoped_istream preprocess_file | ( | const std::string & | fname, |
preproc_map * | defines = nullptr |
||
) |
Function to use the WML preprocessor on a file.
defines | A map of symbols defined. |
fname | The file to be preprocessed. |
Definition at line 1742 of file preprocessor.cpp.
References log_scope.
Referenced by BOOST_AUTO_TEST_CASE(), gui2::dialogs::editor_edit_unit::editor_edit_unit(), ai::configuration::get_side_config_from_file(), handle_validate_command(), gui2::init(), ng::create_engine::init_all_levels(), lua_wml::intf_load_wml(), font::load_font_config(), load_language_list(), editor::map_context::load_scenario(), gui2::dialogs::editor_edit_pbl::pre_show(), preprocess_and_parse(), preprocess_resource(), achievements::read_achievements_file(), wesnothd::server::read_config(), schema_validation::schema_validator::read_config_file(), game_config::config_cache::read_configs(), editor::map_context::save_schedule(), and editor::map_context::to_config().
void preprocess_resource | ( | const std::string & | res_name, |
preproc_map * | defines_map, | ||
bool | write_cfg = false , |
||
bool | write_plain_cfg = false , |
||
const std::string & | target_directory = "" |
||
) |
Definition at line 1750 of file preprocessor.cpp.
References filesystem::base_name(), filesystem::create_directory_if_missing_recursive(), filesystem::directory_name(), filesystem::DO_REORDER, encode_filename, filesystem::ENTIRE_FILE_PATH, filesystem::get_files_in_dir(), filesystem::is_cfg(), filesystem::is_directory(), LOG_PREPROC, filesystem::ostream_file(), preprocess_file(), read(), filesystem::SKIP_MEDIA_DIR, write(), and filesystem::write_file().
Referenced by handle_preprocess_command().