The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
preprocessor_file Class Reference

Specialized preprocessor for handling a file or a set of files. More...

Inheritance diagram for preprocessor_file:
Inheritance graph

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::stringfiles_
 
std::vector< std::string >
::const_iterator 
pos_
 
std::vector< std::string >
::const_iterator 
end_
 
- Private Attributes inherited from preprocessor
preprocessor_streambuftarget_
 

Additional Inherited Members

- Private Member Functions inherited from preprocessor
preprocessorget_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

preprocessor_file::preprocessor_file ( preprocessor_streambuf t,
std::string const &  name,
size_t  symbol_index = -1 
)

Member Function Documentation

bool preprocessor_file::get_chunk ( )
virtual

preprocessor_file::get_chunk()

Inserts and processes the next file in the list of included files.

Returns
false if there is no next file.

Implements preprocessor.

Definition at line 592 of file preprocessor.cpp.

References end_, pos_, preprocessor_file(), and preprocessor::target_.

Member Data Documentation

std::vector< std::string >::const_iterator preprocessor_file::end_
private

Definition at line 443 of file preprocessor.cpp.

Referenced by get_chunk(), and preprocessor_file().

std::vector< std::string > preprocessor_file::files_
private

Definition at line 442 of file preprocessor.cpp.

Referenced by preprocessor_file().

std::vector< std::string >::const_iterator preprocessor_file::pos_
private

Definition at line 443 of file preprocessor.cpp.

Referenced by get_chunk(), and preprocessor_file().


The documentation for this class was generated from the following file: