| 86 | } |
| 87 | |
| 88 | u_int NamedObjectVector::GetIndex(const std::string &name) const { |
| 89 | Name2IndexType::left_const_iterator it = name2index.left.find(name); |
| 90 | |
| 91 | if (it == name2index.left.end()) |
| 92 | throw runtime_error("Reference to an undefined NamedObject name: " + name); |
| 93 | else |
| 94 | return it->second; |
| 95 | } |
| 96 | |
| 97 | u_int NamedObjectVector::GetIndex(const NamedObject *o) const { |
| 98 | Index2ObjType::right_const_iterator it = index2obj.right.find(o); |
no test coverage detected