Terminal++ 3.1.0.4
A C++ library for interacting with ANSI terminal windows
Loading...
Searching...
No Matches
stdout_channel.hpp
1#pragma once
2
3#include "terminalpp/core.hpp"
4
5#include <functional>
6
7namespace terminalpp {
8
9//* =========================================================================
12//* =========================================================================
14{
15public:
16 //* =====================================================================
20 //* =====================================================================
21 void async_read(std::function<void(terminalpp::bytes)> const &);
22
23 //* =====================================================================
25 //* =====================================================================
26 void write(terminalpp::bytes data);
27
28 //* =====================================================================
32 //* =====================================================================
33 [[nodiscard]] bool is_alive() const;
34
35 //* =====================================================================
39 //* =====================================================================
40 void close();
41};
42
43} // namespace terminalpp
A class that models the terminal's channel concept, providing output to stdout.
Definition stdout_channel.hpp:14
bool is_alive() const
Returns whether the output stream is alive.
Definition stdout_channel.cpp:26
void close()
Requests that the channel be closed.
Definition stdout_channel.cpp:34
void write(terminalpp::bytes data)
Writes the data to stdout.
Definition stdout_channel.cpp:17
void async_read(std::function< void(terminalpp::bytes)> const &)
Request data from the channel.
Definition stdout_channel.cpp:10
A structure representing an ANSI graphics effect (e.g. intensity, underlining)
Definition effect.hpp:27