sapling/eden/fs/store/EmptyBackingStore.cpp
Chad Austin 49385c8a07 store: namespace facebook::eden
Summary: C++17

Reviewed By: fanzeyi

Differential Revision: D28966939

fbshipit-source-id: c8c9d49bc02557263a6acf9357c90b50e04fbdb9
2021-06-08 19:29:37 -07:00

56 lines
1.5 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.
*/
#include "eden/fs/store/EmptyBackingStore.h"
#include <folly/futures/Future.h>
#include "eden/fs/model/Blob.h"
#include "eden/fs/model/Hash.h"
#include "eden/fs/model/Tree.h"
#include "eden/fs/store/ObjectFetchContext.h"
using folly::makeSemiFuture;
using folly::SemiFuture;
using std::unique_ptr;
namespace facebook::eden {
EmptyBackingStore::EmptyBackingStore() {}
EmptyBackingStore::~EmptyBackingStore() {}
RootId EmptyBackingStore::parseRootId(folly::StringPiece /*rootId*/) {
throw std::domain_error("empty backing store");
}
std::string EmptyBackingStore::renderRootId(const RootId& /*rootId*/) {
throw std::domain_error("empty backing store");
}
SemiFuture<unique_ptr<Tree>> EmptyBackingStore::getRootTree(
const RootId& /* rootId */,
ObjectFetchContext& /* context */) {
return makeSemiFuture<unique_ptr<Tree>>(
std::domain_error("empty backing store"));
}
SemiFuture<unique_ptr<Tree>> EmptyBackingStore::getTree(
const Hash& /* id */,
ObjectFetchContext& /* context */) {
return makeSemiFuture<unique_ptr<Tree>>(
std::domain_error("empty backing store"));
}
SemiFuture<unique_ptr<Blob>> EmptyBackingStore::getBlob(
const Hash& /* id */,
ObjectFetchContext& /* context */) {
return makeSemiFuture<unique_ptr<Blob>>(
std::domain_error("empty backing store"));
}
} // namespace facebook::eden