MRPT  1.9.9
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

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 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019