blob: eef5be688a234051ca5dbf30b6fcad87bc00a4a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#pragma once
#include <string>
#include <iostream>
namespace Moses
{
/** base class for all phrase properties.
*/
class PhraseProperty
{
friend std::ostream& operator<<(std::ostream &, const PhraseProperty &);
public:
PhraseProperty() : m_value(NULL) {};
virtual ~PhraseProperty() {
if ( m_value != NULL ) delete m_value;
};
virtual void ProcessValue(const std::string &value) {
m_value = new std::string(value);
};
virtual const std::string *GetValueString() const {
return m_value;
};
protected:
virtual void Print(std::ostream& out) const;
std::string *m_value;
};
} // namespace Moses
|