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