/* Copyright (C) 2008, 2009 Andres Cabrera mantaraya36@gmail.com This file is part of CsoundQt. CsoundQt is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. CsoundQt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Csound; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef OPENTRYPARSER_H #define OPENTRYPARSER_H #include #include #include #include "node.h" #include "types.h" // For Opcode class class OpEntryParser { public: OpEntryParser(QString opcodeFile); ~OpEntryParser(); void parseOpcodesXml(QString opcodeFile); void sortOpcodes(); void addExtraOpcodes(); QStringList opcodeNameList(bool includeDisabled=false); QString getSyntax(QString opcodeName); QVector getMatchingOpcodes(QString word, int maxsize = 0); QList< QPair > > getOpcodesByCategory(); int getCategoryCount(); QString getCategory(int index); QStringList getCategoryList(); QList getOpcodeList(int index); bool isOpcode(QString opcodeName); bool getOpcodeArgNames(Node &node); void setUdos(QHash*udosMap) { m_udosMap = udosMap; } Opcode findOpcode(QString opcodeName); bool isKnownOpcode(QString name); QList opcodeList; private: QString m_opcodeFile; QHash opcodeMap; QList< QPair > > opcodeCategoryList; QVector > opcodeListCategory; QStringList categoryList; QStringList excludedOpcodes; QStringList m_opcodeNameListCache; void addOpcode(Opcode opcode); void addFlag(QString flag, QString description); QHash*m_udosMap; }; #endif