21 additionalMetadata(
"")
27 const std::string& frameName,
28 const std::string& additionalMetadata) :
32 additionalMetadata(additionalMetadata)
39 if (!read_name(reader)) {
42 if (!read_frameName(reader)) {
45 if (!read_additionalMetadata(reader)) {
64 if (!write_name(writer)) {
67 if (!write_frameName(writer)) {
70 if (!write_additionalMetadata(writer)) {
110 yarp().setOwner(*
this);
136 return obj !=
nullptr;
155 if (group == 0 && is_dirty) {
190 will_set_frameName();
192 mark_dirty_frameName();
200 return obj->frameName;
218 will_set_additionalMetadata();
220 mark_dirty_additionalMetadata();
222 did_set_additionalMetadata();
228 return obj->additionalMetadata;
269 writer.
writeString(
"send: 'help' or 'patch (param1 val1) (param2 val2)'");
284 if (!writer.
writeTag(
"many", 1, 0)) {
292 if (field ==
"name") {
300 if (field ==
"frameName") {
304 if (!writer.
writeString(
"std::string frameName")) {
308 if (field ==
"additionalMetadata") {
312 if (!writer.
writeString(
"std::string additionalMetadata")) {
327 bool have_act =
false;
328 if (tag !=
"patch") {
329 if (((len - 1) % 2) != 0) {
332 len = 1 + ((len - 1) / 2);
336 for (
int i = 1; i < len; ++i) {
352 if (!obj->nested_read_name(reader)) {
356 }
else if (key ==
"frameName") {
357 will_set_frameName();
358 if (!obj->nested_read_frameName(reader)) {
362 }
else if (key ==
"additionalMetadata") {
363 will_set_additionalMetadata();
364 if (!obj->nested_read_additionalMetadata(reader)) {
367 did_set_additionalMetadata();
405 if (!obj->nested_write_name(writer)) {
409 if (is_dirty_frameName) {
419 if (!obj->nested_write_frameName(writer)) {
423 if (is_dirty_additionalMetadata) {
433 if (!obj->nested_write_additionalMetadata(writer)) {
441 void SensorMetadata::Editor::communicate()
446 if (
yarp().canWrite()) {
453 void SensorMetadata::Editor::mark_dirty()
459 void SensorMetadata::Editor::mark_dirty_name()
465 is_dirty_name =
true;
470 void SensorMetadata::Editor::mark_dirty_frameName()
472 if (is_dirty_frameName) {
476 is_dirty_frameName =
true;
481 void SensorMetadata::Editor::mark_dirty_additionalMetadata()
483 if (is_dirty_additionalMetadata) {
487 is_dirty_additionalMetadata =
true;
492 void SensorMetadata::Editor::dirty_flags(
bool flag)
495 is_dirty_name = flag;
496 is_dirty_frameName = flag;
497 is_dirty_additionalMetadata = flag;
498 dirty_count = flag ? 3 : 0;