File indexing completed on 2024-04-14 14:27:10

0001 /***************************************************************************
0002  * script.cpp
0003  * This file is part of the KDE project
0004  * copyright (C)2004-2006 by Sebastian Sauer (mail@dipe.org)
0005  *
0006  * This program is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Library General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2 of the License, or (at your option) any later version.
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * Library General Public License for more details.
0014  * You should have received a copy of the GNU Library General Public License
0015  * along with this program; see the file COPYING.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018  ***************************************************************************/
0019 
0020 #include "script.h"
0021 #include "interpreter.h"
0022 #include "action.h"
0023 #include "krossconfig.h"
0024 
0025 using namespace Kross;
0026 
0027 namespace Kross
0028 {
0029 
0030 /// \internal d-pointer class.
0031 class Script::Private
0032 {
0033 public:
0034     /// The \a Interpreter used to create this Script instance.
0035     Interpreter *interpreter;
0036     /// The \a Action associated with this Script.
0037     Action *action;
0038 };
0039 
0040 }
0041 
0042 Script::Script(Interpreter *interpreter, Action *action)
0043     : QObject()
0044     , ErrorInterface()
0045     , d(new Private())
0046 {
0047     //setObjectName( action->objectName() );
0048     d->interpreter = interpreter;
0049     d->action = action;
0050 }
0051 
0052 Script::~Script()
0053 {
0054     delete d;
0055 }
0056 
0057 Interpreter *Script::interpreter() const
0058 {
0059     return d->interpreter;
0060 }
0061 
0062 Action *Script::action() const
0063 {
0064     return d->action;
0065 }
0066 
0067 #include "moc_script.cpp"