mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
28 lines
699 B
C++
28 lines
699 B
C++
// utils.h
|
|
|
|
#pragma once
|
|
|
|
#include "../scripting/engine.h"
|
|
|
|
namespace mongo {
|
|
|
|
namespace shellUtils {
|
|
|
|
extern std::string _dbConnect;
|
|
extern std::string _dbAuth;
|
|
|
|
void RecordMyLocation( const char *_argv0 );
|
|
void installShellUtils( Scope& scope );
|
|
|
|
// Scoped management of mongo program instances. Simple implementation:
|
|
// destructor kills all mongod instances created by the shell.
|
|
struct MongoProgramScope {
|
|
MongoProgramScope() {} // Avoid 'unused variable' warning.
|
|
~MongoProgramScope();
|
|
};
|
|
void KillMongoProgramInstances();
|
|
|
|
void initScope( Scope &scope );
|
|
}
|
|
}
|