| 1397 | } |
| 1398 | |
| 1399 | std::vector<int> StructType::GetAllFieldIndices(const std::string& name) const { |
| 1400 | std::vector<int> result; |
| 1401 | auto p = impl_->name_to_index_.equal_range(name); |
| 1402 | for (auto it = p.first; it != p.second; ++it) { |
| 1403 | result.push_back(it->second); |
| 1404 | } |
| 1405 | if (result.size() > 1) { |
| 1406 | std::sort(result.begin(), result.end()); |
| 1407 | } |
| 1408 | return result; |
| 1409 | } |
| 1410 | |
| 1411 | FieldVector StructType::GetAllFieldsByName(const std::string& name) const { |
| 1412 | FieldVector result; |