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