Tanl Linguistic Pipeline |
00001 /* 00002 ** DeSR 00003 ** src/PyPipe.h 00004 ** ---------------------------------------------------------------------- 00005 ** Copyright (c) 2006 Giuseppe Attardi (attardi@di.unipi.it). 00006 ** ---------------------------------------------------------------------- 00007 ** 00008 ** This file is part of DeSR. 00009 ** 00010 ** DeSR is free software; you can redistribute it and/or modify it 00011 ** under the terms of the GNU General Public License, version 3, 00012 ** as published by the Free Software Foundation. 00013 ** 00014 ** DeSR is distributed in the hope that it will be useful, 00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 ** GNU General Public License for more details. 00018 ** 00019 ** You should have received a copy of the GNU General Public License 00020 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00021 ** ---------------------------------------------------------------------- 00022 */ 00023 00024 #ifndef DeSR_PyPipe_H 00025 #define DeSR_PyPipe_H 00026 00027 #include "Parser.h" 00028 #include <Python.h> 00029 00030 namespace Parser { 00031 00037 struct ParserPipePython : public Enumerator<Sentence*> 00038 { 00039 public: 00041 ParserPipePython(Parser& parser, PyObject* pit); 00042 00043 bool MoveNext(); 00044 00045 Sentence* Current(); 00046 00047 ~ParserPipePython(); 00048 00052 void Dispose(); 00053 00054 private: 00055 Parser& parser; 00056 PyObject* pit; 00057 PyObject* next; 00058 Language const* language; 00059 }; 00060 00061 } // namespace Parser 00062 00063 #endif // DeSR_PyPipe_H