summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/index_catalog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/index_catalog.h')
-rw-r--r--src/mongo/db/catalog/index_catalog.h42
1 files changed, 19 insertions, 23 deletions
diff --git a/src/mongo/db/catalog/index_catalog.h b/src/mongo/db/catalog/index_catalog.h
index 5e5b17281e2..bb9902f91cd 100644
--- a/src/mongo/db/catalog/index_catalog.h
+++ b/src/mongo/db/catalog/index_catalog.h
@@ -32,6 +32,7 @@
#include <vector>
#include "mongo/base/clonable_ptr.h"
+#include "mongo/base/shim.h"
#include "mongo/db/catalog/index_catalog_entry.h"
#include "mongo/db/index/multikey_paths.h"
#include "mongo/db/jsobj.h"
@@ -76,20 +77,20 @@ public:
virtual IndexCatalogEntry* catalogEntry(const IndexDescriptor* desc) = 0;
};
- private:
- static std::unique_ptr<Impl> makeImpl(OperationContext* opCtx,
- const IndexCatalog* cat,
- bool includeUnfinishedIndexes);
+ static MONGO_DECLARE_SHIM((OperationContext * opCtx,
+ const IndexCatalog* cat,
+ bool includeUnfinishedIndexes,
+ PrivateTo<IndexIterator>)
+ ->std::unique_ptr<Impl>) makeImpl;
+ private:
explicit inline IndexIterator(OperationContext* const opCtx,
const IndexCatalog* const cat,
const bool includeUnfinishedIndexes)
- : _pimpl(makeImpl(opCtx, cat, includeUnfinishedIndexes)) {}
+ : _pimpl(makeImpl(opCtx, cat, includeUnfinishedIndexes, PrivateCall<IndexIterator>{})) {
+ }
public:
- using factory_function_type = stdx::function<decltype(makeImpl)>;
- static void registerFactory(factory_function_type factory);
-
inline ~IndexIterator() = default;
inline IndexIterator(const IndexIterator& copy) = default;
@@ -255,19 +256,17 @@ public:
friend IndexCatalog;
};
-private:
- static std::unique_ptr<Impl> makeImpl(IndexCatalog* this_,
- Collection* collection,
- int maxNumIndexesAllowed);
-
public:
- using factory_function_type = stdx::function<decltype(makeImpl)>;
- static void registerFactory(factory_function_type factory);
+ static MONGO_DECLARE_SHIM((IndexCatalog * this_,
+ Collection* collection,
+ int maxNumIndexesAllowed,
+ PrivateTo<IndexCatalog>)
+ ->std::unique_ptr<Impl>) makeImpl;
inline ~IndexCatalog() = default;
explicit inline IndexCatalog(Collection* const collection, const int maxNumIndexesAllowed)
- : _pimpl(makeImpl(this, collection, maxNumIndexesAllowed)) {}
+ : _pimpl(makeImpl(this, collection, maxNumIndexesAllowed, PrivateCall<IndexCatalog>{})) {}
inline IndexCatalog(IndexCatalog&&) = delete;
inline IndexCatalog& operator=(IndexCatalog&&) = delete;
@@ -538,18 +537,15 @@ public:
// public static helpers
- static BSONObj fixIndexKey(const BSONObj& key);
- static void registerFixIndexKeyImpl(stdx::function<decltype(fixIndexKey)> impl);
+ static MONGO_DECLARE_SHIM((const BSONObj& key)->BSONObj) fixIndexKey;
/**
* Fills out 'options' in order to indicate whether to allow dups or relax
* index constraints, as needed by replication.
*/
- static void prepareInsertDeleteOptions(OperationContext* opCtx,
- const IndexDescriptor* desc,
- InsertDeleteOptions* options);
- static void registerPrepareInsertDeleteOptionsImpl(
- stdx::function<decltype(prepareInsertDeleteOptions)> impl);
+ static MONGO_DECLARE_SHIM(
+ (OperationContext * opCtx, const IndexDescriptor* desc, InsertDeleteOptions* options)->void)
+ prepareInsertDeleteOptions;
private:
inline const Collection* _getCollection() const {