2009-04-23 14:28:22 -04:00
|
|
|
// engine.cpp
|
|
|
|
|
|
2009-04-23 14:31:40 -04:00
|
|
|
#include "stdafx.h"
|
2009-04-23 14:28:22 -04:00
|
|
|
#include "engine.h"
|
|
|
|
|
|
|
|
|
|
namespace mongo {
|
|
|
|
|
|
|
|
|
|
Scope::Scope(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Scope::~Scope(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ScriptEngine::ScriptEngine(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ScriptEngine::~ScriptEngine(){
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-24 16:41:40 -04:00
|
|
|
int Scope::invoke( const char* code , const BSONObj& args ){
|
|
|
|
|
ScriptingFunction func = createFunction( code );
|
|
|
|
|
uassert( "compile failed" , func );
|
|
|
|
|
return invoke( func , args );
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-23 14:28:22 -04:00
|
|
|
ScriptEngine * globalScriptEngine;
|
|
|
|
|
}
|