summaryrefslogtreecommitdiff
path: root/src/mongo/base/initializer.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 00:22:50 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 10:56:02 -0400
commit9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch)
tree3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/base/initializer.h
parent01965cf52bce6976637ecb8f4a622aeb05ab256a (diff)
downloadmongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/base/initializer.h')
-rw-r--r--src/mongo/base/initializer.h92
1 files changed, 46 insertions, 46 deletions
diff --git a/src/mongo/base/initializer.h b/src/mongo/base/initializer.h
index a8abc6603b3..fa4ba508981 100644
--- a/src/mongo/base/initializer.h
+++ b/src/mongo/base/initializer.h
@@ -37,59 +37,59 @@
namespace mongo {
- /**
- * Class representing an initialization process.
- *
- * Such a process is described by a directed acyclic graph of initialization operations, the
- * InitializerDependencyGraph. One constructs an initialization process by adding nodes and
- * edges to the graph. Then, one executes the process, causing each initialization operation to
- * execute in an order that respects the programmer-established prerequistes.
- */
- class Initializer {
- MONGO_DISALLOW_COPYING(Initializer);
- public:
- Initializer();
- ~Initializer();
-
- /**
- * Get the initializer dependency graph, presumably for the purpose of adding more nodes.
- */
- InitializerDependencyGraph& getInitializerDependencyGraph() { return _graph; }
-
- /**
- * Execute the initializer process, using the given argv and environment data as input.
- *
- * Returns Status::OK on success. All other returns constitute initialization failures,
- * and the thing being initialized should be considered dead in the water.
- */
- Status execute(const InitializerContext::ArgumentVector& args,
- const InitializerContext::EnvironmentMap& env) const;
+/**
+ * Class representing an initialization process.
+ *
+ * Such a process is described by a directed acyclic graph of initialization operations, the
+ * InitializerDependencyGraph. One constructs an initialization process by adding nodes and
+ * edges to the graph. Then, one executes the process, causing each initialization operation to
+ * execute in an order that respects the programmer-established prerequistes.
+ */
+class Initializer {
+ MONGO_DISALLOW_COPYING(Initializer);
- private:
+public:
+ Initializer();
+ ~Initializer();
- InitializerDependencyGraph _graph;
- };
+ /**
+ * Get the initializer dependency graph, presumably for the purpose of adding more nodes.
+ */
+ InitializerDependencyGraph& getInitializerDependencyGraph() {
+ return _graph;
+ }
/**
- * Run the global initializers.
+ * Execute the initializer process, using the given argv and environment data as input.
*
- * It's a programming error for this to fail, but if it does it will return a status other
- * than Status::OK.
- *
- * This means that the few initializers that might want to terminate the program by failing
- * should probably arrange to terminate the process themselves.
+ * Returns Status::OK on success. All other returns constitute initialization failures,
+ * and the thing being initialized should be considered dead in the water.
*/
- Status runGlobalInitializers(const InitializerContext::ArgumentVector& args,
- const InitializerContext::EnvironmentMap& env);
+ Status execute(const InitializerContext::ArgumentVector& args,
+ const InitializerContext::EnvironmentMap& env) const;
- Status runGlobalInitializers(
- int argc, const char* const* argv, const char* const* envp);
+private:
+ InitializerDependencyGraph _graph;
+};
- /**
- * Same as runGlobalInitializers(), except prints a brief message to std::cerr
- * and terminates the process on failure.
- */
- void runGlobalInitializersOrDie(
- int argc, const char* const* argv, const char* const* envp);
+/**
+ * Run the global initializers.
+ *
+ * It's a programming error for this to fail, but if it does it will return a status other
+ * than Status::OK.
+ *
+ * This means that the few initializers that might want to terminate the program by failing
+ * should probably arrange to terminate the process themselves.
+ */
+Status runGlobalInitializers(const InitializerContext::ArgumentVector& args,
+ const InitializerContext::EnvironmentMap& env);
+
+Status runGlobalInitializers(int argc, const char* const* argv, const char* const* envp);
+
+/**
+ * Same as runGlobalInitializers(), except prints a brief message to std::cerr
+ * and terminates the process on failure.
+ */
+void runGlobalInitializersOrDie(int argc, const char* const* argv, const char* const* envp);
} // namespace mongo