#include <engine_v8.h>
Public Member Functions | |
Local< v8::Function > | __createFunction (const char *code) |
virtual ScriptingFunction | _createFunction (const char *code) |
Handle< Context > | context () const |
virtual bool | exec (const StringData &code, const string &name, bool printResult, bool reportError, bool assertOnError, int timeoutMs) |
virtual void | externalSetup () |
void | gc () |
v8::Handle< v8::Value > | get (const char *field) |
virtual bool | getBoolean (const char *field) |
virtual string | getError () |
virtual double | getNumber (const char *field) |
virtual int | getNumberInt (const char *field) |
virtual long long | getNumberLongLong (const char *field) |
virtual BSONObj | getObject (const char *field) |
virtual string | getString (const char *field) |
virtual void | init (const BSONObj *data) |
virtual void | injectNative (const char *field, NativeFunction func) |
virtual int | invoke (ScriptingFunction func, const BSONObj &args, int timeoutMs=0, bool ignoreReturn=false) |
virtual void | localConnect (const char *dbName) |
virtual void | rename (const char *from, const char *to) |
virtual void | reset () |
virtual void | setBoolean (const char *field, bool val) |
virtual void | setElement (const char *field, const BSONElement &e) |
virtual void | setNumber (const char *field, double val) |
virtual void | setObject (const char *field, const BSONObj &obj, bool readOnly) |
virtual void | setString (const char *field, const char *val) |
virtual void | setThis (const BSONObj *obj) |
virtual int | type (const char *field) |
V8Scope (V8ScriptEngine *engine) | |
~V8Scope () | |
Private Types | |
enum | ConnectState { NOT, LOCAL, EXTERNAL } |
Private Member Functions | |
void | _startCall () |
Static Private Member Functions | |
static Handle< Value > | loadCallback (const Arguments &args) |
static Handle< Value > | nativeCallback (const Arguments &args) |
Private Attributes | |
ConnectState | _connectState |
Persistent< Context > | _context |
V8ScriptEngine * | _engine |
string | _error |
vector< Persistent< Value > > | _funcs |
Persistent< v8::Object > | _global |
v8::Persistent< v8::Object > | _this |
v8::Persistent< v8::Function > | _wrapper |
Definition at line 31 of file engine_v8.h.
enum mongo::V8Scope::ConnectState [private] |
Definition at line 92 of file engine_v8.h.
mongo::V8Scope::V8Scope | ( | V8ScriptEngine * | engine | ) |
mongo::V8Scope::~V8Scope | ( | ) |
Local< v8::Function > mongo::V8Scope::__createFunction | ( | const char * | code | ) |
virtual ScriptingFunction mongo::V8Scope::_createFunction | ( | const char * | code | ) | [virtual] |
Implements mongo::Scope.
void mongo::V8Scope::_startCall | ( | ) | [private] |
Handle< Context > mongo::V8Scope::context | ( | ) | const [inline] |
Definition at line 72 of file engine_v8.h.
virtual bool mongo::V8Scope::exec | ( | const StringData & | code, | |
const string & | name, | |||
bool | printResult, | |||
bool | reportError, | |||
bool | assertOnError, | |||
int | timeoutMs | |||
) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::externalSetup | ( | ) | [virtual] |
Implements mongo::Scope.
void mongo::V8Scope::gc | ( | ) | [virtual] |
Implements mongo::Scope.
v8::Handle<v8::Value> mongo::V8Scope::get | ( | const char * | field | ) |
virtual bool mongo::V8Scope::getBoolean | ( | const char * | field | ) | [virtual] |
Implements mongo::Scope.
virtual string mongo::V8Scope::getError | ( | ) | [inline, virtual] |
Implements mongo::Scope.
Definition at line 66 of file engine_v8.h.
virtual double mongo::V8Scope::getNumber | ( | const char * | field | ) | [virtual] |
Implements mongo::Scope.
virtual int mongo::V8Scope::getNumberInt | ( | const char * | field | ) | [virtual] |
Reimplemented from mongo::Scope.
virtual long long mongo::V8Scope::getNumberLongLong | ( | const char * | field | ) | [virtual] |
Reimplemented from mongo::Scope.
virtual BSONObj mongo::V8Scope::getObject | ( | const char * | field | ) | [virtual] |
Implements mongo::Scope.
virtual string mongo::V8Scope::getString | ( | const char * | field | ) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::init | ( | const BSONObj * | data | ) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::injectNative | ( | const char * | field, | |
NativeFunction | func | |||
) | [virtual] |
Implements mongo::Scope.
virtual int mongo::V8Scope::invoke | ( | ScriptingFunction | func, | |
const BSONObj & | args, | |||
int | timeoutMs = 0 , |
|||
bool | ignoreReturn = false | |||
) | [virtual] |
Implements mongo::Scope.
static Handle< Value > mongo::V8Scope::loadCallback | ( | const Arguments & | args | ) | [static, private] |
virtual void mongo::V8Scope::localConnect | ( | const char * | dbName | ) | [virtual] |
Implements mongo::Scope.
static Handle< Value > mongo::V8Scope::nativeCallback | ( | const Arguments & | args | ) | [static, private] |
virtual void mongo::V8Scope::rename | ( | const char * | from, | |
const char * | to | |||
) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::reset | ( | ) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::setBoolean | ( | const char * | field, | |
bool | val | |||
) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::setElement | ( | const char * | field, | |
const BSONElement & | e | |||
) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::setNumber | ( | const char * | field, | |
double | val | |||
) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::setObject | ( | const char * | field, | |
const BSONObj & | obj, | |||
bool | readOnly | |||
) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::setString | ( | const char * | field, | |
const char * | val | |||
) | [virtual] |
Implements mongo::Scope.
virtual void mongo::V8Scope::setThis | ( | const BSONObj * | obj | ) | [virtual] |
Implements mongo::Scope.
virtual int mongo::V8Scope::type | ( | const char * | field | ) | [virtual] |
Implements mongo::Scope.
ConnectState mongo::V8Scope::_connectState [private] |
Definition at line 93 of file engine_v8.h.
Persistent<Context> mongo::V8Scope::_context [private] |
Definition at line 83 of file engine_v8.h.
V8ScriptEngine* mongo::V8Scope::_engine [private] |
Definition at line 81 of file engine_v8.h.
string mongo::V8Scope::_error [private] |
Definition at line 86 of file engine_v8.h.
vector< Persistent<Value> > mongo::V8Scope::_funcs [private] |
Definition at line 87 of file engine_v8.h.
Persistent<v8::Object> mongo::V8Scope::_global [private] |
Definition at line 84 of file engine_v8.h.
v8::Persistent<v8::Object> mongo::V8Scope::_this [private] |
Definition at line 88 of file engine_v8.h.
v8::Persistent<v8::Function> mongo::V8Scope::_wrapper [private] |
Definition at line 90 of file engine_v8.h.