From Jeremy Moles, import of the osgWidget NodeKit, sourced from the original http://osgwidget.googlecode.com/svn/trunk
Notes from Robert Osfield, I've merged osgWidget trunk, and added/changed CMakeLists.txt file to make it suitable for inclusion in the core OSG, and moved imagery/scripts/shaders out into OpenSceneGraph-Data
This commit is contained in:
29
include/osgWidget/ScriptEngine
Normal file
29
include/osgWidget/ScriptEngine
Normal file
@@ -0,0 +1,29 @@
|
||||
// -*-c++-*- osgWidget - Code by: Jeremy Moles (cubicool) 2007-2008
|
||||
// $Id: ScriptEngine 2 2008-01-24 16:11:26Z cubicool $
|
||||
|
||||
#ifndef OSGWIDGET_SCRIPT_ENGINE
|
||||
#define OSGWIDGET_SCRIPT_ENGINE
|
||||
|
||||
#include <osg/Referenced>
|
||||
|
||||
namespace osgWidget {
|
||||
|
||||
// An interface for our scripting API so that we can have a unified way to talk to both
|
||||
// Lua and Python; perhaps even more! Furthermore, this will allow us to put the
|
||||
// entire implementation into a source file...
|
||||
class ScriptEngine: public osg::Referenced {
|
||||
protected:
|
||||
std::string _err;
|
||||
|
||||
public:
|
||||
virtual bool initialize () { return false; }
|
||||
virtual bool close () { return false; }
|
||||
virtual bool eval (const std::string&) { return false; }
|
||||
virtual bool runFile (const std::string&) { return false; }
|
||||
|
||||
virtual const std::string& getLastErrorText() const { return _err; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user