libhatchet
Loading...
Searching...
No Matches
hxfile.hpp File Reference

Go to the source code of this file.

Classes

class  hxfile

Variables

hxfile hxin
hxfile hxout
hxfile hxerr
hxfile hxdev_null
constexpr char hxendl [] = "\n"

Detailed Description

Single-ownership C++ RAII abstraction for file I/O.

Both POSIX and libc implementations are available.

Variable Documentation

◆ hxdev_null

hxfile hxdev_null
extern

hxdev_null - Global equivalent to /dev/null.

May be written to but not read from.

◆ hxendl

char hxendl[] = "\n"
inlineconstexpr

hxendl - Equivalent to std::endl without the flush.

Does not vary by platform. Non-empty POSIX text files must end with \n.

◆ hxerr

hxfile hxerr
extern

hxerr - Global reference to stderr or equivalent.

◆ hxin

hxfile hxin
extern

hxin - Global reference to stdin or equivalent.

◆ hxout

hxfile hxout
extern

hxout - Global reference to stdout or equivalent.