Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
stream.cc File Reference
#include <vcsn/misc/stream.hh>
#include <cassert>
#include <cstring>
#include <istream>
#include <fstream>
#include <vcsn/misc/raise.hh>
Include dependency graph for stream.cc:

Go to the source code of this file.

Namespaces

 vcsn
 

Functions

std::string vcsn::bracketed (std::istream &i, const char lbracket, const char rbracket)
 Extract the string which is here between lbracket and rbracket. More...
 
char vcsn::eat (std::istream &is, char c)
 Check lookahead character and advance. More...
 
const std::string & vcsn::eat (std::istream &is, const std::string &s)
 Check lookahead string and advance. More...
 
std::string vcsn::get_file_contents (const std::string &file)
 Return the contents of file. More...
 
std::shared_ptr< std::istream > vcsn::open_input_file (const std::string &file)
 Open file for reading and return its autoclosing stream. More...
 
std::shared_ptr< std::ostream > vcsn::open_output_file (const std::string &file)
 Open file for writing and return its autoclosing stream. More...
 
ATTRIBUTE_NORETURN void vcsn::fail_reading (std::istream &is, std::string explanation)
 Throw an exception after failing to read from is. More...