Kross

qts-interpreter/interpreter.h
1 /***************************************************************************
2  * interpreter.h
3  * This file is part of the KDE project
4  * copyright (C)2007-2008 by Sebastian Sauer ([email protected])
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_QTS_INTERPRETER_H
21 #define KROSS_QTS_INTERPRETER_H
22 
23 #include <kross/core/krossconfig.h>
24 #include <kross/core/interpreter.h>
25 #include <kross/core/script.h>
26 #include <kross/core/action.h>
27 
28 namespace Kross
29 {
30 
31 class EcmaScript;
32 
33 /**
34 * The EcmaInterpreter class implements a \a Kross::Interpreter to provide
35 * a factory for \a EcmaScript instances. The interpreter is a singleton
36 * managed by Kross to share information between different script instances.
37 */
38 class EcmaInterpreter : public Kross::Interpreter
39 {
40  friend class EcmaScript;
41 public:
42 
43  /**
44  * Constructor.
45  *
46  * \param info The \a Kross::InterpreterInfo instance that
47  * describes this interpreter.
48  */
50 
51  /**
52  * Destructor.
53  */
54  ~EcmaInterpreter() override;
55 
56  /**
57  * Factory method to create a new \a EcmaScript instance.
58  *
59  * \param action The \a Kross::Action instance that decorates
60  * the script and contains details like the scripting code.
61  * \return a new \a EcmaScript instance.
62  */
63  Kross::Script *createScript(Kross::Action *action) override;
64 
65 private:
66  class Private;
67  Private *const d;
68 };
69 
70 }
71 
72 #endif
Base class for interpreter implementations.
~EcmaInterpreter() override
Destructor.
The Action class is an abstract container to deal with scripts like a single standalone script file.
Definition: action.h:112
EcmaInterpreter(Kross::InterpreterInfo *info)
Constructor.
The InterpreterInfo class provides abstract information about a Interpreter before the interpreter-ba...
Kross::Script * createScript(Kross::Action *action) override
Factory method to create a new EcmaScript instance.
Base class for interpreter dependent functionality each script provides.
Definition: core/script.h:61
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:00:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.