sapling/eden/fs/store/EmptyBackingStore.h
Wez Furlong 0a6aa21d77 eden: fix multiply defined symbols issue with ImportPriority
Summary:
This is a rough pass that resolves a linker issue on MSVC by
switching to inline static member functions.

Reviewed By: chadaustin

Differential Revision: D20529163

fbshipit-source-id: 578ed440758c685091d3e039e261638e027db17a
2020-03-20 10:56:08 -07:00

38 lines
1.0 KiB
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#pragma once
#include "BackingStore.h"
namespace facebook {
namespace eden {
/*
* A dummy BackingStore implementation, that always throws std::domain_error
* for any ID that is looked up.
*/
class EmptyBackingStore : public BackingStore {
public:
EmptyBackingStore();
~EmptyBackingStore() override;
folly::SemiFuture<std::unique_ptr<Tree>> getTree(
const Hash& id,
ImportPriority priority = ImportPriority::kNormal()) override;
folly::SemiFuture<std::unique_ptr<Blob>> getBlob(
const Hash& id,
ImportPriority priority = ImportPriority::kNormal()) override;
folly::SemiFuture<std::unique_ptr<Tree>> getTreeForCommit(
const Hash& commitID) override;
folly::SemiFuture<std::unique_ptr<Tree>> getTreeForManifest(
const Hash& commitID,
const Hash& manifestID) override;
};
} // namespace eden
} // namespace facebook