From 6d72539a2276e1f0325f77b769142ace384e6fcb Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Mon, 26 Oct 2015 13:51:21 +0000 Subject: [PATCH] FactorCollection is a friend of moses2 System --- contrib/other-builds/moses2/System.h | 2 ++ moses/FactorCollection.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/contrib/other-builds/moses2/System.h b/contrib/other-builds/moses2/System.h index 0d68c7dc3..e11fa9946 100644 --- a/contrib/other-builds/moses2/System.h +++ b/contrib/other-builds/moses2/System.h @@ -10,6 +10,7 @@ #include "Vocab.h" #include "Weights.h" #include "util/pool.hh" +#include "moses/FactorCollection.h" class FeatureFunction; class StatefulFeatureFunction; @@ -40,6 +41,7 @@ public: protected: Vocab m_vocab; + Moses::FactorCollection m_factors; std::vector m_featureFunctions; std::vector m_statefulFeatureFunctions; std::vector m_phraseTables; diff --git a/moses/FactorCollection.h b/moses/FactorCollection.h index 5d94e1197..c2e3362aa 100644 --- a/moses/FactorCollection.h +++ b/moses/FactorCollection.h @@ -41,6 +41,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "util/pool.hh" #include "Factor.h" +class System; + namespace Moses { @@ -66,6 +68,7 @@ struct FactorFriend { class FactorCollection { friend std::ostream& operator<<(std::ostream&, const FactorCollection&); + friend class ::System; struct HashFactor : public std::unary_function { std::size_t operator()(const FactorFriend &factor) const {