The Battle for Wesnoth  1.19.5+dev
Classes | Typedefs | Functions
preprocessor.hpp File Reference
#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>
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, struct preproc_definepreproc_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 Documentation

◆ preproc_map

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

Definition at line 34 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 
)

Definition at line 237 of file preprocessor.cpp.

References preproc_define::location, and preproc_define::value.

◆ operator<<() [2/2]

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

Definition at line 242 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 = "" 
)