ROS 2 rclcpp + rcl - jazzy  jazzy
ROS 2 C++ Client Library with ROS Client Library
Public Types | Public Member Functions | List of all members
rclcpp::executors::EntityCollection< EntityKeyType, EntityValueType > Class Template Reference

A collection of entities, indexed by their corresponding handles. More...

#include <rclcpp/executors/executor_entities_collection.hpp>

Inheritance diagram for rclcpp::executors::EntityCollection< EntityKeyType, EntityValueType >:
Inheritance graph
[legend]
Collaboration diagram for rclcpp::executors::EntityCollection< EntityKeyType, EntityValueType >:
Collaboration graph
[legend]

Public Types

using Key = const EntityKeyType *
 Key type of the map.
 
using EntityWeakPtr = typename EntityValueType::WeakPtr
 Weak pointer to entity type.
 
using EntitySharedPtr = typename EntityValueType::SharedPtr
 Shared pointer to entity type.
 

Public Member Functions

void update (const EntityCollection< EntityKeyType, EntityValueType > &other, std::function< void(const EntitySharedPtr &)> on_added, std::function< void(const EntitySharedPtr &)> on_removed)
 Update this collection based on the contents of another collection. More...
 

Detailed Description

template<typename EntityKeyType, typename EntityValueType>
class rclcpp::executors::EntityCollection< EntityKeyType, EntityValueType >

A collection of entities, indexed by their corresponding handles.

Definition at line 99 of file executor_entities_collection.hpp.

Member Function Documentation

◆ update()

template<typename EntityKeyType , typename EntityValueType >
void rclcpp::executors::EntityCollection< EntityKeyType, EntityValueType >::update ( const EntityCollection< EntityKeyType, EntityValueType > &  other,
std::function< void(const EntitySharedPtr &)>  on_added,
std::function< void(const EntitySharedPtr &)>  on_removed 
)
inline

Update this collection based on the contents of another collection.

Update the internal state of this collection, firing callbacks when entities have been added or removed.

Parameters
[in]otherCollection to compare to
[in]on_addedCallback for when entities have been added
[in]on_removedCallback for when entities have been removed

Definition at line 121 of file executor_entities_collection.hpp.

Referenced by rclcpp::Executor::collect_entities().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: