2010-04-08 21:16:10 +04:00
|
|
|
|
|
|
|
#include "TranslationOptionList.h"
|
|
|
|
#include "Util.h"
|
|
|
|
#include "TranslationOption.h"
|
|
|
|
|
2010-06-14 01:06:34 +04:00
|
|
|
using namespace std;
|
|
|
|
|
2010-04-08 21:16:10 +04:00
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
|
|
|
|
TranslationOptionList::TranslationOptionList(const TranslationOptionList ©)
|
|
|
|
{
|
2011-02-24 16:14:42 +03:00
|
|
|
const_iterator iter;
|
|
|
|
for (iter = copy.begin(); iter != copy.end(); ++iter) {
|
|
|
|
const TranslationOption &origTransOpt = **iter;
|
|
|
|
TranslationOption *newTransOpt = new TranslationOption(origTransOpt);
|
|
|
|
Add(newTransOpt);
|
|
|
|
}
|
2010-04-08 21:16:10 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
TranslationOptionList::~TranslationOptionList()
|
|
|
|
{
|
2011-02-24 16:14:42 +03:00
|
|
|
RemoveAllInColl(m_coll);
|
2010-04-08 21:16:10 +04:00
|
|
|
}
|
|
|
|
|
2010-06-14 01:06:34 +04:00
|
|
|
TO_STRING_BODY(TranslationOptionList);
|
|
|
|
|
|
|
|
std::ostream& operator<<(std::ostream& out, const TranslationOptionList& coll)
|
|
|
|
{
|
2011-02-24 16:14:42 +03:00
|
|
|
TranslationOptionList::const_iterator iter;
|
|
|
|
for (iter = coll.begin(); iter != coll.end(); ++iter) {
|
|
|
|
const TranslationOption &transOpt = **iter;
|
|
|
|
out << transOpt << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
return out;
|
2010-04-08 21:16:10 +04:00
|
|
|
}
|
|
|
|
|
2010-06-14 01:06:34 +04:00
|
|
|
} // namespace
|