umbrello API Documentation

nativeimportbase.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *  copyright (C) 2005-2007                                                *
00009  *  Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                   *
00010  ***************************************************************************/
00011 
00012 #ifndef NATIVEIMPORTBASE_H
00013 #define NATIVEIMPORTBASE_H
00014 
00015 #include <qstring.h>
00016 #include <qstringlist.h>
00017 #include "classimport.h"
00018 #include "../umlnamespace.h"
00019 
00020 class UMLPackage;
00021 class UMLClassifier;
00022 
00044 class NativeImportBase : public ClassImport {
00045 public:
00050     NativeImportBase(const QString &singleLineCommentIntro);
00051     virtual ~NativeImportBase();
00052 
00053 protected:
00057     void initialize();
00058 
00067     void setMultiLineComment(const QString &intro, const QString &end);
00072     void setMultiLineAltComment(const QString &intro, const QString &end);
00073 
00081     virtual void parseFile(const QString& filename);
00082 
00089     virtual void initVars();
00090 
00098     void scan(QString line);
00099 
00111     virtual bool preprocess(QString& line);
00112 
00118     virtual QStringList split(const QString& line);
00119 
00125     virtual void fillSource(const QString& word) = 0;
00126 
00135     virtual bool parseStmt() = 0;
00136 
00141     void skipStmt(QString until = ";");
00142 
00151     bool skipToClosing(QChar opener);
00152 
00158     QString advance();
00159 
00163     QString m_singleLineCommentIntro;
00164 
00168     QStringList m_source;
00172     uint m_srcIndex;
00173 
00177     UMLPackage *m_scope[32];
00181     uint m_scopeIndex;
00182 
00186     UMLClassifier *m_klass;
00190     Uml::Visibility m_currentAccess;
00194     QString m_comment;
00199     bool m_inComment;
00203     bool m_isAbstract;
00204 
00211     QStringList m_parsedFiles;
00212 
00216     QString m_multiLineCommentIntro;
00217     QString m_multiLineCommentEnd;
00222     QString m_multiLineAltCommentIntro;
00223     QString m_multiLineAltCommentEnd;
00224 };
00225 
00226 #endif
00227 
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:58 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003