move default factory into cpp file

This commit is contained in:
Hieu Hoang 2016-03-14 19:20:02 +00:00
parent 15072646e2
commit 7a07308041
2 changed files with 20 additions and 10 deletions

View File

@ -19,7 +19,27 @@ using namespace std;
namespace Moses2
{
template <class F>
class DefaultFeatureFactory : public FeatureFactory
{
public:
FeatureFunction *Create(size_t startInd, const std::string &line) {
return new F(startInd, line);
}
};
////////////////////////////////////////////////////////////////////
/*
class KenFactory : public FeatureFactory
{
public:
void Create(size_t startInd, const std::string &line) {
//ConstructKenLM(line);
}
};
*/
////////////////////////////////////////////////////////////////////
FeatureRegistry::FeatureRegistry()
{
// Feature with same name as class

View File

@ -18,16 +18,6 @@ protected:
FeatureFactory() {}
};
////////////////////////////////////////////////////////////////////
template <class F>
class DefaultFeatureFactory : public FeatureFactory
{
public:
FeatureFunction *Create(size_t startInd, const std::string &line) {
return new F(startInd, line);
}
};
////////////////////////////////////////////////////////////////////
class FeatureRegistry
{