25 if (!read_value(reader)) {
50 if (!write_value(writer)) {
95 if constexpr (expected_tag != 0) {
96 if (_csize != 0 && _etype.
code != expected_tag) {
100 value.resize(_csize);
101 if (_csize != 0 && !reader.
readBlock(
reinterpret_cast<char*
>(
value.data()),
value.size() *
sizeof(std::int8_t))) {
115 if (!writer.
writeBlock(
reinterpret_cast<const char*
>(
value.data()),
value.size() *
sizeof(std::int8_t))) {
137 if constexpr (expected_tag != 0) {
138 if (_csize != 0 && _etype.
code != expected_tag) {
142 value.resize(_csize);
143 if (_csize != 0 && !reader.
readBlock(
reinterpret_cast<char*
>(
value.data()),
value.size() *
sizeof(std::int8_t))) {
157 if (!writer.
writeBlock(
reinterpret_cast<const char*
>(
value.data()),
value.size() *
sizeof(std::int8_t))) {
std::string toString() const
bool write(const yarp::os::idl::WireWriter &writer) const override
std::vector< std::int8_t > value
bool read(yarp::os::idl::WireReader &reader) override
A simple collection of objects that can be described and transmitted in a portable way.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
An interface for reading from a network connection.
An interface for writing to a network connection.
static bool copyPortable(const PortWriter &writer, PortReader &reader)
Copy one portable to another, via writing and reading.
IDL-friendly connection reader.
void readListBegin(yarp::os::idl::WireState &nstate, size_t &len)
bool readBlock(char *const data, size_t len)
IDL-friendly connection writer.
bool writeListHeader(int len) const
bool writeBlock(const char *data, size_t len) const
bool writeListEnd() const
bool writeListBegin(int tag, size_t len) const
For streams capable of holding different kinds of content, check what they actually have.