VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
terminal_stream.h 文件参考

Buffered, thread-safe stdout stream with TTY detection and ANSI support. 更多...

#include <atomic>
#include <cstdio>
#include <cstring>
#include <limits>
#include <mutex>
#include <string>
#include <string_view>
#include <type_traits>
#include <vector>
#include <termios.h>
#include <unistd.h>
terminal_stream.h 的引用(Include)关系图:

浏览该文件的源代码.

 Singleton buffered stdout writer with thread-safety and TTY detection. 更多...

命名空间

宏定义

#define VLINK_TERM_STDOUT_FILENO   STDOUT_FILENO
#define VLINK_TERM_WRITE   ::write
#define VLINK_TERM_ISATTY   ::isatty
#define VLINK_TERM_OUT   vlink::TerminalStream::get()

详细描述

Buffered, thread-safe stdout stream with TTY detection and ANSI support.

Provides TerminalStream, a singleton stream with a 1-MiB internal buffer that writes to stdout via direct POSIX write() / Win32 _write() calls, avoiding std::cout and stdio overhead.

The global convenience macro VLINK_TERM_OUT expands to vlink::TerminalStream::get().

宏定义说明

◆ VLINK_TERM_ISATTY

#define VLINK_TERM_ISATTY   ::isatty

◆ VLINK_TERM_OUT

#define VLINK_TERM_OUT   vlink::TerminalStream::get()

◆ VLINK_TERM_STDOUT_FILENO

#define VLINK_TERM_STDOUT_FILENO   STDOUT_FILENO

◆ VLINK_TERM_WRITE

#define VLINK_TERM_WRITE   ::write