summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/engine.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2014-05-19 12:46:52 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2014-05-19 14:43:05 -0400
commitf2bfd36a6f3eb7e7e2587268be3cc12636703d42 (patch)
tree6436772fbceb28f07bbfaee528d700159beb0cec /src/mongo/scripting/engine.h
parentc10e8282a7af38f8512e911a14889e14df8a2c6a (diff)
downloadmongo-f2bfd36a6f3eb7e7e2587268be3cc12636703d42.tar.gz
SERVER-13256: Remove pch - qualify std in headers
Diffstat (limited to 'src/mongo/scripting/engine.h')
-rw-r--r--src/mongo/scripting/engine.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mongo/scripting/engine.h b/src/mongo/scripting/engine.h
index 8fd409ae9ed..05061e82a19 100644
--- a/src/mongo/scripting/engine.h
+++ b/src/mongo/scripting/engine.h
@@ -34,7 +34,7 @@
namespace mongo {
typedef unsigned long long ScriptingFunction;
typedef BSONObj (*NativeFunction)(const BSONObj& args, void* data);
- typedef map<string, ScriptingFunction> FunctionCacheMap;
+ typedef std::map<std::string, ScriptingFunction> FunctionCacheMap;
class DBClientWithCommands;
class DBClientBase;
@@ -58,9 +58,9 @@ namespace mongo {
virtual void localConnect(const char* dbName) = 0;
virtual void externalSetup() = 0;
- virtual void setLocalDB(const string& localDBName) { _localDBName = localDBName; }
+ virtual void setLocalDB(const std::string& localDBName) { _localDBName = localDBName; }
virtual BSONObj getObject(const char* field) = 0;
- virtual string getString(const char* field) = 0;
+ virtual std::string getString(const char* field) = 0;
virtual bool getBoolean(const char* field) = 0;
virtual double getNumber(const char* field) = 0;
virtual int getNumberInt(const char* field) { return (int)getNumber(field); }
@@ -81,7 +81,7 @@ namespace mongo {
virtual void rename(const char* from, const char* to) = 0;
- virtual string getError() = 0;
+ virtual std::string getError() = 0;
virtual bool hasOutOfMemoryException() = 0;
@@ -109,22 +109,22 @@ namespace mongo {
readOnlyArgs, readOnlyRecv);
if (res == 0)
return;
- uasserted(9004, string("invoke failed: ") + getError());
+ uasserted(9004, std::string("invoke failed: ") + getError());
}
void invokeSafe(const char* code, const BSONObj* args, const BSONObj* recv,
int timeoutMs = 0) {
if (invoke(code, args, recv, timeoutMs) == 0)
return;
- uasserted(9005, string("invoke failed: ") + getError());
+ uasserted(9005, std::string("invoke failed: ") + getError());
}
virtual void injectNative(const char* field, NativeFunction func, void* data = 0) = 0;
- virtual bool exec(const StringData& code, const string& name, bool printResult,
+ virtual bool exec(const StringData& code, const std::string& name, bool printResult,
bool reportError, bool assertOnError, int timeoutMs = 0) = 0;
- virtual void execSetup(const StringData& code, const string& name = "setup") {
+ virtual void execSetup(const StringData& code, const std::string& name = "setup") {
exec(code, name, false, true, true, 0);
}
@@ -132,7 +132,7 @@ namespace mongo {
execSetup(file.source, file.name);
}
- virtual bool execFile(const string& filename, bool printResult, bool reportError,
+ virtual bool execFile(const std::string& filename, bool printResult, bool reportError,
int timeoutMs = 0);
void execCoreFiles();
@@ -145,7 +145,7 @@ namespace mongo {
*/
static void storedFuncMod();
- static void validateObjectIdString(const string& str);
+ static void validateObjectIdString(const std::string& str);
/** increments the number of times a scope was used */
void incTimesUsed() { ++_numTimesUsed; }
@@ -176,9 +176,9 @@ namespace mongo {
virtual ScriptingFunction _createFunction(const char* code,
ScriptingFunction functionNumber = 0) = 0;
- string _localDBName;
+ std::string _localDBName;
long long _loadedVersion;
- set<string> _storedNames;
+ std::set<std::string> _storedNames;
static long long _lastVersion;
FunctionCacheMap _cachedFunctions;
int _numTimesUsed;
@@ -206,7 +206,7 @@ namespace mongo {
* This must include authenticated users.
* @return the scope
*/
- auto_ptr<Scope> getPooledScope(const string& db, const string& scopeType);
+ std::auto_ptr<Scope> getPooledScope(const std::string& db, const std::string& scopeType);
void setScopeInitCallback(void (*func)(Scope&)) { _scopeInitCallback = func; }
static void setConnectCallback(void (*func)(DBClientWithCommands&)) {
@@ -254,7 +254,7 @@ namespace mongo {
};
void installGlobalUtils(Scope& scope);
- bool hasJSReturn(const string& s);
+ bool hasJSReturn(const std::string& s);
const char* jsSkipWhiteSpace(const char* raw);
extern ScriptEngine* globalScriptEngine;