| 257 | } |
| 258 | |
| 259 | comm::RetCode TopicConfig::GetSubIDsByPubID(const int pub_id, set<int> &sub_ids) const { |
| 260 | sub_ids.clear(); |
| 261 | |
| 262 | comm::RetCode ret; |
| 263 | shared_ptr<const proto::Pub> pub; |
| 264 | if (comm::RetCode::RET_OK != (ret = GetPubByPubID(pub_id, pub))) return ret; |
| 265 | if (!pub) return comm::RetCode::RET_ERR_RANGE_PUB; |
| 266 | for (int i{0}; i < pub->sub_ids_size(); ++i) { |
| 267 | sub_ids.insert(pub->sub_ids(i)); |
| 268 | } |
| 269 | return comm::RetCode::RET_OK; |
| 270 | } |
| 271 | |
| 272 | /******************* sub ********************/ |
| 273 | comm::RetCode TopicConfig::GetAllSub(vector<shared_ptr<const proto::Sub>> &subs) const { |
no outgoing calls