| 42 | } |
| 43 | |
| 44 | inline const ICodec* Find(TCodecID id) const { |
| 45 | TByID::const_iterator it = ByID.find(id); |
| 46 | |
| 47 | if (it != ByID.end()) { |
| 48 | return it->second; |
| 49 | } |
| 50 | |
| 51 | ythrow yexception() << "can not find codec by id " << id; |
| 52 | } |
| 53 | |
| 54 | typedef THashMap<TCodecID, const ICodec*> TByID; |
| 55 | TByID ByID; |