44 #ifndef ROBOT_ACTIVITY_RESOURCE_RESOURCE_MANAGER_H 45 #define ROBOT_ACTIVITY_RESOURCE_RESOURCE_MANAGER_H 69 template <
class Resource>
94 template<
typename... Args>
95 typename Resource::SharedPtr
add(Args&& ...args)
97 auto resource = std::make_shared<Resource>(std::forward<Args>(args)...);
158 template<
typename... Args>
161 return add(std::forward<Args>(args)...);
187 template<
typename... Args>
190 return add(std::forward<Args>(args)...);
200 #endif // ROBOT_ACTIVITY_RESOURCE_RESOURCE_MANAGER_H Resource::SharedPtr add(Args &&...args)
Adds a managed resource.
Specialization of the RMWrapper, where the managed resource is ManagedSubscriber. ...
void pauseAll()
Pauses all managed resources.
void resumeAll()
Resumes all managed resources.
Implementation of Managed class for ros::ServiceServer.
void acquireAll(const ros::NodeHandlePtr &node_handle)
Acquires all managed resources.
RMWrapper< ManagedSubscriber > SubscriberManager
~ResourceManager()
Default destructor.
ManagedServiceServer::SharedPtr advertiseService(Args &&...args)
Adds a service to the list of managed services.
ManagedSubscriber class implements a wrapper around ros::Subscriber with same functionality as ros::S...
Specialization of the RMWrapper, where the managed resource is ManagedServiceServer.
ManagedServiceServer class implements a wrapper around ros::ServiceServer with same functionality as ...
void releaseAll()
Releases all managed resources.
RMWrapper< ManagedServiceServer > ServiceServerManager
std::shared_ptr< Managed< ManagedSubscriber, ros::Subscriber > > SharedPtr
Implementation of Managed class for ros::Subscriber.
ManagedSubscriber::SharedPtr subscribe(Args &&...args)
Adds a subscriber to the list of managed subscribers.
ResourceManager()
Default constructor.
Wrapper around the ResourceManager.
std::vector< typename Resource::SharedPtr > resources_