CPP_Token_Stream_Prep Class Reference

A CPP_Token_Stream, does not include preprocessor directives. Doing so would greatly complicate any grammer. Instead, preprocessor directives are handled only if desired in an out of band style. To handle preprocessor directives, derive a class from this one (CPP_Token_Stream_Prep) and implement a virtual method which will be invoked by the stream as preprocessor directives are encountered. Note that the '#' and any spaces surrounding it will not be included in the text passed to the virtual method. More...

#include <cpp_token_stream.h>

Inheritance diagram for CPP_Token_Stream_Prep:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CPP_Token_Stream_Prep ()
 default constructor
virtual void operator() (std::string const &text, std::string const &file, int line) const =0
 User defined callback handler to deal with preprocessor tokens.
virtual ~CPP_Token_Stream_Prep ()

Detailed Description

A CPP_Token_Stream, does not include preprocessor directives. Doing so would greatly complicate any grammer. Instead, preprocessor directives are handled only if desired in an out of band style. To handle preprocessor directives, derive a class from this one (CPP_Token_Stream_Prep) and implement a virtual method which will be invoked by the stream as preprocessor directives are encountered. Note that the '#' and any spaces surrounding it will not be included in the text passed to the virtual method.

Definition at line 172 of file cpp_token_stream.h.


Constructor & Destructor Documentation

default constructor

Definition at line 189 of file cpp_token_stream.h.

virtual ~CPP_Token_Stream_Prep (  )  [virtual]

Definition at line 194 of file cpp_token_stream.h.


Member Function Documentation

virtual void operator() ( std::string const &  text,
std::string const &  file,
int  line 
) const [pure virtual]

User defined callback handler to deal with preprocessor tokens.

Parameters:
text the text of the preprocessor directive
file the name of the file
line the line number of the preprocessor directive

Implemented in DefineHandler, and DefineHandler.


The documentation for this class was generated from the following file:
Generated on Wed Feb 29 22:52:43 2012 for CXXUtilities by  doxygen 1.6.3