| 14 | |
| 15 | template<class T> |
| 16 | StringTableIndex |
| 17 | StringTableT<T>::lookup(const T &s) const |
| 18 | { |
| 19 | typedef typename Table::template nth_index<1>::type StringSet; |
| 20 | const StringSet &strings = _table.template get<1>(); |
| 21 | |
| 22 | typename StringSet::const_iterator it = strings.find(s); |
| 23 | if (it == strings.end()) { |
| 24 | throw std::domain_error ("String table access out of bounds"); |
| 25 | } |
| 26 | |
| 27 | return it->i; |
| 28 | } |
| 29 | |
| 30 | template<class T> |
| 31 | const T & |
no outgoing calls