6#ifndef YARP_OS_IDL_WIREREADER_H
7#define YARP_OS_IDL_WIREREADER_H
51 bool readBool(
bool& x);
53 bool readI8(std::int8_t& x);
55 bool readI16(std::int16_t& x);
57 bool readI32(std::int32_t& x);
59 bool readI64(std::int64_t& x);
65 bool readUI8(std::uint8_t& x);
67 bool readUI16(std::uint16_t& x);
69 bool readUI32(std::uint32_t& x);
71 bool readUI64(std::uint64_t& x);
75 bool readSizeT(std::size_t& x);
117 bool readString(std::string& str,
bool*
is_vocab =
nullptr);
119 bool readBlock(
char*
const data,
size_t len);
121 bool readBinary(std::string& str);
123 template <
typename EnumBase,
typename ConverterType>
126 std::int32_t tag = state->code;
156 if (reader.
isError() || len < 1 || noMore()) {
161 reader.
expectBlock(
const_cast<char*
>(str.data()), len);
167 x = ConverterType::fromString(str);
173 bool readListHeader();
175 bool readListHeader(
int len);
177 bool readListReturn();
192 std::string readTag(
size_t len =
static_cast<size_t>(-1));
208 bool getMode()
const;
210 bool getIsVocab32()
const;
212 const std::string& getString()
const;
219 bool flush_if_needed {
false};
220 bool support_get_mode {
false};
221 bool expecting {
false};
222 bool get_is_vocab {
false};
224 bool get_mode {
false};
227 void scanString(std::string& str,
bool is_vocab);
#define BOTTLE_TAG_STRING
#define BOTTLE_TAG_VOCAB32
A mini-server for performing network communication in the background.
An interface for reading from a network connection.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
virtual std::int64_t expectInt64()=0
Read a 64-bit integer from the network connection.
virtual bool isError() const =0
virtual std::int16_t expectInt16()=0
Read a 16-bit integer from the network connection.
virtual std::int8_t expectInt8()=0
Read a 8-bit integer from the network connection.
An interface for writing to a network connection.
A dummy ConnectionWriter that consumes data without effect.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
IDL-friendly connection reader.
yarp::conf::float64_t expectFloat64()
std::int64_t expectInt64()
std::int32_t expectInt32()
yarp::conf::float32_t expectFloat32()
bool readEnum(EnumBase &x)
std::int16_t expectInt16()
std::string get_string(const std::string &key, bool *found=nullptr)
Read a string from an environment variable.
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(x)
Suppress MSVC C4251 warning for the declaration.