A source of CPP_Token's which comes from a named file. More...
#include <cpp_token_stream.h>
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 |
A source of CPP_Token's which comes from a named file.
Definition at line 1265 of file cpp_token_stream.h.
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.
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.
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.