summaryrefslogtreecommitdiff
path: root/src/mongo/util/background.h
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2012-04-02 14:55:19 -0400
committerEric Milkie <milkie@10gen.com>2012-04-02 14:59:48 -0400
commit45f30389a9128fe2216371cabbe8426b634d68e9 (patch)
treea3f0fc2b758e58c0ec61a27110f1e7b26f034f76 /src/mongo/util/background.h
parent8b1c9bd361bd002980266c5269e5eab4ba62a7f5 (diff)
downloadmongo-45f30389a9128fe2216371cabbe8426b634d68e9.tar.gz
SERVER-5348 make dbclient.h the main C++ driver include file
This change fixes some #defines of common C functions so that their definitions do not leak into consumer code. I also had to change Labeler SIZE because it conflicts with Windows SIZE. pch.h is on its way out, but for now it's hanging around.
Diffstat (limited to 'src/mongo/util/background.h')
-rw-r--r--src/mongo/util/background.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/util/background.h b/src/mongo/util/background.h
index 496a1f44f88..88d5b84ed6a 100644
--- a/src/mongo/util/background.h
+++ b/src/mongo/util/background.h
@@ -17,6 +17,9 @@
#pragma once
+#include <string>
+#include <vector>
+
#include "concurrency/spin_lock.h"
namespace mongo {
@@ -50,7 +53,7 @@ namespace mongo {
*/
explicit BackgroundJob(bool selfDelete = false);
- virtual string name() const = 0;
+ virtual std::string name() const = 0;
/**
* define this to do your work.
@@ -110,7 +113,7 @@ namespace mongo {
* instantiate statically
* class MyTask : public PeriodicTask {
* public:
- * virtual string name() const { return "MyTask; " }
+ * virtual std::string name() const { return "MyTask; " }
* virtual void doWork() { log() << "hi" << endl; }
* } myTask;
*/
@@ -120,13 +123,13 @@ namespace mongo {
virtual ~PeriodicTask();
virtual void taskDoWork() = 0;
- virtual string taskName() const = 0;
+ virtual std::string taskName() const = 0;
class Runner : public BackgroundJob {
public:
virtual ~Runner(){}
- virtual string name() const { return "PeriodicTask::Runner"; }
+ virtual std::string name() const { return "PeriodicTask::Runner"; }
virtual void run();
@@ -141,7 +144,7 @@ namespace mongo {
// Runner will not delete these
// this never gets smaller
// only fields replaced with nulls
- vector<PeriodicTask*> _tasks;
+ std::vector< PeriodicTask* > _tasks;
};