CPP_Stream_Token_Source Class Reference

A source of CPP_Token's which comes from an istream. More...

#include <cpp_token_stream.h>

Inheritance diagram for CPP_Stream_Token_Source:
Inheritance graph
Collaboration diagram for CPP_Stream_Token_Source:
Collaboration graph

List of all members.

Public Member Functions

 CPP_Stream_Token_Source (std::istream &istr, std::string filename="", CPP_Token_Stream_Prep const *h=0)
void operator() (CPP_Token &token)
 Read the next token from the stream.
 ~CPP_Stream_Token_Source ()

Public Attributes

< std::istreambuf_iterator
< char > > * 
 stream from which to read the tokens

Detailed Description

A source of CPP_Token's which comes from an istream.

A CPP_Stream_Token_Source is constructed from an extant stream -- it assumes that the stream is as yet unread though that is not a requirement. If you do pass it a stream that is partially read, the line numbers associated with tokens may be wrong.

Definition at line 1219 of file cpp_token_stream.h.

Constructor & Destructor Documentation

CPP_Stream_Token_Source ( std::istream &  istr,
std::string  filename = "",
CPP_Token_Stream_Prep const *  h = 0 

< Construct a stream token source form a stream -- optionally providing it with the name of the file and a pointer to a handler to take care of pre-processor directives.

Definition at line 1235 of file cpp_token_stream.h.


Definition at line 1250 of file cpp_token_stream.h.

Member Function Documentation

void operator() ( CPP_Token token  )  [virtual]

Read the next token from the stream.

Implements CPP_Token_Source.

Definition at line 1257 of file cpp_token_stream.h.

Member Data Documentation

CPP_Token_Stream<std::istreambuf_iterator<char> >* stream_

stream from which to read the tokens

Definition at line 1233 of file cpp_token_stream.h.

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