lib

manager.h
1/***************************************************************************
2 * manager.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_API_MANAGER_H
21#define KROSS_API_MANAGER_H
22
23#include <tqstring.h>
24#include <tqstringlist.h>
25#include <tqmap.h>
26//#include <tqvariant.h>
27#include <ksharedptr.h>
28
29class TQObject;
30
31#include "../api/object.h"
32#include "mainmodule.h"
33
34namespace Kross { namespace Api {
35
36 // Forward declarations.
37 class Interpreter;
38 class Object;
39 class EventSlot;
40 class EventSignal;
41 class ScriptContainer;
42 class ManagerPrivate;
43 class InterpreterInfo;
44
54 class TDE_EXPORT Manager : public MainModule
55 {
56 protected:
57
62 Manager();
63
64 public:
65
69 ~Manager();
70
75 static Manager* scriptManager();
76
81 TQMap<TQString, InterpreterInfo*> getInterpreterInfos();
82
87 bool hasInterpreterInfo(const TQString& interpretername) const;
88
94 InterpreterInfo* getInterpreterInfo(const TQString& interpretername);
95
106 const TQString getInterpreternameForFile(const TQString& file);
107
119 TDESharedPtr<ScriptContainer> getScriptContainer(const TQString& scriptname);
120
131 Interpreter* getInterpreter(const TQString& interpretername);
132
137 const TQStringList getInterpreters();
138
147 bool addModule(Module::Ptr module);
148
158 Module::Ptr loadModule(const TQString& modulename);
159
160 private:
162 ManagerPrivate* d;
163 };
164
165}}
166
167#endif
168
Each TQt signal and slot connection between a TQObject instance and a functionname is represented wit...
Definition eventsignal.h:38
Each TQt signal and slot connection between a TQObject instance and a functionname is represented wit...
Definition eventslot.h:39
While the Interpreter is the implemented interpreter this class is used to provide some abstract info...
Definition interpreter.h:42
Base class for interpreters.
MainModule(const TQString &name)
Constructor.
Module::Ptr loadModule(const TQString &modulename)
Load an external module and return it.
Definition manager.cpp:200
const TQString getInterpreternameForFile(const TQString &file)
Definition manager.cpp:142
Manager()
Constructor.
Definition manager.cpp:78
const TQStringList getInterpreters()
Definition manager.cpp:179
bool hasInterpreterInfo(const TQString &interpretername) const
Definition manager.cpp:132
InterpreterInfo * getInterpreterInfo(const TQString &interpretername)
Definition manager.cpp:137
TQMap< TQString, InterpreterInfo * > getInterpreterInfos()
Definition manager.cpp:127
static Manager * scriptManager()
Return the Manager instance.
Definition manager.cpp:67
TDESharedPtr< ScriptContainer > getScriptContainer(const TQString &scriptname)
Return the existing ScriptContainer with scriptname or create a new ScriptContainer instance and asso...
Definition manager.cpp:154
Interpreter * getInterpreter(const TQString &interpretername)
Return the Interpreter instance defined by the interpretername.
Definition manager.cpp:167
bool addModule(Module::Ptr module)
Add the an external module to the global shared list of loaded modules.
Definition manager.cpp:192
TDESharedPtr< Module > Ptr
Shared pointer to implement reference-counting.
Definition module.h:43
The common Object class all other object-classes are inheritated from.
Definition object.h:50
The ScriptContainer class is something like a single standalone scriptfile.
The common Kross API used as common codebase.
Definition callable.h:33
The Kross scripting bridge to embed scripting functionality into an application.
Definition callable.h:33