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 <ksharedptr.h>
00028 
00029 class QObject;
00030 
00031 #include "../api/object.h"
00032 #include "mainmodule.h"
00033 
00034 namespace Kross { namespace Api {
00035 
00036     // Forward declarations.
00037     class Interpreter;
00038     class Object;
00039     class EventSlot;
00040     class EventSignal;
00041     class ScriptContainer;
00042     class ManagerPrivate;
00043     class InterpreterInfo;
00044 
00054     class KDE_EXPORT Manager : public MainModule
00055     {
00056         protected:
00057 
00062             Manager();
00063 
00064         public:
00065 
00069             ~Manager();
00070 
00075             static Manager* scriptManager();
00076 
00081             QMap<QString, InterpreterInfo*> getInterpreterInfos();
00082 
00087             bool hasInterpreterInfo(const QString& interpretername) const;
00088 
00094             InterpreterInfo* getInterpreterInfo(const QString& interpretername);
00095 
00106             const QString getInterpreternameForFile(const QString& file);
00107 
00119             KSharedPtr<ScriptContainer> getScriptContainer(const QString& scriptname);
00120 
00131             Interpreter* getInterpreter(const QString& interpretername);
00132 
00137             const QStringList getInterpreters();
00138 
00147             bool addModule(Module::Ptr module);
00148 
00158             Module::Ptr loadModule(const QString& modulename);
00159 
00160         private:
00162             ManagerPrivate* d;
00163     };
00164 
00165 }}
00166 
00167 #endif
00168 
KDE Home | KDE Accessibility Home | Description of Access Keys