diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2012-11-12 23:56:18 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2012-11-12 23:56:18 +0400 |
commit | 5e3ef23cef6101d2c098eb3445f562e8f595655b (patch) | |
tree | b8c332b6fa82bae84ea4910967a10ba1b08a7107 /moses/TranslationOptionList.cpp | |
parent | 8c785cff2b1be3cccd76ea9026f71b649762dfc3 (diff) |
move moses/src/* to moses/
Diffstat (limited to 'moses/TranslationOptionList.cpp')
-rw-r--r-- | moses/TranslationOptionList.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/moses/TranslationOptionList.cpp b/moses/TranslationOptionList.cpp new file mode 100644 index 000000000..1d99729fe --- /dev/null +++ b/moses/TranslationOptionList.cpp @@ -0,0 +1,39 @@ + +#include "TranslationOptionList.h" +#include "Util.h" +#include "TranslationOption.h" + +using namespace std; + +namespace Moses +{ + +TranslationOptionList::TranslationOptionList(const TranslationOptionList ©) +{ + const_iterator iter; + for (iter = copy.begin(); iter != copy.end(); ++iter) { + const TranslationOption &origTransOpt = **iter; + TranslationOption *newTransOpt = new TranslationOption(origTransOpt); + Add(newTransOpt); + } +} + +TranslationOptionList::~TranslationOptionList() +{ + RemoveAllInColl(m_coll); +} + +TO_STRING_BODY(TranslationOptionList); + +std::ostream& operator<<(std::ostream& out, const TranslationOptionList& coll) +{ + TranslationOptionList::const_iterator iter; + for (iter = coll.begin(); iter != coll.end(); ++iter) { + const TranslationOption &transOpt = **iter; + out << transOpt << endl; + } + + return out; +} + +} // namespace |