ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Function check_character

alps::check_character — checks that the next character read from the stream.

Synopsis

// In header: <alps/parser/parser.h>


ALPS_DECL void 
check_character(std::istream & in, char c, const std::string & err);

Description

Parameters:

c

the character that should be read

err

the error message to be used if the next character is not c.

in

the stream to be read

Throws:

\c std::runtime_error( err ) if the next character is not c reads the next character (slipping white space) and checks if it is the same as the character passed as argument c and throws a std::runtime_error otherwise.
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo

PrevUpHomeNext