9 #ifndef mrpt_synch_pipe_H 10 #define mrpt_synch_pipe_H 50 template <
typename ReadPtr,
typename WritePtr>
51 static void createPipe(ReadPtr& outReadPipe, WritePtr& outWritePipe);
101 #ifdef MRPT_OS_WINDOWS 106 virtual size_t Read(
void* Buffer,
size_t Count)
override;
107 virtual size_t Write(
const void* Buffer,
size_t Count)
override;
137 void WriteBuffer(
const void* Buffer,
size_t Count);
156 size_t ReadBuffer(
void* Buffer,
size_t Count);
160 template <
typename ReadPtr,
typename WritePtr>
void WriteBuffer(const void *Buffer, size_t Count)
Hide the write method in this read-only pipe.
std::string serialize()
Converts the end-point into a string suitable for reconstruction at a child process.
The write end-point in a pipe created with mrpt::synch::CPipe.
virtual uint64_t getPosition() override
Without effect in this class.
CPipe()
No need to create any object of this class.
virtual size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.
CPipeBaseEndPoint & operator=(const CPipeBaseEndPoint &)=delete
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
unsigned int timeout_read_start_us
(Default=0) Timeout for read operations: microseconds (us) to wait for the first byte.
virtual ~CPipeBaseEndPoint()
static void initializePipe(CPipeReadEndPoint &outReadPipe, CPipeWriteEndPoint &outWritePipe)
Creates a new pipe and returns the read & write end-points as newly allocated objects.
The read end-point in a pipe created with mrpt::synch::CPipe.
virtual uint64_t Seek(uint64_t Offset, CStream::TSeekOrigin Origin=sFromBeginning) override
Without effect in this class.
virtual size_t Read(void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for reading from the stream.
virtual uint64_t getTotalBytesCount() override
Without effect in this class.
GLsizei const GLchar ** string
unsigned __int64 uint64_t
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Common interface of read & write pipe end-points.
size_t ReadBuffer(void *Buffer, size_t Count)
Hide the read method in this write-only pipe.
bool isOpen() const
Returns false if the pipe was closed due to some error.
void close()
Closes the pipe (normally not needed to be called by users, automatically done at destructor) ...
unsigned int timeout_read_between_us
(Default=0) Timeout between burst reads operations: microseconds (us) to wait between two partial rea...
GLsizei const GLfloat * value
A pipe, portable across different OS.
static void createPipe(ReadPtr &outReadPipe, WritePtr &outWritePipe)
Creates a new pipe and returns the read & write end-points as newly allocated objects.