| 111 | template<typename TImpl, |
| 112 | c_enable_if_t<std::is_base_of<T, TImpl>::value, int> = 0> |
| 113 | CStatus sendTopicValue(const std::string& topic, |
| 114 | const std::shared_ptr<TImpl>& value, |
| 115 | GMessagePushStrategy strategy) { |
| 116 | CGRAPH_FUNCTION_BEGIN |
| 117 | const std::string& innerTopic = internal::SEND_RECV_PREFIX + topic; |
| 118 | auto result = send_recv_message_map_.find(innerTopic); |
| 119 | if (result == send_recv_message_map_.end()) { |
| 120 | CGRAPH_RETURN_ERROR_STATUS("no find [" + topic + "] topic"); |
| 121 | } |
| 122 | |
| 123 | auto message = static_cast<GMessagePtr<T> >(result->second); |
| 124 | CGRAPH_ASSERT_NOT_NULL(message); |
| 125 | |
| 126 | message->send(value, strategy); |
| 127 | CGRAPH_FUNCTION_END |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * 绑定对应的topic信息,并且获取 conn_id 信息 |
nothing calls this directly
no test coverage detected