Sirikata
liboh/plugins/js/JSObjects/JSFunctionInvokable.hpp
Go to the documentation of this file.
00001 #ifndef __JS_FUNCTION_INVOKABLE_HPP__
00002 #define __JS_FUNCTION_INVOKABLE_HPP__
00003 
00004 #include <sirikata/oh/Platform.hpp>
00005 
00006 #include <vector>
00007 #include <v8.h>
00008 #include <sirikata/proxyobject/Invokable.hpp>
00009 
00010 
00011 namespace Sirikata
00012 {
00013 
00014 namespace JS
00015 {
00016 class EmersonScript;
00017   class JSFunctionInvokable : public Invokable
00018   {
00019     public:
00020     JSFunctionInvokable(v8::Persistent<v8::Function> _function, EmersonScript* _script)
00021     : function_(_function), script_(_script){}
00022 
00023     boost::any invoke(std::vector<boost::any>& params);
00024     private:
00025     v8::Persistent<v8::Function> function_;
00026       EmersonScript* script_;
00027   };
00028 
00029 }
00030 
00031 
00032 }
00033 
00034 #endif