YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Storable.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-FileCopyrightText: 2006, 2008 Arjan Gijsberts
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
9
10#include <yarp/conf/numeric.h>
11
12#include <yarp/os/Bottle.h>
15#include <yarp/os/NetType.h>
16#include <yarp/os/Value.h>
19
20#include <cstdio>
21#include <cstdlib>
22
26using yarp::os::Value;
40
41
42YARP_OS_LOG_COMPONENT(STORABLE, "yarp.os.impl.Storable")
43
44
45const int StoreInt8::code = BOTTLE_TAG_INT8;
46const int StoreInt16::code = BOTTLE_TAG_INT16;
47const int StoreInt32::code = BOTTLE_TAG_INT32;
48const int StoreInt64::code = BOTTLE_TAG_INT64;
49const int StoreFloat32::code = BOTTLE_TAG_FLOAT32;
50const int StoreFloat64::code = BOTTLE_TAG_FLOAT64;
51const int StoreVocab32::code = BOTTLE_TAG_VOCAB32;
52const int StoreVocab64::code = BOTTLE_TAG_VOCAB64;
53const int StoreString::code = BOTTLE_TAG_STRING;
54const int StoreBlob::code = BOTTLE_TAG_BLOB;
55const int StoreList::code = BOTTLE_TAG_LIST;
56
57
58
60// Storable
61
62Storable::~Storable() = default;
63
64Storable* Storable::createByCode(std::int32_t id)
65{
66 Storable* storable = nullptr;
67 std::int32_t subCode = 0;
68 switch (id) {
69 case StoreInt8::code:
70 storable = new StoreInt8();
71 break;
73 storable = new StoreInt16();
74 break;
76 storable = new StoreInt32();
77 break;
79 storable = new StoreInt64();
80 break;
82 storable = new StoreVocab32();
83 break;
85 storable = new StoreVocab64();
86 break;
88 storable = new StoreFloat32();
89 break;
91 storable = new StoreFloat64();
92 break;
94 storable = new StoreString();
95 break;
96 case StoreBlob::code:
97 storable = new StoreBlob();
98 break;
99 case StoreList::code:
100 storable = new StoreList();
101 yCAssert(STORABLE, storable != nullptr);
102 storable->asList()->implementation->setNested(true);
103 break;
104 default:
105 if ((id & GROUP_MASK) != 0) {
106 // typed list
107 subCode = (id & UNIT_MASK);
108 storable = new StoreList();
109 yCAssert(STORABLE, storable != nullptr);
110 storable->asList()->implementation->specialize(subCode);
111 storable->asList()->implementation->setNested(true);
112 }
113 break;
114 }
115 return storable;
116}
117
118Value& Storable::find(const std::string& key) const
119{
120 YARP_UNUSED(key);
121 return BottleImpl::getNull();
122}
123
124Bottle& Storable::findGroup(const std::string& key) const
125{
126 YARP_UNUSED(key);
127 return Bottle::getNullBottle();
128}
129
130bool Storable::check(const std::string& key) const
131{
132 Bottle& val = findGroup(key);
133 if (!val.isNull()) {
134 return true;
135 }
136 Value& val2 = find(key);
137 return !val2.isNull();
138}
139
141{
142 return toString() == alt.toString();
143}
144
145
147{
148 std::int32_t x = connection.expectInt32();
149 if (x != getCode()) {
150 return false;
151 }
152 return readRaw(connection);
153}
154
155bool Storable::write(ConnectionWriter& connection) const
156{
157 connection.appendInt32(getCode());
158 return writeRaw(connection);
159}
160
161
163// StoreInt8
164
165std::string StoreInt8::toString() const
166{
167 return std::to_string(x);
168}
169
170void StoreInt8::fromString(const std::string& src)
171{
172 x = static_cast<std::int8_t>(strtol(src.c_str(), static_cast<char**>(nullptr), 0));
173}
174
176{
177 x = reader.expectInt8();
178 return true;
179}
180
182{
183 writer.appendInt8(x);
184 return true;
185}
186
187
189// StoreInt16
190
191std::string StoreInt16::toString() const
192{
193 return std::to_string(x);
194}
195
196void StoreInt16::fromString(const std::string& src)
197{
198 x = static_cast<std::int16_t>(strtol(src.c_str(), static_cast<char**>(nullptr), 0));
199}
200
202{
203 x = reader.expectInt16();
204 return true;
205}
206
208{
209 writer.appendInt16(x);
210 return true;
211}
212
213
215// StoreInt32
216
217std::string StoreInt32::toString() const
218{
219 return std::to_string(x);
220}
221
222void StoreInt32::fromString(const std::string& src)
223{
224 x = strtol(src.c_str(), static_cast<char**>(nullptr), 0);
225}
226
228{
229 x = reader.expectInt32();
230 return true;
231}
232
234{
235 writer.appendInt32(x);
236 return true;
237}
238
239
241// StoreInt64
242
243std::string StoreInt64::toString() const
244{
245 return std::to_string(x);
246}
247
248void StoreInt64::fromString(const std::string& src)
249{
250 x = strtoll(src.c_str(), static_cast<char**>(nullptr), 0);
251}
252
254{
255 x = reader.expectInt64();
256 return true;
257}
258
260{
261 writer.appendInt64(x);
262 return true;
263}
264
265
267// StoreVocab32
268
269std::string StoreVocab32::toString() const
270{
271 if (x == 0) {
272 return "false";
273 }
274 if (x == '1') {
275 return "true";
276 }
277 return Vocab32::decode(x);
278}
279
280void StoreVocab32::fromString(const std::string& src)
281{
282 x = Vocab32::encode(src);
283}
284
286{
287 if (x == 0) {
288 return "false";
289 }
290 if (x == '1') {
291 return "true";
292 }
293 return std::string("[") + toString() + "]";
294}
295
296void StoreVocab32::fromStringNested(const std::string& src)
297{
298 x = 0;
299 if (src.length() > 0) {
300 if (src[0] == '[') {
301 // ignore first [ and last ]
302 fromString(src.substr(1, src.length() - 2));
303 } else if (src == "true") {
304 x = static_cast<int>('1');
305 } else if (src == "false") {
306 x = 0;
307 }
308 }
309}
310
312{
313 x = reader.expectInt32();
314 return true;
315}
316
318{
319 writer.appendInt32(x);
320 return true;
321}
322
324// StoreVocab64
325
326std::string StoreVocab64::toString() const
327{
328 if (x == 0) {
329 return "false";
330 }
331 if (x == '1') {
332 return "true";
333 }
334 return Vocab64::decode64(x);
335}
336
337void StoreVocab64::fromString(const std::string& src)
338{
339 x = Vocab64::encode64(src);
340}
341
343{
344 if (x == 0) {
345 return "false";
346 }
347 if (x == '1') {
348 return "true";
349 }
350 return std::string("[") + toString() + "]";
351}
352
353void StoreVocab64::fromStringNested(const std::string& src)
354{
355 x = 0;
356 if (src.length() > 0) {
357 if (src[0] == '[') {
358 // ignore first [ and last ]
359 fromString(src.substr(1, src.length() - 2));
360 } else if (src == "true") {
361 x = static_cast<int>('1');
362 } else if (src == "false") {
363 x = 0;
364 }
365 }
366}
367
369{
370 x = reader.expectInt64();
371 return true;
372}
373
375{
376 writer.appendInt64(x);
377 return true;
378}
379
381// StoreFloat32
382
383
384std::string StoreFloat32::toString() const
385{
387}
388
389void StoreFloat32::fromString(const std::string& src)
390{
391 x = yarp::conf::numeric::from_string<yarp::conf::float32_t>(src);
392}
393
395{
396 x = reader.expectFloat32();
397 return true;
398}
399
401{
402 writer.appendFloat32(x);
403 return true;
404}
405
406
408// StoreFloat64
409
410std::string StoreFloat64::toString() const
411{
413}
414
415void StoreFloat64::fromString(const std::string& src)
416{
417 x = yarp::conf::numeric::from_string<yarp::conf::float64_t>(src);
418}
419
421{
422 x = reader.expectFloat64();
423 return true;
424}
425
427{
428 writer.appendFloat64(x);
429 return true;
430}
431
432
434// StoreString
435
436std::string StoreString::toString() const
437{
438 return x;
439}
440
441std::string StoreString::quotedString(const std::string& x)
442{
443 // quoting code: very inefficient, but portable
444 std::string result;
445
446 bool needQuote = false;
447 for (unsigned int i = 0; i < x.length(); i++) {
448 char ch = x[i];
449 if ((ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z') && ch != '_') {
450 if ((ch >= '0' && ch <= '9') || ch == '.' || ch == '-') {
451 if (i == 0) {
452 needQuote = true;
453 break;
454 }
455 } else {
456 needQuote = true;
457 break;
458 }
459 }
460 }
461 if (x.length() == 0) {
462 needQuote = true;
463 }
464 if (x == "true" || x == "false") {
465 needQuote = true;
466 }
467
468 if (!needQuote) {
469 return x;
470 }
471
472 result += "\"";
473 for (char ch : x) {
474 if (ch == '\n') {
475 result += '\\';
476 result += 'n';
477 } else if (ch == '\r') {
478 result += '\\';
479 result += 'r';
480 } else if (ch == '\0') {
481 result += '\\';
482 result += '0';
483 } else {
484 if (ch == '\\' || ch == '\"') {
485 result += '\\';
486 }
487 result += ch;
488 }
489 }
490 result += "\"";
491
492 return result;
493}
494
496{
497 return quotedString(x);
498}
499
500void StoreString::fromString(const std::string& src)
501{
502 x = src;
503}
504
505void StoreString::fromStringNested(const std::string& src)
506{
507 // unquoting code: very inefficient, but portable
508 x = "";
509 size_t len = src.length();
510 if (len > 0) {
511 bool skip = false;
512 bool back = false;
513 if (src[0] == '\"') {
514 skip = true;
515 }
516 for (size_t i = 0; i < len; i++) {
517 if (skip && (i == 0 || i == len - 1)) {
518 // omit
519 } else {
520 char ch = src[i];
521 if (ch == '\\') {
522 if (!back) {
523 back = true;
524 } else {
525 x += '\\';
526 back = false;
527 }
528 } else {
529 if (back) {
530 if (ch == 'n') {
531 x += '\n';
532 } else if (ch == 'r') {
533 x += '\r';
534 } else if (ch == '0') {
535 x += '\0';
536 } else {
537 x += ch;
538 }
539 } else {
540 x += ch;
541 }
542 back = false;
543 }
544 }
545 }
546 }
547}
548
549
551{
552 std::int32_t len = reader.expectInt32();
553 x.resize(len);
554 reader.expectBlock(const_cast<char*>(x.data()), len);
555 return true;
556}
557
559{
560 writer.appendInt32(static_cast<std::int32_t>(x.length()));
561 writer.appendBlock(x.c_str(), x.length());
562 return true;
563}
564
565
567// StoreBlob
568
569std::string StoreBlob::toString() const
570{
571 std::string result;
572 for (unsigned int i = 0; i < x.length(); i++) {
573 if (i > 0) {
574 result += " ";
575 }
576 const auto* src = reinterpret_cast<const unsigned char*>(&x[i]);
577 result += yarp::conf::numeric::to_string(*src);
578 }
579 return result;
580}
581
582std::string StoreBlob::toStringNested() const
583{
584 return std::string("{") + toString() + "}";
585}
586
587void StoreBlob::fromString(const std::string& src)
588{
589 Bottle bot(src);
590 std::string buf(bot.size(), 0);
591 for (size_t i = 0; i < bot.size(); i++) {
592 buf[i] = static_cast<char>(static_cast<unsigned char>(bot.get(i).asInt32()));
593 }
594 x = buf;
595}
596
597void StoreBlob::fromStringNested(const std::string& src)
598{
599 if (src.length() > 0) {
600 if (src[0] == '{') {
601 // ignore first { and last }
602 std::string buf = src.substr(1, src.length() - 2);
603 fromString(buf);
604 }
605 }
606}
607
609{
610 std::int32_t len = reader.expectInt32();
611 x.resize(len);
612 reader.expectBlock(const_cast<char*>(x.data()), len);
613 return true;
614}
615
617{
618 writer.appendInt32(static_cast<std::int32_t>(x.length()));
619 writer.appendBlock(x.c_str(), x.length());
620 return true;
621}
622
623
625// StoreList
626
627std::string StoreList::toString() const
628{
629 return content.toString();
630}
631
632std::string StoreList::toStringNested() const
633{
634 return std::string("(") + content.toString() + ")";
635}
636
637void StoreList::fromString(const std::string& src)
638{
639 content.fromString(src);
640}
641
642void StoreList::fromStringNested(const std::string& src)
643{
644 if (src.length() > 0) {
645 if (src[0] == '(') {
646 // ignore first ( and last )
647 std::string buf = src.substr(1, src.length() - 2);
648 content.fromString(buf);
649 }
650 }
651}
652
654{
655 // not using the most efficient representation
656 content.read(reader);
657 return true;
658}
659
661{
662 // not using the most efficient representation
663 content.write(writer);
664 return true;
665}
666
667std::int32_t StoreList::subCode() const
668{
669 return subCoder(*(content.implementation));
670}
#define BOTTLE_TAG_INT8
Definition Bottle.h:19
#define BOTTLE_TAG_FLOAT64
Definition Bottle.h:26
#define BOTTLE_TAG_VOCAB64
Definition Bottle.h:24
#define BOTTLE_TAG_INT64
Definition Bottle.h:22
#define BOTTLE_TAG_INT16
Definition Bottle.h:20
#define BOTTLE_TAG_INT32
Definition Bottle.h:21
#define BOTTLE_TAG_STRING
Definition Bottle.h:27
#define BOTTLE_TAG_BLOB
Definition Bottle.h:28
#define BOTTLE_TAG_LIST
Definition Bottle.h:29
#define BOTTLE_TAG_VOCAB32
Definition Bottle.h:23
#define BOTTLE_TAG_FLOAT32
Definition Bottle.h:25
const yarp::os::LogComponent & STORABLE()
Definition Storable.cpp:42
#define GROUP_MASK
Definition Storable.h:31
#define UNIT_MASK
Definition Storable.h:19
A simple collection of objects that can be described and transmitted in a portable way.
Definition Bottle.h:64
static Bottle & getNullBottle()
A special Bottle with no content.
Definition Bottle.cpp:316
void fromString(const std::string &text)
Initializes bottle from a string.
Definition Bottle.cpp:205
size_type size() const
Gets the number of elements in the bottle.
Definition Bottle.cpp:252
bool read(ConnectionReader &reader) override
Set the bottle's value based on input from a network connection.
Definition Bottle.cpp:241
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Definition Bottle.cpp:247
bool write(ConnectionWriter &writer) const override
Output a representation of the bottle to a network connection.
Definition Bottle.cpp:231
bool isNull() const override
Checks if the object is invalid.
Definition Bottle.cpp:344
std::string toString() const override
Gives a human-readable textual representation of the bottle.
Definition Bottle.cpp:212
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 yarp::conf::float32_t expectFloat32()=0
Read a 32-bit floating point number from the network connection.
virtual std::int64_t expectInt64()=0
Read a 64-bit integer from the network connection.
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.
virtual yarp::conf::float64_t expectFloat64()=0
Read a 64-bit floating point number from the network connection.
An interface for writing to a network connection.
virtual void appendInt64(std::int64_t data)=0
Send a representation of a 64-bit integer to the network connection.
virtual void appendInt8(std::int8_t data)=0
Send a representation of a 8-bit integer to the network connection.
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 appendInt16(std::int16_t data)=0
Send a representation of a 16-bit integer to the network connection.
virtual void appendInt32(std::int32_t data)=0
Send a representation of a 32-bit integer to the network connection.
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 appendBlock(const char *data, size_t len)=0
Send a block of data to the network connection.
A single value (typically within a Bottle).
Definition Value.h:44
virtual std::int32_t asInt32() const
Get 32-bit integer value.
Definition Value.cpp:204
virtual std::int32_t getCode() const
Get standard type code of value.
Definition Value.cpp:365
A flexible data format for holding a bunch of numbers and strings.
Definition BottleImpl.h:34
static StoreNull & getNull()
Definition BottleImpl.h:159
A single item in a Bottle.
Definition Storable.h:43
virtual bool writeRaw(ConnectionWriter &connection) const =0
bool write(ConnectionWriter &connection) const override
Write this object to a network connection.
Definition Storable.cpp:155
yarp::os::Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
Definition Storable.cpp:118
std::string toString() const override=0
Return a standard text representation of the content of the object.
bool operator==(const yarp::os::Value &alt) const
Definition Storable.cpp:140
bool check(const std::string &key) const override
Check if there exists a property of the given name.
Definition Storable.cpp:130
bool read(ConnectionReader &connection) override
Read this object from a network connection.
Definition Storable.cpp:146
virtual bool readRaw(ConnectionReader &connection)=0
yarp::os::Bottle & findGroup(const std::string &key) const override
Gets a list corresponding to a given keyword.
Definition Storable.cpp:124
A binary blob item.
Definition Storable.h:1054
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:587
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:616
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:608
static const std::int32_t code
Definition Storable.h:1086
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:569
void fromStringNested(const std::string &src) override
Initialize from a string representation.
Definition Storable.cpp:597
std::string toStringNested() const override
Create string representation, including any syntax that should wrap it such as braces or parentheses.
Definition Storable.cpp:582
A 32-bit floating point number item.
Definition Storable.h:672
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:400
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:394
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:384
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:389
static const std::int32_t code
Definition Storable.h:697
A 64-bit floating point number item.
Definition Storable.h:747
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:426
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:420
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:410
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:415
static const std::int32_t code
Definition Storable.h:772
A 16-bit integer item.
Definition Storable.h:416
static const std::int32_t code
Definition Storable.h:441
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:207
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:196
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:201
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:191
A 32-bit integer item.
Definition Storable.h:502
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:233
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:217
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:227
static const std::int32_t code
Definition Storable.h:527
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:222
A 64-bit integer item.
Definition Storable.h:587
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:253
static const std::int32_t code
Definition Storable.h:612
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:248
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:243
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:259
A 8-bit integer item.
Definition Storable.h:330
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:165
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:170
static const std::int32_t code
Definition Storable.h:355
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:181
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:175
A nested list of items.
Definition Storable.h:1117
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:653
void fromStringNested(const std::string &src) override
Initialize from a string representation.
Definition Storable.cpp:642
std::int32_t subCode() const override
Return a code describing this item, used in serializing bottles.
Definition Storable.cpp:667
std::string toStringNested() const override
Create string representation, including any syntax that should wrap it such as braces or parentheses.
Definition Storable.cpp:632
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:627
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:660
static const std::int32_t code
Definition Storable.h:1144
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:637
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:550
static std::string quotedString(const std::string &x)
Definition Storable.cpp:441
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:436
void fromStringNested(const std::string &src) override
Initialize from a string representation.
Definition Storable.cpp:505
std::string toStringNested() const override
Create string representation, including any syntax that should wrap it such as braces or parentheses.
Definition Storable.cpp:495
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:500
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:558
static const std::int32_t code
Definition Storable.h:1021
A 32 bit vocabulary item.
Definition Storable.h:822
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:269
void fromStringNested(const std::string &src) override
Initialize from a string representation.
Definition Storable.cpp:296
std::string toStringNested() const override
Create string representation, including any syntax that should wrap it such as braces or parentheses.
Definition Storable.cpp:285
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:311
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:280
static const std::int32_t code
Definition Storable.h:848
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:317
A 64 bit vocabulary item.
Definition Storable.h:908
bool writeRaw(ConnectionWriter &writer) const override
Definition Storable.cpp:374
void fromString(const std::string &src) override
Initialize from a string representation, assuming that any syntax around this representation such as ...
Definition Storable.cpp:337
std::string toStringNested() const override
Create string representation, including any syntax that should wrap it such as braces or parentheses.
Definition Storable.cpp:342
std::string toString() const override
Return a standard text representation of the content of the object.
Definition Storable.cpp:326
static const std::int32_t code
Definition Storable.h:934
void fromStringNested(const std::string &src) override
Initialize from a string representation.
Definition Storable.cpp:353
bool readRaw(ConnectionReader &reader) override
Definition Storable.cpp:368
#define yCAssert(component, x)
#define YARP_OS_LOG_COMPONENT(name, name_string)
STL namespace.
std::string to_string(IntegerType x)
Definition numeric.h:116
NetInt32 encode(const std::string &str)
Convert a string into a vocabulary identifier.
Definition Vocab32.cpp:11
std::string decode(NetInt32 code)
Convert a vocabulary identifier into a string.
Definition Vocab32.cpp:33
NetInt64 encode64(const std::string &str)
Convert a string into a vocabulary identifier.
Definition Vocab64.cpp:10
std::string decode64(NetInt64 code)
Convert a vocabulary identifier into a string.
Definition Vocab64.cpp:48
std::int32_t subCoder(T &content)
Definition Storable.h:1177
#define YARP_UNUSED(var)
Definition api.h:162