| 1 | /* |
| 2 | Copyright (C) 2008, 2009 Andres Cabrera |
| 3 | [email protected] |
| 4 | |
| 5 | This file is part of CsoundQt. |
| 6 | |
| 7 | CsoundQt is free software; you can redistribute it |
| 8 | and/or modify it under the terms of the GNU Lesser General Public |
| 9 | License as published by the Free Software Foundation; either |
| 10 | version 2.1 of the License, or (at your option) any later version. |
| 11 | |
| 12 | CsoundQt is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU Lesser General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU Lesser General Public |
| 18 | License along with Csound; if not, write to the Free Software |
| 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
| 20 | 02111-1307 USA |
| 21 | */ |
| 22 | |
| 23 | #ifndef DOTGENERATOR_H |
| 24 | #define DOTGENERATOR_H |
| 25 | |
| 26 | #include <QtCore> |
| 27 | |
| 28 | class OpEntryParser; |
| 29 | class Node; |
| 30 | class Port; |
| 31 | |
| 32 | class DotGenerator |
| 33 | { |
| 34 | public: |
| 35 | DotGenerator(QString fileName, QString orcText, OpEntryParser *opcodeTree); |
| 36 | ~DotGenerator(); |
| 37 | |
| 38 | QString getDotText(); |
| 39 | Node createNode(QStringList parts); |
| 40 | |
| 41 | QString makeNodeText(const int i, |
| 42 | const int j, |
| 43 | const QString name, |
| 44 | QVector<Port> &inputs, |
| 45 | QVector<Port> &outputs); |
| 46 | |
| 47 | QString makeinputConnection(int i, int j, int n, Port input, QHash<QString, QString> &tokenSource); |
| 48 | |
| 49 | protected: |
| 50 | QString m_fileName, m_orcText; |
| 51 | OpEntryParser *m_opcodeTree; |
| 52 | |
| 53 | }; |
| 54 | |
| 55 | #endif |