- template<typename T>
- EndgameBase<T>* get(Key key) const {
-
- typedef typename Map<T>::type M;
- typename M::const_iterator it = map<M>().find(key);
- return it != map<M>().end() ? it->second : NULL;
- }
-
-private:
- template<EndgameType E> void add(const std::string& keyCode);
- template<typename M> const M& map() const;
-
- M1 m1;
- M2 m2;
+ template<typename T> T probe(Key key, T& eg)
+ { return eg = map(eg).count(key) ? map(eg)[key] : NULL; }