cwchess::pgn::Scanner< ForwardIterator > Class Template Reference

A class used to read input from a PGN database. More...

List of all members.

Public Member Functions

 Scanner (ForwardIterator& iter, ForwardIterator const end)
 Construct a Scanner object.
int push_position (void)
void pop_position (int index)
ForwardIterator::value_type first_character (void) throw (EndOfFileReached)
 Return the first character.
ForwardIterator::value_type next_character (void)
 Make the next character the current character.
void eat_white_space (typename ForwardIterator::value_type& current_character)
 Eat all white space character, return the first non-white-space.
void eat_line (typename ForwardIterator::value_type& current_character)
 Eat all characters left in the current line up till but not including the EOL.
bool parse_char (typename ForwardIterator::value_type& current_character, char literal)
 Parse the next character and return true if it equals literal.
bool parse_str (typename ForwardIterator::value_type& current_character, char const* literal)
 Return true if the string after the current character matches literal.
bool eat_comment (typename ForwardIterator::value_type& current_character)
 Eat a single comment, if any.
void eat_white_space_and_comments (typename ForwardIterator::value_type& current_character)
 Eat all white space and all comments encountered, if any.
bool eat_eol (typename ForwardIterator::value_type& current_character)
 Eat one or more EOL sequences.
void decode_string (typename ForwardIterator::value_type& current_character)
 Decodes a string.
unsigned int line (void) const
 Return the current line number.
unsigned int column (void) const
 Return the column.
unsigned int number_of_characters (void) const
 Return the total number of characters parsed thus far.
Color to_move (void) const
 Return who is expected to move at this moment.
void reset_game_state (void)
 Reset the game state.


template<typename T >
std::ostream&  operator<< (std::ostream& os, Scanner< T > const& scanner)
 Debug helper function.

Detailed Description

template<class ForwardIterator>
class cwchess::pgn::Scanner< ForwardIterator >

A class used to read input from a PGN database.

Definition at line 189 of file

The documentation for this class was generated from the following file:

Copyright © 2006 - 2010 Carlo Wood.  All rights reserved.