CPP_Buffer_Token_Source Class Reference

A source of tokens extracted from a character array. More...

#include <cpp_token_stream.h>

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

List of all members.

Public Member Functions

 CPP_Buffer_Token_Source (char const *begin, char const *end, std::string f, CPP_Token_Stream_Prep const *h=0)
 CPP_Buffer_Token_Source (char const *begin, char const *end, CPP_Token_Stream_Prep const *h=0)
char const * cur () const
 current location in the input buffer
char const * end () const
 end location in the input buffer
void operator() (CPP_Token &token)
 Read the next token from the stream.

Private Attributes

CPP_Token_Stream< char const * > stream_
 token source object

Detailed Description

A source of tokens extracted from a character array.

Definition at line 1333 of file cpp_token_stream.h.


Constructor & Destructor Documentation

CPP_Buffer_Token_Source ( char const *  begin,
char const *  end,
CPP_Token_Stream_Prep const *  h = 0 
)

Construct a token source from a pointer to the beginning and ending of a character buffer.

Parameters:
begin the first character of the string of tokens
end the last character of the token source
h the preprocessor directive handler.

Definition at line 1344 of file cpp_token_stream.h.

CPP_Buffer_Token_Source ( char const *  begin,
char const *  end,
std::string  f,
CPP_Token_Stream_Prep const *  h = 0 
)

Construct a token source from a character buffer but pretend it is from a file whose name is specified (and an optional preprocessor directive handler).

Parameters:
begin the first character of the string of tokens
end the last character of the token source
f the name of the file to pretend to use
h the preprocessor directive handler.

Definition at line 1358 of file cpp_token_stream.h.


Member Function Documentation

char const* cur (  )  const

current location in the input buffer

Definition at line 1384 of file cpp_token_stream.h.

char const* end (  )  const

end location in the input buffer

Definition at line 1385 of file cpp_token_stream.h.

void operator() ( CPP_Token token  )  [virtual]

Read the next token from the stream.

Parameters:
token the destination of the parsed token

Implements CPP_Token_Source.

Definition at line 1376 of file cpp_token_stream.h.


Member Data Documentation

CPP_Token_Stream<char const *> stream_ [private]

token source object

Definition at line 1340 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