CPP_File_Token_Source Class Reference

A source of CPP_Token's which comes from a named file. More...

#include <cpp_token_stream.h>

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

List of all members.

Public Member Functions

 CPP_File_Token_Source (std::string const &f, CPP_Token_Stream_Prep const *h=0)
 CPP_File_Token_Source (char const *f="", CPP_Token_Stream_Prep const *h=0)
 operator bool () const
 check to see if file opened successfully
void operator() (CPP_Token &token)
 Read the next token from the stream.
 ~CPP_File_Token_Source ()

Public Attributes

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

Private Attributes

std::ifstream * input_file_
 file stream from which to read tokens

Detailed Description

A source of CPP_Token's which comes from a named file.

Definition at line 1265 of file cpp_token_stream.h.


Constructor & Destructor Documentation

CPP_File_Token_Source ( char const *  f = "",
CPP_Token_Stream_Prep const *  h = 0 
)

Construct a token soruce from a char const *filename and a preprocessor directive handler (optional).

Definition at line 1275 of file cpp_token_stream.h.

CPP_File_Token_Source ( std::string const &  f,
CPP_Token_Stream_Prep const *  h = 0 
)

Construct a token soruce from a string filename and a preprocessor directive handler (optional).

Definition at line 1282 of file cpp_token_stream.h.

destructor

Definition at line 1290 of file cpp_token_stream.h.


Member Function Documentation

operator bool (  )  const

check to see if file opened successfully

Definition at line 1297 of file cpp_token_stream.h.

void operator() ( CPP_Token token  )  [virtual, inherited]

Read the next token from the stream.

Implements CPP_Token_Source.

Definition at line 1257 of file cpp_token_stream.h.


Member Data Documentation

std::ifstream* input_file_ [private]

file stream from which to read tokens

Definition at line 1271 of file cpp_token_stream.h.

CPP_Token_Stream<std::istreambuf_iterator<char> >* stream_ [inherited]

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