The Battle for Wesnoth  1.17.12+dev
Classes | Typedefs | Functions
preprocessor.hpp File Reference
#include "deprecation.hpp"
#include "exceptions.hpp"
#include "filesystem.hpp"
#include "game_version.hpp"
#include <optional>
#include <iosfwd>
#include <map>
#include <vector>
Include dependency graph for preprocessor.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  preproc_define
struct  preproc_config
struct  preproc_config::error


typedef std::map< std::string, struct preproc_definepreproc_map


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 Documentation

◆ preproc_map

typedef std::map<std::string, struct preproc_define> preproc_map

Definition at line 30 of file preprocessor.hpp.

Function Documentation

◆ lineno_string()

std::string lineno_string ( const std::string &  lineno)

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  stream,
const preproc_define def 

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  stream,
const preproc_map::value_type &  def 

Definition at line 245 of file preprocessor.cpp.

◆ preprocess_file()

filesystem::scoped_istream preprocess_file ( const std::string &  fname,
preproc_map defines = nullptr 

◆ preprocess_resource()

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 = ""