#include <data_notifier.h>
◆ NotifyVector
◆ ~DataNotifier()
apollo::cyber::data::DataNotifier::~DataNotifier |
( |
| ) |
|
|
inline |
◆ AddNotifier()
void apollo::cyber::data::DataNotifier::AddNotifier |
( |
uint64_t |
channel_id, |
|
|
const std::shared_ptr< Notifier > & |
notifier |
|
) |
| |
|
inline |
在文件 data_notifier.h 第 61 行定义.
62 {
63 std::lock_guard<std::mutex> lock(notifies_map_mutex_);
65 if (notifies_map_.
Get(channel_id, ¬ifies)) {
66 notifies->emplace_back(notifier);
67 } else {
69 notifies_map_.
Set(channel_id, new_notify);
70 }
71}
bool Get(K key, V **value)
std::vector< std::shared_ptr< Notifier > > NotifyVector
◆ Notify()
bool apollo::cyber::data::DataNotifier::Notify |
( |
const uint64_t |
channel_id | ) |
|
|
inline |
在文件 data_notifier.h 第 73 行定义.
73 {
75 if (notifies_map_.
Get(channel_id, ¬ifies)) {
76 for (auto& notifier : *notifies) {
77 if (notifier && notifier->callback) {
78 notifier->callback();
79 }
80 }
81 return true;
82 }
83 return false;
84}
该类的文档由以下文件生成: