diff options
author | Tad Marshall <tad@10gen.com> | 2012-05-20 10:38:53 -0400 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-05-20 16:30:21 -0400 |
commit | 0a5953d46bb50c12095054ab434a56fd9e7f1172 (patch) | |
tree | 8360491a294972c5dbf9f9b1f6170dcba0fda0a9 /src/mongo/shell/shell_utils_launcher.h | |
parent | fa79e6978f17d9db78d71bbcfffb1032a83f7c09 (diff) | |
download | mongo-0a5953d46bb50c12095054ab434a56fd9e7f1172.tar.gz |
Some cleanup of headers and whitespace
Try to impose current kernel style guide rules for include files on a
subset of files: include what you use, start include paths from "mongo/",
group and sort includes alphabetically. Changed tabs to spaces in a few
places, fixed alignment where tabs had throw it off.
Diffstat (limited to 'src/mongo/shell/shell_utils_launcher.h')
-rw-r--r-- | src/mongo/shell/shell_utils_launcher.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/mongo/shell/shell_utils_launcher.h b/src/mongo/shell/shell_utils_launcher.h index 25ac40ddea7..908ca9f0f04 100644 --- a/src/mongo/shell/shell_utils_launcher.h +++ b/src/mongo/shell/shell_utils_launcher.h @@ -20,6 +20,13 @@ #include <boost/filesystem/convenience.hpp> #include <boost/thread/recursive_mutex.hpp> +#include <map> +#include <sstream> +#include <string> +#include <vector> +#include <utility> + +#include "mongo/bson/bsonobj.h" #ifdef _WIN32 typedef int pid_t; @@ -47,10 +54,10 @@ namespace mongo { public: void appendLine( int port, int pid, const char *line ); /** @return up to 100000 characters of the most recent log output. */ - string str() const; + std::string str() const; void clear(); private: - stringstream _buffer; + std::stringstream _buffer; }; /** @@ -66,7 +73,7 @@ namespace mongo { /** Register an unregistered port. */ void registerPort( int port, pid_t pid, int output ); void deletePort( int port ); - void getRegisteredPorts( vector<int> &ports ); + void getRegisteredPorts( std::vector<int> &ports ); bool isPidRegistered( pid_t pid ) const; /** Register an unregistered pid. */ @@ -75,13 +82,13 @@ namespace mongo { void getRegisteredPids( vector<pid_t> &pids ); private: - map<int,pair<pid_t,int> > _ports; - map<pid_t,int> _pids; + std::map<int,std::pair<pid_t,int> > _ports; + std::map<pid_t,int> _pids; mutable boost::recursive_mutex _mutex; #ifdef _WIN32 public: - map<pid_t,HANDLE> _handles; + std::map<pid_t,HANDLE> _handles; #endif }; @@ -101,7 +108,7 @@ namespace mongo { boost::filesystem::path findProgram( const string &prog ); void launchProcess( int child_stdout ); - vector<string> _argv; + std::vector<std::string> _argv; int _port; int _pipe; pid_t _pid; |