1
/* Copyright 2012 10gen Inc.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
7
* http://www.apache.org/licenses/LICENSE-2.0
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
21
#include "mongo/base/disallow_copying.h"
22
#include "mongo/base/initializer_function.h"
23
#include "mongo/base/status.h"
28
* Type representing the act of registering a process-global intialization function.
30
* Create a module-global instance of this type to register a new initializer, to be run by a
31
* call to a variant of mongo::runGlobalInitializers(). See mongo/base/initializer.h,
32
* mongo/base/init.h and mongo/base/initializer_dependency_graph.h for details.
34
class GlobalInitializerRegisterer {
35
MONGO_DISALLOW_COPYING(GlobalInitializerRegisterer);
38
GlobalInitializerRegisterer(const std::string& name,
39
const InitializerFunction& fn,
40
const std::vector<std::string>& prerequisites,
41
const std::vector<std::string>& dependents);