Vcsn  2.4
Be Rational
stream.hh File Reference
#include <iostream>
#include <memory>
#include <sstream>
#include <stdexcept>
#include <vcsn/misc/escape.hh>
#include <vcsn/misc/export.hh>
#include <vcsn/misc/raise.hh>
#include <vcsn/misc/to-string.hh>
Include dependency graph for stream.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 vcsn
 

Functions

std::string vcsn::bracketed (std::istream &i, char lbracket, char rbracket)
 Extract the string which is here between lbracket and rbracket. More...
 
template<typename ValueSet , typename... Args>
auto vcsn::conv (const ValueSet &vs, const std::string &str, Args &&...args) -> decltype(vs.conv(std::declval< std::istream & >(), std::forward< Args >(args)...))
 Parse str via vs.conv. 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...
 
template<typename... Args>
ATTRIBUTE_NORETURN void vcsn::fail_reading (std::istream &is, Args &&...args)
 Throw an exception after failing to read from is. More...
 
char vcsn::get_char (std::istream &i)
 Read a single char, with possible -escape support. 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...
 
void vcsn::skip_space (std::istream &is)
 Ignore spaces. More...
 

Variables

std::ostream vcsn::cnull {nullptr}
 An narrow-char stream that discards the output. More...
 
std::wostream vcsn::wcnull {nullptr}
 An wide-char stream that discards the output. More...