mosesdecoder/moses2/InputPathsBase.h

55 lines
814 B
C
Raw Normal View History

2015-10-24 01:19:31 +03:00
/*
* InputPaths.h
*
* Created on: 23 Oct 2015
* Author: hieu
*/
2016-02-29 23:58:17 +03:00
#pragma once
2015-10-24 01:19:31 +03:00
#include <vector>
2015-11-17 18:58:35 +03:00
#include "MemPool.h"
2015-10-24 01:19:31 +03:00
2015-12-10 23:49:30 +03:00
namespace Moses2
{
2016-04-27 12:41:56 +03:00
class InputType;
2015-10-26 00:20:55 +03:00
class System;
2016-03-01 22:28:49 +03:00
class ManagerBase;
2016-03-01 22:56:18 +03:00
class InputPathBase;
2015-10-24 01:19:31 +03:00
2016-02-29 23:58:17 +03:00
class InputPathsBase
{
2016-03-31 23:00:16 +03:00
typedef std::vector<InputPathBase*> Coll;
2015-10-24 01:19:31 +03:00
public:
2017-02-01 03:27:14 +03:00
InputPathsBase() {
2016-03-31 23:00:16 +03:00
}
virtual ~InputPathsBase();
2015-10-24 01:19:31 +03:00
2015-10-24 15:14:35 +03:00
//! iterators
typedef Coll::iterator iterator;
typedef Coll::const_iterator const_iterator;
2017-02-01 03:27:14 +03:00
const_iterator begin() const {
2016-03-31 23:00:16 +03:00
return m_inputPaths.begin();
2015-10-24 15:14:35 +03:00
}
2017-02-01 03:27:14 +03:00
const_iterator end() const {
2016-03-31 23:00:16 +03:00
return m_inputPaths.end();
2015-10-24 15:14:35 +03:00
}
2017-02-01 03:27:14 +03:00
iterator begin() {
2016-03-31 23:00:16 +03:00
return m_inputPaths.begin();
2015-10-24 15:14:35 +03:00
}
2017-02-01 03:27:14 +03:00
iterator end() {
2016-03-31 23:00:16 +03:00
return m_inputPaths.end();
2015-10-24 15:14:35 +03:00
}
2016-04-27 12:41:56 +03:00
virtual void Init(const InputType &input, const ManagerBase &mgr) = 0;
2015-12-16 16:31:19 +03:00
2015-10-24 01:19:31 +03:00
protected:
2016-03-31 23:00:16 +03:00
Coll m_inputPaths;
2015-10-24 01:19:31 +03:00
};
2015-12-10 23:49:30 +03:00
}