| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2009 by The qGo Project * |
| 3 | * * |
| 4 | * This file is part of qGo. * |
| 5 | * * |
| 6 | * qGo is free software: you can redistribute it and/or modify * |
| 7 | * it under the terms of the GNU General Public License as published by * |
| 8 | * the Free Software Foundation; either version 2 of the License, or * |
| 9 | * (at your option) any later version. * |
| 10 | * * |
| 11 | * This program is distributed in the hope that it will be useful, * |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 14 | * GNU General Public License for more details. * |
| 15 | * * |
| 16 | * You should have received a copy of the GNU General Public License * |
| 17 | * along with this program; if not, see <http://www.gnu.org/licenses/> * |
| 18 | * or write to the Free Software Foundation, Inc., * |
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 20 | ***************************************************************************/ |
| 21 | |
| 22 | |
| 23 | #ifndef SGFPARSER_H |
| 24 | #define SGFPARSER_Hcxx . . $ `src/sgf/sgfparser.h:24:9`! |
| 25 | |
| 26 | #include "../defines.h"cxx . . $ `<file>/src/defines.h`/ |
| 27 | #include "tree.h"cxx . . $ `<file>/src/game_tree/tree.h`/ |
| 28 | |
| 29 | #include <QtCore> |
| 30 | |
| 31 | class GameDatacxx . . $ GameData#; |
| 32 | |
| 33 | class SGFParsercxx . . $ SGFParser# |
| 34 | { |
| 35 | public: |
| 36 | SGFParsercxx . . $ SGFParser#SGFParser(ed4f44641ad95fbd).(Treecxx . . $ Tree# *tree); |
| 37 | ~cxx . . $ SGFParser#`~SGFParser`(ced63f7c635d850d).SGFParsercxx . . $ SGFParser#(); |
| 38 | QStringcxx . . $ QString# loadFilecxx . . $ SGFParser#loadFile(fd988a2ab94d906b).(const QStringcxx . . $ QString# &fileName); |
| 39 | GameDatacxx . . $ GameData# * initGamecxx . . $ SGFParser#initGame(a4526618b9a7c13a).(const QStringcxx . . $ QString# &toParse, const QStringcxx . . $ QString# &fileName); |
| 40 | |
| 41 | bool parsecxx . . $ SGFParser#parse(edf9e4f73813982f).(const QStringcxx . . $ QString# &fileName, const QStringcxx . . $ QString# &filter=0cxx . . $ QString#QString(85c52e162fed56f9).); |
| 42 | |
| 43 | bool doParsecxx . . $ SGFParser#doParse(e1defb592416720d).(const QStringcxx . . $ QString# &toParseStr); |
| 44 | bool doWritecxx . . $ SGFParser#doWrite(19af0a447565f6f7).(const QStringcxx . . $ QString# &fileName, Treecxx . . $ Tree# *tree, GameDatacxx . . $ GameData# *gameData); |
| 45 | bool exportSGFtoClipBcxx . . $ SGFParser#exportSGFtoClipB(dfc9a3f638d89e9e).(QStringcxx . . $ QString# *str, Treecxx . . $ Tree# *tree, GameDatacxx . . $ GameData# *gameData); |
| 46 | |
| 47 | protected: |
| 48 | int minPoscxx . . $ SGFParser#minPos(2326284602b0bb2d).(int n1, int n2, int n3); |
| 49 | bool corruptSgfcxx . . $ SGFParser#corruptSgf(397e7d3e7106fad8).(int where=0, QStringcxx . . $ QString# reason=QStringcxx . . $ QString#QString(ee6b7ef95d0103b6).::nullcxx . . $ QString#null.); |
| 50 | |
| 51 | bool parsePropertycxx . . $ SGFParser#parseProperty(a6729626391d1613).(const QStringcxx . . $ QString# &toParse, const QStringcxx . . $ QString# &prop, QStringcxx . . $ QString# &result); |
| 52 | |
| 53 | void traversecxx . . $ SGFParser#traverse(7bd869106604c0e4).(Movecxx . . $ Move# *t, GameDatacxx . . $ GameData# *gameData); |
| 54 | void writeGameHeadercxx . . $ SGFParser#writeGameHeader(53acbc9cc3152f0d).(GameDatacxx . . $ GameData# *gameData); |
| 55 | bool writeStreamcxx . . $ SGFParser#writeStream(a1dbb529edb79e02).(Treecxx . . $ Tree# *tree, GameDatacxx . . $ GameData# *gameData); |
| 56 | |
| 57 | private: |
| 58 | bool setCodeccxx . . $ SGFParser#setCodec(7dc6c9a0b6a7270f).(QStringcxx . . $ QString# c = QStringcxx . . $ QString#QString(ced63f7c635d850d).()); |
| 59 | |
| 60 | QTextStreamcxx . . $ QTextStream# *streamcxx . . $ SGFParser#stream.; |
| 61 | QTextCodeccxx . . $ QTextCodec# * readCodeccxx . . $ SGFParser#readCodec.; |
| 62 | bool isRootcxx . . $ SGFParser#isRoot.; |
| 63 | Treecxx . . $ Tree# *treecxx . . $ SGFParser#tree.; |
| 64 | bool loadedfromfilecxx . . $ SGFParser#loadedfromfile.; |
| 65 | }; |
| 66 | |
| 67 | #endif |