/* -*-c++-*- osgPython - Copyright (C) 2006 Miguel Escriva Gregori * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ #ifndef OSGPYTHON_SCRIPT #define OSGPYTHON_SCRIPT 1 #include #include #include #include namespace osgPython { class OSGPYTHON_EXPORT PythonScript : public osg::Referenced { public: /// Default constructor. PythonScript(); void runFile(const std::string &filename); void runString(const std::string &code); // Sets the value of global variable (name) in the script //void set(const osgIntrospection::Value &val, const std::string &name); // Returns the value of a given global variable, returns empty // value if the variable do not exists. //osgIntrospection::Value get(const std::string &name); protected: virtual ~PythonScript(); }; } // end of osgPython namespace #endif