9 #ifndef mrpt_synch_pipe_H 10 #define mrpt_synch_pipe_H 22 class CPipeReadEndPoint;
23 class CPipeWriteEndPoint;
48 template <
typename ReadPtr,
typename WritePtr>
49 static void createPipe(ReadPtr& outReadPipe,WritePtr& outWritePipe);
81 inline bool isOpen()
const {
return m_pipe_file!=0; }
87 #ifdef MRPT_OS_WINDOWS 92 virtual size_t Read(
void *Buffer,
size_t Count)
MRPT_OVERRIDE;
93 virtual size_t Write(
const void *Buffer,
size_t Count)
MRPT_OVERRIDE;
111 void WriteBuffer (
const void *Buffer,
size_t Count);
126 size_t ReadBuffer(
void *Buffer,
size_t Count);
130 template <
typename ReadPtr,
typename WritePtr>
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
The write end-point in a pipe created with mrpt::synch::CPipe.
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. 0 means infinite timeout.
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.
The base class of classes that cannot be copied: compile-time errors will be issued on any copy opera...
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.
bool isOpen() const
Returns false if the pipe was closed due to some error.
unsigned int timeout_read_between_us
(Default=0) Timeout between burst reads operations: microseconds (us) to wait between two partial rea...
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.