The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Typedefs | Functions
preprocessor.hpp File Reference
#include <iosfwd>
#include <map>
#include <vector>
#include "game_errors.hpp"
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.

Classes

struct  preproc_define
 
struct  preproc_config
 
struct  preproc_config::error
 

Typedefs

typedef std::map< std::string,
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)
 
std::istream * preprocess_file (std::string const &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, std::string target_directory="")
 

Typedef Documentation

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

Definition at line 30 of file preprocessor.hpp.

Function Documentation

std::string lineno_string ( const std::string lineno)
std::ostream& operator<< ( std::ostream &  stream,
const preproc_define def 
)

Definition at line 177 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 182 of file preprocessor.cpp.

std::istream* preprocess_file ( std::string const &  fname,
preproc_map defines = nullptr 
)

Function to use the WML preprocessor on a file.

Parameters
definesA map of symbols defined.
Returns
The resulting preprocessed file data.
void preprocess_resource ( const std::string res_name,
preproc_map defines_map,
bool  write_cfg = false,
bool  write_plain_cfg = false,
std::string  target_directory = "" 
)