cpp-terminal 1.0.0
Small C++ library for writing multiplatform terminal applications
Loading...
Searching...
No Matches
stream.cpp
Go to the documentation of this file.
1/*
2* cpp-terminal
3* C++ library for writing multi-platform terminal applications.
4*
5* SPDX-FileCopyrightText: 2019-2025 cpp-terminal
6*
7* SPDX-License-Identifier: MIT
8*/
9
11
12Term::TIstream::TIstream(const Term::Buffer::Type& type, const std::streamsize& size) : m_buffer(type, size), m_stream(&m_buffer) {}
13
15
16std::streambuf* Term::TIstream::rdbuf() const { return const_cast<Term::Buffer*>(&m_buffer); }
17
18Term::TOstream::TOstream(const Term::Buffer::Type& type, const std::streamsize& size) : m_buffer(type, size), m_stream(&m_buffer) {}
19
Term::Buffer m_buffer
Definition stream.hpp:37
std::istream m_stream
Definition stream.hpp:38
TIstream(const Term::Buffer::Type &type=Term::Buffer::Type::LineBuffered, const std::streamsize &size=BUFSIZ)
Definition stream.cpp:12
std::streambuf * rdbuf() const
Definition stream.cpp:16
Term::Buffer m_buffer
Definition stream.hpp:62
TOstream(const Term::Buffer::Type &type=Term::Buffer::Type::LineBuffered, const std::streamsize &size=BUFSIZ)
Definition stream.cpp:18
std::ostream m_stream
Definition stream.hpp:63