|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_OS_CONNECTIONWRITER_H
11 #define YARP_OS_CONNECTIONWRITER_H
21 class ConnectionReader;
65 virtual
void appendInt(
int data) final
67 appendInt32(
static_cast<std::int32_t
>(data));
102 virtual
void appendDouble(
double data)
123 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2
131 virtual
void appendString(const
char* str, const
char terminate = '\n') final
133 appendText({str}, terminate);
146 virtual void appendText(
const std::string& str,
const char terminate =
'\n') = 0;
148 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2
150 virtual
void appendRawString(const std::
string& str) final
167 appendInt32(
static_cast<std::int32_t
>(str.length()));
168 appendBlock((
char*)str.c_str(), str.length());
264 virtual bool isNull()
const;
288 #endif // YARP_OS_CONNECTIONWRITER_H
virtual void appendFloat32(yarp::conf::float32_t data)=0
Send a representation of a 32-bit floating point number to the network connection.
virtual void appendBlock(const char *data, size_t len)=0
Send a block of data to the network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
virtual bool isActive() const =0
virtual void appendFloat64(yarp::conf::float64_t data)=0
Send a representation of a 64-bit floating point number to the network connection.
virtual void appendInt8(std::int8_t data)=0
Send a representation of a 8-bit integer to the network connection.
Simple specification of the minimum functions needed from output streams.
void appendString(const std::string &str)
Send a string to the network connection.
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
virtual void declareSizes(int argc, int *argv)=0
If you can easily determine how many blocks there are in a message, call this first,...
virtual bool isError() const =0
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
An interface for writing to a network connection.
virtual void requestDrop()=0
Tag the connection to be dropped after the current message.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
virtual ~ConnectionWriter()
Destructor.
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
virtual void appendInt32(std::int32_t data)=0
Send a representation of a 32-bit integer to the network connection.
#define YARP_DEPRECATED_INTERNAL_MSG(X)
virtual void appendInt64(std::int64_t data)=0
Send a representation of a 64-bit integer to the network connection.
virtual bool isTextMode() const =0
Check if the connection is text mode.
virtual SizedWriter * getBuffer() const =0
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
The main, catch-all namespace for YARP.
virtual void setReference(Portable *obj)=0
Stores a direct pointer to the object being sent.
virtual void appendExternalBlock(const char *data, size_t len)=0
Send a block of data to the network connection, without making a copy.
virtual void appendInt16(std::int16_t data)=0
Send a representation of a 16-bit integer to the network connection.
virtual void appendText(const std::string &str, const char terminate='\n')=0
Send a terminated string to the network connection.
Minimal requirements for an efficient Writer.
virtual bool isValid() const =0
virtual void setReplyHandler(PortReader &reader)=0
This sets a handler to deal with replies to the message.