Adding prob files
[apertium.git] / trunk / apertium-tools / apertium-utils / transliterate / entry.cpp
blobc462153ecd8c5bc7790321286c933abe2c2c2e1c
1 /*
2 * Copyright (C) 2007 Francis Tyers
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #include "entry.h"
22 using namespace std;
24 Entry::Entry(wstring const &left, wstring const &right)
26 _left = left;
27 _right = right;
30 Entry::~Entry()
32 destroy();
35 Entry::Entry(Entry const &e)
37 // wcout << L"Entry(Entry const &e)" << endl;
38 copy(e);
41 Entry & Entry::operator = (Entry const &e)
43 // wcout << L"Entry &" << endl;
45 if(this != &e) {
46 destroy();
47 copy(e);
50 return *this;
53 void
54 Entry::destroy()
59 void
60 Entry::copy(Entry const &e)
62 _left = e._left;
63 _right = e._right;
67 wstring
68 Entry::left()
70 return _left;
73 wstring
74 Entry::right()
76 return _right;