@@ -442,8 +442,8 @@ class ResourceStorage
442
442
}
443
443
}
444
444
445
- // TODO(Manuel) BEGIN : for backward compatibility, can be removed if export_state_interfaces()
446
- // method is removed
445
+ // BEGIN (Handle export change) : for backward compatibility, can be removed if
446
+ // export_state_interfaces() method is removed
447
447
void insert_state_interface (const StateInterface & state_interface)
448
448
{
449
449
const auto [it, success] = state_interface_map_.emplace (std::make_pair (
@@ -456,7 +456,7 @@ class ResourceStorage
456
456
throw std::runtime_error (msg);
457
457
}
458
458
}
459
- // TODO(Manuel) END: for backward compatibility
459
+ // END: for backward compatibility
460
460
461
461
template <class HardwareT >
462
462
void import_state_interfaces (HardwareT & hardware)
@@ -467,7 +467,7 @@ class ResourceStorage
467
467
// a) there is nothing to export -> on_export_state_interfaces() does return nothing as well
468
468
// b) default implementation for export_state_interfaces() is used -> new functionality ->
469
469
// Framework exports and creates everything
470
- if (interfaces.size () == 0 )
470
+ if (interfaces.empty () )
471
471
{
472
472
std::vector<std::shared_ptr<StateInterface>> interface_ptrs =
473
473
hardware.on_export_state_interfaces ();
@@ -478,8 +478,8 @@ class ResourceStorage
478
478
interface_names.push_back (interface->get_name ());
479
479
}
480
480
}
481
- // TODO(Manuel) BEGIN : for backward compatibility, can be removed if export_state_interfaces()
482
- // method is removed
481
+ // BEGIN (Handle export change) : for backward compatibility, can be removed if
482
+ // export_state_interfaces() method is removed
483
483
else
484
484
{
485
485
interface_names.reserve (interfaces.size ());
@@ -489,7 +489,7 @@ class ResourceStorage
489
489
interface_names.push_back (interface.get_name ());
490
490
}
491
491
}
492
- // TODO(Manuel) END: for backward compatibility
492
+ // END: for backward compatibility
493
493
494
494
hardware_info_map_[hardware.get_name ()].state_interfaces = interface_names;
495
495
available_state_interfaces_.reserve (
@@ -509,8 +509,8 @@ class ResourceStorage
509
509
}
510
510
}
511
511
512
- // TODO(Manuel) BEGIN : for backward compatibility, can be removed if export_command_interfaces()
513
- // method is removed
512
+ // BEGIN (Handle export change) : for backward compatibility, can be removed if
513
+ // export_command_interfaces() method is removed
514
514
void insert_command_interface (CommandInterface && command_interface)
515
515
{
516
516
std::string key = command_interface.get_name ();
@@ -524,7 +524,7 @@ class ResourceStorage
524
524
throw std::runtime_error (msg);
525
525
}
526
526
}
527
- // TODO(Manuel) END: for backward compatibility
527
+ // END: for backward compatibility
528
528
529
529
template <class HardwareT >
530
530
void import_command_interfaces (HardwareT & hardware)
@@ -534,21 +534,21 @@ class ResourceStorage
534
534
// a) there is nothing to export -> on_export_command_interfaces() does return nothing as well
535
535
// b) default implementation for export_command_interfaces() is used -> new functionality ->
536
536
// Framework exports and creates everything
537
- if (interfaces.size () == 0 )
537
+ if (interfaces.empty () )
538
538
{
539
539
std::vector<std::shared_ptr<CommandInterface>> interface_ptrs =
540
540
hardware.on_export_command_interfaces ();
541
541
hardware_info_map_[hardware.get_name ()].command_interfaces =
542
542
add_command_interfaces (interface_ptrs);
543
543
}
544
- // TODO(Manuel) BEGIN : for backward compatibility, can be removed if export_command_interfaces()
545
- // method is removed
544
+ // BEGIN (Handle export change) : for backward compatibility, can be removed if
545
+ // export_command_interfaces() method is removed
546
546
else
547
547
{
548
548
hardware_info_map_[hardware.get_name ()].command_interfaces =
549
549
add_command_interfaces (interfaces);
550
550
}
551
- // TODO(Manuel) END: for backward compatibility
551
+ // END: for backward compatibility
552
552
}
553
553
554
554
// / Adds exported command interfaces into internal storage.
@@ -562,8 +562,8 @@ class ResourceStorage
562
562
* \returns list of interface names that are added into internal storage. The output is used to
563
563
* avoid additional iterations to cache interface names, e.g., for initializing info structures.
564
564
*/
565
- // TODO(Manuel) BEGIN : for backward compatibility, can be removed if export_command_interfaces()
566
- // method is removed
565
+ // BEGIN (Handle export change) : for backward compatibility, can be removed if
566
+ // export_command_interfaces() method is removed
567
567
std::vector<std::string> add_command_interfaces (std::vector<CommandInterface> & interfaces)
568
568
{
569
569
std::vector<std::string> interface_names;
@@ -580,7 +580,7 @@ class ResourceStorage
580
580
581
581
return interface_names;
582
582
}
583
- // TODO(Manuel) END: for backward compatibility
583
+ // END: for backward compatibility
584
584
585
585
std::vector<std::string> add_command_interfaces (
586
586
std::vector<std::shared_ptr<CommandInterface>> & interfaces)
0 commit comments