Poc més
[apertium.git] / apertium-unicode / apertium / transfer_data.h
blob91d5223f2471d89b2f1fa3c82ad0f25436a5258f
1 /*
2 * Copyright (C) 2005 Universitat d'Alacant / Universidad de Alicante
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * 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
17 * 02111-1307, USA.
19 #ifndef _TRANSFERDATA_
20 #define _TRANSFERDATA_
22 #include <lttoolbox/alphabet.h>
23 #include <lttoolbox/ltstr.h>
24 #include <lttoolbox/transducer.h>
26 #include <map>
27 #include <set>
29 using namespace std;
31 class TransferData
33 private:
34 void copy(TransferData const &o);
35 void destroy();
37 map<wstring, wstring, Ltstr> attr_items;
38 map<wstring, int, Ltstr> macros;
39 map<wstring, set<wstring, Ltstr>, Ltstr> lists;
40 map<wstring, wstring, Ltstr> variables;
42 Alphabet alphabet;
43 Transducer transducer;
44 map<int, int> finals;
46 void writeRegexps(FILE *output);
47 public:
48 TransferData();
49 ~TransferData();
50 TransferData(TransferData const &o);
51 TransferData & operator =(TransferData const &o);
53 Alphabet & getAlphabet();
54 Transducer & getTransducer();
55 map<int, int> & getFinals();
56 map<wstring, wstring, Ltstr> & getAttrItems();
58 map<wstring, int, Ltstr> & getMacros();
59 map<wstring, set<wstring, Ltstr>, Ltstr> & getLists();
60 map<wstring, wstring, Ltstr> & getVariables();
62 void write(FILE *output);
65 #endif