|
fcppt 5.2.1
Freundlich's C++ toolkit
|
IO-related typedefs and functions. More...
Classes | |
| class | basic_scoped_rdbuf |
| Changes the streambuf of a stream temporarily. More... | |
Typedefs | |
| using | buffer = fcppt::container::raw_vector::object<char> |
| using | istream = std::basic_istream<fcppt::char_type> |
| Typedef to either std::istream or std::wistream, depending on fcppt::char_type. | |
| using | istringstream = std::basic_istringstream<fcppt::char_type> |
| Typedef to either std::istringstream or std::wistringstream, depending on fcppt::char_type. | |
| using | optional_buffer = fcppt::optional::object<fcppt::io::buffer> |
| using | ostream = std::basic_ostream<fcppt::char_type> |
| Typedef to either std::ostream or std::wostream, depending on fcppt::char_type. | |
| using | ostringstream = std::basic_ostringstream<fcppt::char_type> |
| Typedef to either std::ostringstream or std::wostringstream, depending on fcppt::char_type. | |
| using | scoped_rdbuf = fcppt::io::basic_scoped_rdbuf<fcppt::char_type> |
| using | stringstream = std::basic_stringstream<fcppt::char_type> |
| Typedef to either std::stringstream or std::wstringstream, depending on fcppt::char_type. | |
Functions | |
| FCPPT_DETAIL_SYMBOL fcppt::io::ostream & | cerr () |
| Returns either std::cerr or std::wcerr, depending on fcppt::char_type. | |
| FCPPT_DETAIL_SYMBOL fcppt::io::istream & | cin () |
| Returns either std::cin or std::wcin, depending on fcppt::char_type. | |
| FCPPT_DETAIL_SYMBOL fcppt::io::ostream & | clog () |
| Returns either std::clog or std::wclog, depending on fcppt::char_type. | |
| FCPPT_DETAIL_SYMBOL fcppt::io::ostream & | cout () |
| Returns either std::cout or std::wcout, depending on fcppt::char_type. | |
| template<typename Ch, typename Traits, typename Type> | |
| std::basic_istream< Ch, Traits > & | expect (std::basic_istream< Ch, Traits > &_stream, Type const &_value) |
| Fails a stream if it does not read the expected value. | |
| template<typename Type, typename Ch, typename Traits> | |
| fcppt::optional::object< Type > | extract (std::basic_istream< Ch, Traits > &_stream) |
| Reads a value from a stream, returning an optional. | |
| template<typename Ch, typename Traits> | |
| fcppt::optional::object< Ch > | get (std::basic_istream< Ch, Traits > &_stream) |
| Gets a character from a stream. | |
| template<typename Ch, typename Traits> | |
| fcppt::optional::object< std::string > | narrow_string (std::basic_ios< Ch, Traits > const &_ios, std::basic_string_view< Ch, Traits > const _string) |
| Uses narrow on every character.Calls fcppt::io::narrow_string_locale using the locale from _ios. | |
| template<typename Ch, typename Traits> | |
| fcppt::optional::object< std::string > | narrow_string_locale (std::basic_string_view< Ch, Traits > const _string, std::locale const &_locale) |
Uses narrow on every character.Let _string = c_1 ... c_n and d_i = narrow(c_i,0) for i = 1,...,n, where narrow is the function from std::ctype<Ch>. Then this function returns the string d_1, ..., d_n if and only if d_i != 0 for i = 1,...,n. | |
| template<typename Ch, typename Traits> | |
| fcppt::optional::object< Ch > | peek (std::basic_istream< Ch, Traits > &_stream) |
| Peeks at a character from a stream. | |
| template<typename Type> requires std::is_arithmetic_v<Type> | |
| fcppt::optional::object< Type > | read (std::istream &_stream, std::endian const _format) |
| Reads an object of arithmetic type from a stream. | |
| FCPPT_DETAIL_SYMBOL fcppt::io::optional_buffer | read_chars (std::istream &stream, std::size_t count) |
| Reads a number of chars. | |
| template<typename Ch, typename Traits> | |
| fcppt::optional::object< std::basic_string< Ch, Traits > > | stream_to_string (std::basic_istream< Ch, Traits > &_input) |
| Reads the contents of a stream into a string. | |
| fcppt::io::detail::widen_string | widen_string (std::string _string) |
| Creates a string that outputs each character by widening. | |
| template<typename Type> requires std::is_arithmetic_v<Type> | |
| void | write (std::ostream &_stream, Type const &_value, std::endian const _format) |
| Writes an object of arithmetic type to a stream. | |
| FCPPT_DETAIL_SYMBOL bool | write_chars (std::ostream &stream, char const *data, std::size_t count) |
| Writes a number of chars. | |
IO-related typedefs and functions.
| using fcppt::io::buffer = fcppt::container::raw_vector::object<char> |