9#ifndef CPPCOMMON_SYSTEM_PIPE_H 
   10#define CPPCOMMON_SYSTEM_PIPE_H 
   42    void* 
reader() const noexcept;
 
   44    void* 
writer() const noexcept;
 
   62    size_t Read(
void* buffer, 
size_t size) override;
 
   77    size_t Write(const 
void* buffer, 
size_t size) override;
 
   96    Impl& impl() noexcept { 
return reinterpret_cast<Impl&
>(_storage); }
 
   97    const Impl& impl() const noexcept { 
return reinterpret_cast<Impl const&
>(_storage); }
 
   99    static const size_t StorageSize = 16;
 
  100#if defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__) 
  101    static const size_t StorageAlign = 4;
 
  103    static const size_t StorageAlign = 8;
 
  105    alignas(StorageAlign) std::byte _storage[StorageSize];
 
 
bool IsPipeOpened() const noexcept
Is pipe opened for reading or writing?
 
Pipe(const Pipe &)=delete
 
void CloseWrite()
Close the write pipe endpoint.
 
friend void swap(Pipe &pipe1, Pipe &pipe2) noexcept
 
size_t Read(void *buffer, size_t size) override
Read a bytes buffer from the pipe.
 
void Close()
Close all pipe endpoints.
 
bool IsPipeWriteOpened() const noexcept
Is pipe opened for writing?
 
std::vector< std::string > ReadAllLines()
Read all text lines.
 
bool IsPipeReadOpened() const noexcept
Is pipe opened for reading?
 
size_t Write(const void *buffer, size_t size) override
Write a byte buffer into the pipe.
 
Pipe & operator=(Pipe &&pipe)=delete
 
void * reader() const noexcept
Get the native read endpoint handler.
 
std::vector< uint8_t > ReadAllBytes()
Read all bytes.
 
void * writer() const noexcept
Get the native write endpoint handler.
 
void CloseRead()
Close the read pipe endpoint.
 
std::string ReadAllText()
Read all text.
 
Pipe & operator=(const Pipe &)=delete
 
C++ Common project definitions.
 
Pipe inline implementation.
 
Reader interface definition.
 
Writer interface definition.