MRPT  2.0.4
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
mrpt::comms::TopicDirectory Class Reference

Detailed Description

The central directory of existing topics for pub/sub.

Definition at line 108 of file nodelets.h.

#include <mrpt/comms/nodelets.h>

Inheritance diagram for mrpt::comms::TopicDirectory:

Public Types

using Ptr = std::shared_ptr< TopicDirectory >
 

Public Member Functions

template<typename PATH >
Topic::Ptr getTopic (PATH &&path)
 
void cleanupTopic (const std::string &key)
 

Static Public Member Functions

static Ptr create ()
 

Private Member Functions

 TopicDirectory ()
 

Private Attributes

std::mutex m_mutex
 
std::unordered_map< std::string, std::weak_ptr< Topic > > m_mapService
 

Member Typedef Documentation

◆ Ptr

Definition at line 114 of file nodelets.h.

Constructor & Destructor Documentation

◆ TopicDirectory()

TopicDirectory::TopicDirectory ( )
privatedefault

Member Function Documentation

◆ cleanupTopic()

void TopicDirectory::cleanupTopic ( const std::string &  key)

Definition at line 54 of file nodelets.cpp.

References m_mapService, and m_mutex.

◆ create()

TopicDirectory::Ptr TopicDirectory::create ( )
static
Examples:
comms_nodelets_example/NodeletsTest_impl.cpp.

Definition at line 60 of file nodelets.cpp.

◆ getTopic()

template<typename PATH >
Topic::Ptr mrpt::comms::TopicDirectory::getTopic ( PATH &&  path)
inline

Definition at line 117 of file nodelets.h.

References mrpt::comms::Topic::create(), m_mapService, and m_mutex.

Here is the call graph for this function:

Member Data Documentation

◆ m_mapService

std::unordered_map<std::string, std::weak_ptr<Topic> > mrpt::comms::TopicDirectory::m_mapService
private

Definition at line 139 of file nodelets.h.

Referenced by cleanupTopic(), and getTopic().

◆ m_mutex

std::mutex mrpt::comms::TopicDirectory::m_mutex
private

Definition at line 138 of file nodelets.h.

Referenced by cleanupTopic(), and getTopic().




Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020