lib
rubyinterpreter.h
00001 /*************************************************************************** 00002 * rubyinterpreter.h 00003 * This file is part of the KDE project 00004 * copyright (C)2005 by Cyrille Berger (cberger@cberger.net) 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 #ifndef KROSS_RUBYRUBYINTERPRETER_H 00020 #define KROSS_RUBYRUBYINTERPRETER_H 00021 00022 #include <ruby.h> 00023 00024 #include <api/interpreter.h> 00025 00026 namespace Kross { 00027 00028 namespace Ruby { 00029 00030 class RubyInterpreterPrivate; 00035 class RubyInterpreter : public Kross::Api::Interpreter 00036 { 00037 public: 00038 00045 RubyInterpreter(Kross::Api::InterpreterInfo* info); 00046 00050 ~RubyInterpreter(); 00051 00055 virtual Kross::Api::Script* createScript(Kross::Api::ScriptContainer* scriptcontainer); 00056 00057 private: 00059 void initRuby(); 00061 void finalizeRuby(); 00063 static VALUE require (VALUE, VALUE); 00064 private: 00066 static RubyInterpreterPrivate* d; 00067 }; 00068 00069 } 00070 00071 } 00072 00073 #endif