Base class for preprocessing an input. More...
Public Types | |
enum | MODE { NO_PARSING , PARSES_FILE , PARSES_MACRO } |
Public Member Functions | |
virtual | ~preprocessor () |
virtual void | init () |
Allows specifying any actions that need to be called after the constructor completes. More... | |
virtual bool | get_chunk ()=0 |
Preprocesses and sends some text to the parent_ buffer. More... | |
virtual MODE | parse_mode () |
Returns the appropriate parsing mode for this preprocessor. More... | |
Protected Member Functions | |
preprocessor (preprocessor_streambuf &t) | |
Sets up a new preprocessor for stream buffer t. More... | |
Protected Attributes | |
preprocessor_streambuf & | parent_ |
Private Attributes | |
std::string | old_textdomain_ |
std::string | old_location_ |
int | old_linenum_ |
Friends | |
class | preprocessor_streambuf |
Base class for preprocessing an input.
Definition at line 256 of file preprocessor.cpp.
enum preprocessor::MODE |
Enumerator | |
---|---|
NO_PARSING | |
PARSES_FILE | |
PARSES_MACRO |
Definition at line 287 of file preprocessor.cpp.
|
protected |
Sets up a new preprocessor for stream buffer t.
Preprocessor constructor.
Saves the current preprocessing context of parent_. It will be automatically restored on destruction.
It relies on preprocessor_streambuf so it's implemented after that class is declared.
Definition at line 406 of file preprocessor.cpp.
|
inlinevirtual |
Definition at line 272 of file preprocessor.cpp.
|
pure virtual |
Preprocesses and sends some text to the parent_ buffer.
Implemented in preprocessor_data, and preprocessor_file.
|
inlinevirtual |
Allows specifying any actions that need to be called after the constructor completes.
Reimplemented in preprocessor_file.
Definition at line 277 of file preprocessor.cpp.
|
inlinevirtual |
Returns the appropriate parsing mode for this preprocessor.
Reimplemented in preprocessor_data.
Definition at line 290 of file preprocessor.cpp.
References NO_PARSING.
Referenced by preprocessor_streambuf::get_current_file().
|
friend |
Definition at line 258 of file preprocessor.cpp.
Referenced by preprocessor_data::get_chunk().
|
private |
Definition at line 299 of file preprocessor.cpp.
Referenced by preprocessor_streambuf::restore_old_preprocessor().
|
private |
Definition at line 297 of file preprocessor.cpp.
Referenced by preprocessor_streambuf::restore_old_preprocessor().
|
private |
Definition at line 296 of file preprocessor.cpp.
Referenced by preprocessor_streambuf::restore_old_preprocessor().
|
protected |
Definition at line 269 of file preprocessor.cpp.
Referenced by preprocessor_file::get_chunk(), preprocessor_data::get_chunk(), preprocessor_file::init(), preprocessor_file::preprocessor_file(), preprocessor_data::push_token(), and preprocessor_data::put().