31 #ifndef PTLIB_V8SCRIPT_H
32 #define PTLIB_V8SCRIPT_H
39 #include <ptbuildopts.h>
47 #pragma warning(disable:4100 4127)
53 #pragma warning(default:4100 4127)
80 virtual
bool LoadFile(
86 virtual
bool LoadText(
97 const
char * script = NULL
104 virtual
bool CreateComposite(
186 virtual
bool ReleaseVariable(
218 const
char * sigString = NULL,
223 Signature & signature
232 const FunctionNotifier & func
237 template <class v8Type, class cppType>
238 bool SetValue(const
PString & name, const cppType & value)
241 v8::HandleScope handleScope;
242 v8::Context::Scope contextScope(m_context);
243 return m_context->Global()->Set(v8::String::New(name), v8Type::New(value));
246 v8::Persistent<v8::Context> m_context;
253 #endif // PTLIB_V8SCRIPT_H