Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

preprocessor Class Reference

Base class for preprocessing an input. More...

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

List of all members.

Public Member Functions

virtual bool get_chunk ()=0
 Preprocesses and sends some text to the target_ buffer.
virtual ~preprocessor ()
 Restores the old preprocessing context of target_.

Protected Member Functions

 preprocessor (preprocessor_streambuf &)
 Sets up a new preprocessor for stream buffer t.

Protected Attributes

preprocessor_streambuftarget_

Private Attributes

preprocessor *const old_preprocessor_
std::string old_textdomain_
std::string old_location_
int old_linenum_

Detailed Description

Base class for preprocessing an input.

Definition at line 194 of file preprocessor.cpp.


Constructor & Destructor Documentation

preprocessor::preprocessor ( preprocessor_streambuf t  )  [protected]

Sets up a new preprocessor for stream buffer t.

Saves the current preprocessing context of target_. It will be automatically restored on destruction.

Definition at line 363 of file preprocessor.cpp.

References preprocessor_streambuf::current_, preprocessor_streambuf::depth_, and target_.

preprocessor::~preprocessor (  )  [virtual]

Restores the old preprocessing context of target_.

Appends location and domain directives to the buffer, so that the parser notices these changes.

Definition at line 379 of file preprocessor.cpp.

References preprocessor_streambuf::buffer_, preprocessor_streambuf::current_, preprocessor_streambuf::depth_, preprocessor_streambuf::linenum_, preprocessor_streambuf::location_, old_linenum_, old_location_, old_preprocessor_, old_textdomain_, target_, and preprocessor_streambuf::textdomain_.


Member Function Documentation

virtual bool preprocessor::get_chunk (  )  [pure virtual]

Preprocesses and sends some text to the target_ buffer.

Returns:
false when the input has no data left.

Implemented in preprocessor_file, and preprocessor_data.

Referenced by preprocessor_streambuf::underflow().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 199 of file preprocessor.cpp.

Referenced by ~preprocessor().

std::string preprocessor::old_location_ [private]

Definition at line 198 of file preprocessor.cpp.

Referenced by ~preprocessor().

Definition at line 196 of file preprocessor.cpp.

Referenced by ~preprocessor().

std::string preprocessor::old_textdomain_ [private]

Definition at line 197 of file preprocessor.cpp.

Referenced by ~preprocessor().


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:54 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs