lib

manager.h

00001 /***************************************************************************
00002  * manager.h
00003  * This file is part of the KDE project
00004  * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this program; see the file COPYING.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  ***************************************************************************/
00019 
00020 #ifndef KROSS_API_MANAGER_H
00021 #define KROSS_API_MANAGER_H
00022 
00023 #include <qstring.h>
00024 #include <qstringlist.h>
00025 #include <qmap.h>
00026 //#include <qvariant.h>
00027 //#include <kdebug.h>
00028 #include <ksharedptr.h>
00029 
00030 class QObject;
00031 
00032 #include "../api/object.h"
00033 #include "mainmodule.h"
00034 
00035 namespace Kross { namespace Api {
00036 
00037     // Forward declarations.
00038     class Interpreter;
00039     class Object;
00040     class EventSlot;
00041     class EventSignal;
00042     class ScriptContainer;
00043     class ManagerPrivate;
00044     class InterpreterInfo;
00045 
00055     class KDE_EXPORT Manager : public MainModule
00056     {
00057         protected:
00058 
00063             Manager();
00064 
00065         public:
00066 
00070             ~Manager();
00071 
00076             static Manager* scriptManager();
00077 
00082             QMap<QString, InterpreterInfo*> getInterpreterInfos();
00083 
00088             bool hasInterpreterInfo(const QString& interpretername) const;
00089 
00095             InterpreterInfo* getInterpreterInfo(const QString& interpretername);
00096 
00107             const QString getInterpreternameForFile(const QString& file);
00108 
00120             KSharedPtr<ScriptContainer> getScriptContainer(const QString& scriptname);
00121 
00132             Interpreter* getInterpreter(const QString& interpretername);
00133 
00138             const QStringList getInterpreters();
00139 
00148             bool addModule(Module::Ptr module);
00149 
00159             Module::Ptr loadModule(const QString& modulename);
00160 
00161         private:
00163             ManagerPrivate* d;
00164     };
00165 
00166 }}
00167 
00168 #endif
00169 
KDE Home | KDE Accessibility Home | Description of Access Keys