Files
mongo/scripting/v8_wrapper.h

24 lines
615 B
C
Raw Normal View History

2009-10-10 01:30:00 -04:00
// v8_wrapper.h
#pragma once
#include <v8.h>
#include <cstring>
#include <cstdio>
#include <cstdlib>
2009-10-13 10:12:44 -04:00
#include "../db/jsobj.h"
2009-10-10 01:30:00 -04:00
namespace mongo {
2009-10-13 10:12:44 -04:00
2009-10-10 01:30:00 -04:00
v8::Local<v8::Object> mongoToV8( const mongo::BSONObj & m , bool array = 0 );
mongo::BSONObj v8ToMongo( v8::Handle<v8::Object> o );
2009-10-13 10:12:44 -04:00
void v8ToMongoElement( BSONObjBuilder & b , v8::Handle<v8::String> name ,
const string sname , v8::Handle<v8::Value> value );
2009-10-10 01:30:00 -04:00
v8::Handle<v8::Value> mongoToV8Element( const BSONElement &f );
v8::Function * getNamedCons( const char * name );
v8::Function * getObjectIdCons();
}