Target for sending preprocessed output. More...
Public Member Functions | |
std::string | get_current_file () |
preprocessor_streambuf (preproc_map *) | |
void | error (const std::string &, int) |
void | warning (const std::string &, int) |
Private Member Functions | |
virtual int | underflow () |
Called by an STL stream whenever it has reached the end of out_buffer_. More... | |
preprocessor_streambuf (preprocessor_streambuf const &) | |
Private Attributes | |
std::string | out_buffer_ |
Buffer read by the STL stream. More... | |
std::stringstream | buffer_ |
Buffer filled by the current_ preprocessor. More... | |
preprocessor * | current_ |
Input preprocessor. More... | |
preproc_map * | defines_ |
preproc_map | default_defines_ |
std::string | textdomain_ |
std::string | location_ |
int | linenum_ |
int | depth_ |
bool | quoted_ |
Set to true if one preprocessor for this target started to read a string. More... | |
Friends | |
class | preprocessor |
class | preprocessor_file |
class | preprocessor_data |
struct | preprocessor_deleter |
Target for sending preprocessed output.
Objects of this class can be plugged into an STL stream.
Definition at line 221 of file preprocessor.cpp.
|
private |
Definition at line 286 of file preprocessor.cpp.
preprocessor_streambuf::preprocessor_streambuf | ( | preproc_map * | def | ) |
Definition at line 271 of file preprocessor.cpp.
void preprocessor_streambuf::error | ( | const std::string & | error_type, |
int | l | ||
) |
Definition at line 374 of file preprocessor.cpp.
References ERR_PREPROC, error(), lineno_string(), location_, and pos.
Referenced by preprocessor_data::get_chunk(), and preprocessor_file::preprocessor_file().
std::string preprocessor_streambuf::get_current_file | ( | ) |
Definition at line 251 of file preprocessor.cpp.
References current_, get_filename(), preprocessor::get_old_preprocessor(), preprocessor::is_macro(), location_, pos, and utils::quoted_split().
Referenced by preprocessor_data::get_chunk().
|
privatevirtual |
Called by an STL stream whenever it has reached the end of out_buffer_.
Fills buffer_ by calling the current_ preprocessor, then copies its content into out_buffer_.
Definition at line 307 of file preprocessor.cpp.
References buffer_, current_, preprocessor::get_chunk(), and out_buffer_.
void preprocessor_streambuf::warning | ( | const std::string & | warning_type, |
int | l | ||
) |
Definition at line 386 of file preprocessor.cpp.
References lineno_string(), location_, pos, and WRN_PREPROC.
Referenced by preprocessor_data::get_chunk().
|
friend |
Definition at line 238 of file preprocessor.cpp.
|
friend |
Definition at line 240 of file preprocessor.cpp.
|
friend |
Definition at line 241 of file preprocessor.cpp.
|
friend |
Definition at line 239 of file preprocessor.cpp.
|
private |
Buffer filled by the current_ preprocessor.
Definition at line 225 of file preprocessor.cpp.
Referenced by preprocessor_data::preprocessor_data(), preprocessor_data::put(), underflow(), and preprocessor::~preprocessor().
|
private |
Input preprocessor.
Definition at line 226 of file preprocessor.cpp.
Referenced by get_current_file(), preprocessor::preprocessor(), underflow(), and preprocessor::~preprocessor().
|
private |
Definition at line 228 of file preprocessor.cpp.
|
private |
Definition at line 227 of file preprocessor.cpp.
Referenced by preprocessor_data::get_chunk().
|
private |
Definition at line 232 of file preprocessor.cpp.
Referenced by preprocessor_data::get_chunk(), preprocessor::preprocessor(), and preprocessor::~preprocessor().
|
private |
Definition at line 231 of file preprocessor.cpp.
Referenced by preprocessor_data::preprocessor_data(), preprocessor_data::put(), and preprocessor::~preprocessor().
|
private |
Definition at line 230 of file preprocessor.cpp.
Referenced by error(), preprocessor_data::get_chunk(), get_current_file(), preprocessor_data::preprocessor_data(), preprocessor_data::push_token(), preprocessor_data::put(), warning(), and preprocessor::~preprocessor().
|
private |
Buffer read by the STL stream.
Definition at line 223 of file preprocessor.cpp.
Referenced by underflow().
|
private |
Set to true if one preprocessor for this target started to read a string.
Deeper-nested preprocessors are then forbidden to.
Definition at line 237 of file preprocessor.cpp.
Referenced by preprocessor_data::get_chunk().
|
private |
Definition at line 229 of file preprocessor.cpp.
Referenced by preprocessor_data::get_chunk(), preprocessor_data::preprocessor_data(), preprocessor_file::preprocessor_file(), preprocessor_data::push_token(), and preprocessor::~preprocessor().