Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

katesyntaxdocument.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           katesyntaxdocument.h  -  description
00003                              -------------------
00004     begin                : Sat 31 March 2001
00005     copyright            : (C) 2001,2002 by Joseph Wenninger
00006     email                : jowenn@kde.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef SYNTAXDOCUMENT_H
00019 #define SYNTAXDOCUMENT_H
00020 
00021 #include <opie2/xmltree.h>
00022 #include <qlist.h>
00023 #include <qstringlist.h>
00024 
00025 
00026 class syntaxModeListItem
00027 {
00028   public:
00029     QString name;
00030     QString section;
00031     QString mimetype;
00032     QString extension;
00033     QString identifier;
00034 };
00035 
00036 class syntaxContextData
00037 {
00038   public:
00039     Opie::Core::XMLElement *parent;
00040     Opie::Core::XMLElement *currentGroup;
00041     Opie::Core::XMLElement *item;
00042 };
00043 
00044 typedef QList<syntaxModeListItem> SyntaxModeList;
00045 
00046 class SyntaxDocument
00047 {
00048   public:
00049     SyntaxDocument();
00050     ~SyntaxDocument();
00051 
00052     QStringList& finddata(const QString& mainGroup,const QString& type,bool clearList=true);
00053     SyntaxModeList modeList();
00054 
00055     syntaxContextData* getGroupInfo(const QString& langName, const QString &group);
00056     void freeGroupInfo(syntaxContextData* data);
00057     syntaxContextData* getConfig(const QString& mainGroupName, const QString &Config);
00058     bool nextItem(syntaxContextData* data);
00059     bool nextGroup(syntaxContextData* data);
00060     syntaxContextData* getSubItems(syntaxContextData* data);
00061     QString groupItemData(syntaxContextData* data,QString name);
00062     QString groupData(syntaxContextData* data,QString name);
00063     void setIdentifier(const QString& identifier);
00064 
00065   private:
00066      Opie::Core::XMLElement *m_root;
00067      void setupModeList(bool force=false);
00068      QString currentFile;
00069     SyntaxModeList myModeList;
00070     QStringList m_data;
00071 };
00072 
00073 #endif

Generated on Sat Nov 5 16:17:10 2005 for OPIE by  doxygen 1.4.2