Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-12-10 02:05:00 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-10 02:05:00 +0300
commit240b88c6834c9c94e8a6448a34dc4ad33bdf3fbd (patch)
treee9f43dba3717e8a430557c16a1d6543a13628ddf /moses/InputType.h
parentad5e27ae56298564dfd73637c160a682b5f5f028 (diff)
Passing around AllOptions or references thereto everywhere,
strong them locally where appropriate, so that compontents can become independent of StaticData once instantiated.
Diffstat (limited to 'moses/InputType.h')
-rw-r--r--moses/InputType.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/moses/InputType.h b/moses/InputType.h
index 9501f8c8a..b320396e0 100644
--- a/moses/InputType.h
+++ b/moses/InputType.h
@@ -45,6 +45,7 @@ class TranslationTask;
class InputType
{
protected:
+ AllOptions::ptr m_options;
long m_translationId; //< contiguous Id
long m_documentId;
long m_topicId;
@@ -67,11 +68,15 @@ public:
size_t m_frontSpanCoveredLength;
// how many words from the beginning are covered
- InputType(long translationId = 0);
+ InputType(AllOptions::ptr const& opts, long translationId = 0);
virtual ~InputType();
virtual InputTypeEnum GetType() const = 0;
+ AllOptions::ptr const& options() const {
+ return m_options;
+ }
+
long GetTranslationId() const {
return m_translationId;
}