Public Member Functions | Private Member Functions | Private Attributes | Friends

preprocessor_streambuf Class Reference

Target for sending preprocessed output. More...

Inheritance diagram for preprocessor_streambuf:
Inheritance graph
[legend]
Collaboration diagram for preprocessor_streambuf:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 preprocessor_streambuf (preproc_map *)
void error (const std::string &, int)

Private Member Functions

virtual int underflow ()
 Called by an STL stream whenever it has reached the end of out_buffer_.
 preprocessor_streambuf (preprocessor_streambuf const &)

Private Attributes

std::string out_buffer_
 Buffer read by the STL stream.
std::stringstream buffer_
 Buffer filled by the current_ preprocessor.
preprocessorcurrent_
 Input preprocessor.
preproc_mapdefines_
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.

Friends

class preprocessor
class preprocessor_file
class preprocessor_data
struct preprocessor_deleter

Detailed Description

Target for sending preprocessed output.

Objects of this class can be plugged into an STL stream.

Definition at line 216 of file preprocessor.cpp.


Constructor & Destructor Documentation

preprocessor_streambuf::preprocessor_streambuf ( preprocessor_streambuf const &  t  )  [private]

Definition at line 258 of file preprocessor.cpp.

preprocessor_streambuf::preprocessor_streambuf ( preproc_map def  ) 

Definition at line 243 of file preprocessor.cpp.


Member Function Documentation

void preprocessor_streambuf::error ( const std::string &  error_type,
int  l 
)

Definition at line 345 of file preprocessor.cpp.

References ERR_CF, lineno_string(), location_, and pos.

Referenced by preprocessor_data::get_chunk().

Here is the call graph for this function:

Here is the caller graph for this function:

int preprocessor_streambuf::underflow (  )  [private, virtual]

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_.

Returns:
the first character of out_buffer_ if any, EOF otherwise.

Definition at line 279 of file preprocessor.cpp.

References buffer_, current_, preprocessor::get_chunk(), and out_buffer_.

Here is the call graph for this function:


Friends And Related Function Documentation

friend class preprocessor [friend]

Definition at line 233 of file preprocessor.cpp.

friend class preprocessor_data [friend]

Definition at line 235 of file preprocessor.cpp.

friend struct preprocessor_deleter [friend]

Definition at line 236 of file preprocessor.cpp.

friend class preprocessor_file [friend]

Definition at line 234 of file preprocessor.cpp.


Member Data Documentation

std::stringstream preprocessor_streambuf::buffer_ [private]

Buffer filled by the current_ preprocessor.

Definition at line 220 of file preprocessor.cpp.

Referenced by preprocessor_data::preprocessor_data(), preprocessor_data::put(), underflow(), and preprocessor::~preprocessor().

Input preprocessor.

Definition at line 221 of file preprocessor.cpp.

Referenced by preprocessor::preprocessor(), underflow(), and preprocessor::~preprocessor().

Definition at line 223 of file preprocessor.cpp.

Definition at line 222 of file preprocessor.cpp.

Referenced by preprocessor_data::get_chunk().

std::string preprocessor_streambuf::location_ [private]
std::string preprocessor_streambuf::out_buffer_ [private]

Buffer read by the STL stream.

Definition at line 218 of file preprocessor.cpp.

Referenced by underflow().

Set to true if one preprocessor for this target started to read a string.

Deeper-nested preprocessors are then forbidden to.

Definition at line 232 of file preprocessor.cpp.

Referenced by preprocessor_data::get_chunk().

std::string preprocessor_streambuf::textdomain_ [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:14:55 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs