00001 #pragma once
00002
00003 #include <string>
00004
00005 #include <boost/shared_ptr.hpp>
00006 #include <boost/unordered_map.hpp>
00007
00008 namespace Moses
00009 {
00010
00011 class FeatureFactory;
00012
00013 class FeatureRegistry
00014 {
00015 public:
00016 FeatureRegistry();
00017
00018 ~FeatureRegistry();
00019
00020 void Construct(const std::string &name, const std::string &line);
00021 void PrintFF() const;
00022
00023 private:
00024 void Add(const std::string &name, FeatureFactory *factory);
00025
00026 typedef boost::unordered_map<std::string, boost::shared_ptr<FeatureFactory> > Map;
00027
00028 Map registry_;
00029 };
00030
00031 }