blob: 1c3867c09316425b14ffd627b64275d1c2266992 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#pragma once
#include <string>
#include <boost/shared_ptr.hpp>
#include <boost/unordered_map.hpp>
namespace Moses
{
class FeatureFactory;
class FeatureRegistry
{
public:
FeatureRegistry();
~FeatureRegistry();
void Construct(const std::string &name, const std::string &line);
void PrintFF() const;
private:
void Add(const std::string &name, FeatureFactory *factory);
typedef boost::unordered_map<std::string, boost::shared_ptr<FeatureFactory> > Map;
Map registry_;
};
} // namespace Moses
|