| 245 | } |
| 246 | |
| 247 | comm::RetCode TopicConfig::GetPubByPubID(const int pub_id, shared_ptr<const proto::Pub> &pub) const { |
| 248 | pub = nullptr; |
| 249 | |
| 250 | auto &&it = impl_->pub_id2pub.find(pub_id); |
| 251 | if (impl_->pub_id2pub.end() == it) { |
| 252 | return comm::RetCode::RET_ERR_RANGE_PUB; |
| 253 | } |
| 254 | pub = it->second; |
| 255 | |
| 256 | return comm::RetCode::RET_OK; |
| 257 | } |
| 258 | |
| 259 | comm::RetCode TopicConfig::GetSubIDsByPubID(const int pub_id, set<int> &sub_ids) const { |
| 260 | sub_ids.clear(); |
no outgoing calls