#include <engine.h>

Classes | |
| class | NoDBAccess |
Public Member Functions | |
| void | append (BSONObjBuilder &builder, const char *fieldName, const char *scopeName) |
| virtual ScriptingFunction | createFunction (const char *code) |
| NoDBAccess | disableDBAccess (const char *why) |
| virtual bool | exec (const StringData &code, const string &name, bool printResult, bool reportError, bool assertOnError, int timeoutMs=0)=0 |
| void | execCoreFiles () |
| virtual bool | execFile (const string &filename, bool printResult, bool reportError, bool assertOnError, int timeoutMs=0) |
| void | execSetup (const JSFile &file) |
| virtual void | execSetup (const StringData &code, const string &name="setup") |
| virtual void | externalSetup ()=0 |
| virtual void | gc ()=0 |
| virtual bool | getBoolean (const char *field)=0 |
| virtual string | getError ()=0 |
| virtual double | getNumber (const char *field)=0 |
| virtual int | getNumberInt (const char *field) |
| virtual long long | getNumberLongLong (const char *field) |
| virtual BSONObj | getObject (const char *field)=0 |
| virtual string | getString (const char *field)=0 |
| void | init (const char *data) |
| virtual void | init (const BSONObj *data)=0 |
| virtual void | injectNative (const char *field, NativeFunction func)=0 |
| int | invoke (const char *code, const BSONObj &args, int timeoutMs=0) |
| virtual int | invoke (ScriptingFunction func, const BSONObj &args, int timeoutMs=0, bool ignoreReturn=false)=0 |
| void | invokeSafe (const char *code, const BSONObj &args, int timeoutMs=0) |
| void | invokeSafe (ScriptingFunction func, const BSONObj &args, int timeoutMs=0) |
| void | loadStored (bool ignoreNotConnected=false) |
| virtual void | localConnect (const char *dbName)=0 |
| virtual void | rename (const char *from, const char *to)=0 |
| virtual void | reset ()=0 |
| Scope () | |
| virtual void | setBoolean (const char *field, bool val)=0 |
| virtual void | setElement (const char *field, const BSONElement &e)=0 |
| virtual void | setNumber (const char *field, double val)=0 |
| virtual void | setObject (const char *field, const BSONObj &obj, bool readOnly=true)=0 |
| virtual void | setString (const char *field, const char *val)=0 |
| virtual void | setThis (const BSONObj *obj)=0 |
| virtual int | type (const char *field)=0 |
| virtual | ~Scope () |
Static Public Member Functions | |
| static int | getNumScopes () |
| static void | storedFuncMod () |
| static void | validateObjectIdString (const string &str) |
Protected Member Functions | |
| virtual ScriptingFunction | _createFunction (const char *code)=0 |
Protected Attributes | |
| map< string, ScriptingFunction > | _cachedFunctions |
| long long | _loadedVersion |
| string | _localDBName |
| set< string > | _storedNames |
Static Protected Attributes | |
| static long long | _lastVersion |
| static int | _numScopes |
Definition at line 43 of file engine.h.
| mongo::Scope::Scope | ( | ) |
| virtual mongo::Scope::~Scope | ( | ) | [virtual] |
| virtual ScriptingFunction mongo::Scope::_createFunction | ( | const char * | code | ) | [protected, pure virtual] |
Implemented in mongo::V8Scope.
| void mongo::Scope::append | ( | BSONObjBuilder & | builder, | |
| const char * | fieldName, | |||
| const char * | scopeName | |||
| ) |
| virtual ScriptingFunction mongo::Scope::createFunction | ( | const char * | code | ) | [virtual] |
Reimplemented in mongo::JavaScope.
| NoDBAccess mongo::Scope::disableDBAccess | ( | const char * | why | ) | [inline] |
| virtual bool mongo::Scope::exec | ( | const StringData & | code, | |
| const string & | name, | |||
| bool | printResult, | |||
| bool | reportError, | |||
| bool | assertOnError, | |||
| int | timeoutMs = 0 | |||
| ) | [pure virtual] |
Implemented in mongo::V8Scope.
| virtual bool mongo::Scope::execFile | ( | const string & | filename, | |
| bool | printResult, | |||
| bool | reportError, | |||
| bool | assertOnError, | |||
| int | timeoutMs = 0 | |||
| ) | [virtual] |
| void mongo::Scope::execSetup | ( | const JSFile & | file | ) | [inline] |
| virtual void mongo::Scope::execSetup | ( | const StringData & | code, | |
| const string & | name = "setup" | |||
| ) | [inline, virtual] |
| virtual void mongo::Scope::externalSetup | ( | ) | [pure virtual] |
Implemented in mongo::V8Scope.
| virtual void mongo::Scope::gc | ( | ) | [pure virtual] |
Implemented in mongo::V8Scope.
| virtual bool mongo::Scope::getBoolean | ( | const char * | field | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual string mongo::Scope::getError | ( | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual double mongo::Scope::getNumber | ( | const char * | field | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual int mongo::Scope::getNumberInt | ( | const char * | field | ) | [inline, virtual] |
Reimplemented in mongo::V8Scope.
| virtual long long mongo::Scope::getNumberLongLong | ( | const char * | field | ) | [inline, virtual] |
Reimplemented in mongo::V8Scope.
| virtual BSONObj mongo::Scope::getObject | ( | const char * | field | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual string mongo::Scope::getString | ( | const char * | field | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual void mongo::Scope::init | ( | const BSONObj * | data | ) | [pure virtual] |
Implemented in mongo::V8Scope.
| virtual void mongo::Scope::injectNative | ( | const char * | field, | |
| NativeFunction | func | |||
| ) | [pure virtual] |
Implemented in mongo::V8Scope.
| int mongo::Scope::invoke | ( | const char * | code, | |
| const BSONObj & | args, | |||
| int | timeoutMs = 0 | |||
| ) |
| virtual int mongo::Scope::invoke | ( | ScriptingFunction | func, | |
| const BSONObj & | args, | |||
| int | timeoutMs = 0, |
|||
| bool | ignoreReturn = false | |||
| ) | [pure virtual] |
Implemented in mongo::V8Scope.
| void mongo::Scope::invokeSafe | ( | const char * | code, | |
| const BSONObj & | args, | |||
| int | timeoutMs = 0 | |||
| ) | [inline] |
| void mongo::Scope::invokeSafe | ( | ScriptingFunction | func, | |
| const BSONObj & | args, | |||
| int | timeoutMs = 0 | |||
| ) | [inline] |
| void mongo::Scope::loadStored | ( | bool | ignoreNotConnected = false |
) |
| virtual void mongo::Scope::localConnect | ( | const char * | dbName | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual void mongo::Scope::rename | ( | const char * | from, | |
| const char * | to | |||
| ) | [pure virtual] |
Implemented in mongo::V8Scope.
| virtual void mongo::Scope::reset | ( | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual void mongo::Scope::setBoolean | ( | const char * | field, | |
| bool | val | |||
| ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual void mongo::Scope::setElement | ( | const char * | field, | |
| const BSONElement & | e | |||
| ) | [pure virtual] |
Implemented in mongo::V8Scope.
| virtual void mongo::Scope::setNumber | ( | const char * | field, | |
| double | val | |||
| ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual void mongo::Scope::setObject | ( | const char * | field, | |
| const BSONObj & | obj, | |||
| bool | readOnly = true | |||
| ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual void mongo::Scope::setString | ( | const char * | field, | |
| const char * | val | |||
| ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| virtual void mongo::Scope::setThis | ( | const BSONObj * | obj | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| static void mongo::Scope::storedFuncMod | ( | ) | [static] |
if any changes are made to .system.js, call this right now its just global - slightly inefficient, but a lot simpler
| virtual int mongo::Scope::type | ( | const char * | field | ) | [pure virtual] |
Implemented in mongo::JavaScope, and mongo::V8Scope.
| static void mongo::Scope::validateObjectIdString | ( | const string & | str | ) | [static] |
map<string,ScriptingFunction> mongo::Scope::_cachedFunctions [protected] |
long long mongo::Scope::_lastVersion [static, protected] |
long long mongo::Scope::_loadedVersion [protected] |
string mongo::Scope::_localDBName [protected] |
int mongo::Scope::_numScopes [static, protected] |
set<string> mongo::Scope::_storedNames [protected] |