UNISTDX_IO_FILDES_PAIR
class sys::fildes_pair

A pair of file descriptors.

  • Descriptors are assumed to be for input and output, but it is not enforced.
  • This class is usefull in conjunction with basic_fildesbuf when different file descriptors are used for writing and reading from the stream.

Methods
  • swap(fildes_pair & rhs) -> void

    Swap with rhs.

  • close() -> void

    Close both file descriptors.

  • out() const -> const fildes &

    Get output file descriptor.

  • in() const -> const fildes &

    Get input file descriptor.

  • out() -> fildes &

    Get output file descriptor.

  • in() -> fildes &

    Get input file descriptor.

  • operator=(fildes_pair & rhs) -> fildes_pair &
  • operator=(fildes_pair && rhs) -> fildes_pair &

    Move-assignment.

  • fildes_pair(fildes_pair && rhs)

    Move-constructor.

  • fildes_pair(two_way_pipe && pipe)explicit

    Construct a pair of file descriptors from bidirectional pipe pipe.

  • fildes_pair(pipe && pipe)explicit

    Construct a pair of file descriptors from pipe pipe.

  • fildes_pair(fildes && in, fildes && out)

    Construct a pair of file descriptors from in and out.

  • ~fildes_pair()
  • fildes_pair()
struct sys::streambuf_traits< fildes_pair >

Specialisation of streambuf_traits for fildes_pair.

Types
  • using char_type = char

    Character type.

Methods
  • in_avail(fildes_pair & pair) -> std::streamsize

    Check how many bytes are available for reading in input file descriptor of pair.

  • is_blocking(const fildes_pair & pair) -> bool

    Check if the source/sink is blocking.

  • read(fildes_pair & pair, char_type * s, std::streamsize n) -> std::streamsize

    Read n bytes to array pointed by s from input file descriptor pair.

  • write(fildes_pair & pair, const char_type * s, std::streamsize n) -> std::streamsize

    Write n bytes from array pointed by s to output file descriptor of pair.

swap(fildes_pair & lhs, fildes_pair & rhs) -> void

Overload of std::swap for fildes_pair.