|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_OS_PORTABLEPAIR_H
11 #define YARP_OS_PORTABLEPAIR_H
49 template <
class HEAD,
class BODY>
97 #endif // YARP_OS_PORTABLEPAIR_H
This is a base class for objects that can be both read from and be written to the YARP network.
Group a pair of objects to be sent and received together.
BODY body
An object of the second type (BODY).
bool read(ConnectionReader &connection) override
Reads this object pair from a network connection.
bool write(ConnectionWriter &connection) const override
Writes this object pair to a network connection.
static bool readPair(ConnectionReader &connection, Portable &head, Portable &body)
Reads an object pair from a network connection.
An interface for writing to a network connection.
void onCompletion() const override
This is called when the port has finished all writing operations.
An interface for reading from a network connection.
HEAD head
An object of the first type (HEAD).
The main, catch-all namespace for YARP.
static bool writePair(ConnectionWriter &connection, const Portable &head, const Portable &body)
Writes an object pair to a network connection.