Specialized preprocessor for handling a file or a set of files. More...
Public Member Functions | |
preprocessor_file (preprocessor_streambuf &, std::string const &, size_t) | |
virtual bool | get_chunk () |
preprocessor_file::get_chunk() More... | |
Private Attributes | |
std::vector< std::string > | files_ |
std::vector< std::string > ::const_iterator | pos_ |
std::vector< std::string > ::const_iterator | end_ |
![]() | |
preprocessor_streambuf & | target_ |
Additional Inherited Members | |
![]() | |
preprocessor * | get_old_preprocessor () |
Preprocesses and sends some text to the target_ buffer. More... | |
virtual int | is_macro () |
retruns 1 if this parses a macro, -1 if this doesnt parse text (if this is no preprocessor_data). 0 otherwise (this parses a file). More... | |
virtual | ~preprocessor () |
Restores the old preprocessing context of target_. More... | |
preprocessor (preprocessor_streambuf &) | |
Sets up a new preprocessor for stream buffer t. More... | |
Specialized preprocessor for handling a file or a set of files.
A preprocessor_file object is created when a preprocessor encounters an inclusion directive that resolves to a file or directory, e.g. '{themes/}'.
Definition at line 440 of file preprocessor.cpp.
preprocessor_file::preprocessor_file | ( | preprocessor_streambuf & | t, |
std::string const & | name, | ||
size_t | symbol_index = -1 |
||
) |
Definition at line 551 of file preprocessor.cpp.
References filesystem::base_name(), filesystem::directory_name(), filesystem::DO_REORDER, end_, filesystem::ENTIRE_FILE_PATH, ERR_PREPROC, preprocessor_streambuf::error(), files_, filesystem::get_files_in_dir(), filesystem::get_short_wml_path(), filesystem::is_directory(), filesystem::istream_file(), pos_, filesystem::SKIP_MEDIA_DIR, preprocessor::target_, and preprocessor_streambuf::textdomain_.
Referenced by get_chunk().
|
virtual |
preprocessor_file::get_chunk()
Inserts and processes the next file in the list of included files.
Implements preprocessor.
Definition at line 592 of file preprocessor.cpp.
References end_, pos_, preprocessor_file(), and preprocessor::target_.
|
private |
Definition at line 443 of file preprocessor.cpp.
Referenced by get_chunk(), and preprocessor_file().
|
private |
Definition at line 442 of file preprocessor.cpp.
Referenced by preprocessor_file().
|
private |
Definition at line 443 of file preprocessor.cpp.
Referenced by get_chunk(), and preprocessor_file().