mongo::Scope Class Reference

#include <engine.h>

Inheritance diagram for mongo::Scope:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Definition at line 43 of file engine.h.


Constructor & Destructor Documentation

mongo::Scope::Scope (  ) 
virtual mongo::Scope::~Scope (  )  [virtual]

Member Function Documentation

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]

Definition at line 68 of file engine.h.

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.

void mongo::Scope::execCoreFiles (  )  [inline]

Definition at line 122 of file engine.h.

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]

Definition at line 118 of file engine.h.

virtual void mongo::Scope::execSetup ( const StringData code,
const string &  name = "setup" 
) [inline, virtual]

Definition at line 114 of file engine.h.

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.

Definition at line 74 of file engine.h.

virtual long long mongo::Scope::getNumberLongLong ( const char *  field  )  [inline, virtual]

Reimplemented in mongo::V8Scope.

Definition at line 75 of file engine.h.

static int mongo::Scope::getNumScopes (  )  [inline, static]

Definition at line 146 of file engine.h.

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.

void mongo::Scope::init ( const char *  data  )  [inline]

Definition at line 50 of file engine.h.

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]
Returns:
0 on success

Implemented in mongo::V8Scope.

void mongo::Scope::invokeSafe ( const char *  code,
const BSONObj args,
int  timeoutMs = 0 
) [inline]

Definition at line 107 of file engine.h.

void mongo::Scope::invokeSafe ( ScriptingFunction  func,
const BSONObj args,
int  timeoutMs = 0 
) [inline]

Definition at line 98 of file engine.h.

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]

Member Data Documentation

Definition at line 160 of file engine.h.

long long mongo::Scope::_lastVersion [static, protected]

Definition at line 159 of file engine.h.

long long mongo::Scope::_loadedVersion [protected]

Definition at line 157 of file engine.h.

string mongo::Scope::_localDBName [protected]

Definition at line 156 of file engine.h.

int mongo::Scope::_numScopes [static, protected]

Definition at line 162 of file engine.h.

set<string> mongo::Scope::_storedNames [protected]

Definition at line 158 of file engine.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:57 2013