Add PImpl scaffolding
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#include "ConflictSet.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
struct ConflictSet::Impl {
|
||||
explicit Impl(int64_t oldestVersion) noexcept {}
|
||||
void check(const ReadRange *reads, Result *results, int count) const {}
|
||||
|
||||
void addWrites(const WriteRange *writes, int count) {}
|
||||
|
||||
void setOldestVersion(int64_t oldestVersion) {}
|
||||
};
|
||||
|
||||
void ConflictSet::check(const ReadRange *reads, Result *results,
|
||||
int count) const {
|
||||
return impl->check(reads, results, count);
|
||||
}
|
||||
|
||||
void ConflictSet::addWrites(const WriteRange *writes, int count) {
|
||||
return impl->addWrites(writes, count);
|
||||
}
|
||||
|
||||
void ConflictSet::setOldestVersion(int64_t oldestVersion) {
|
||||
return impl->setOldestVersion(oldestVersion);
|
||||
}
|
||||
|
||||
ConflictSet::ConflictSet(int64_t oldestVersion)
|
||||
: impl(new Impl{oldestVersion}) {}
|
||||
|
||||
ConflictSet::~ConflictSet() { delete impl; }
|
||||
|
||||
ConflictSet::ConflictSet(ConflictSet &&other) noexcept
|
||||
: impl(std::exchange(other.impl, nullptr)) {}
|
||||
|
||||
ConflictSet &ConflictSet::operator=(ConflictSet &&other) noexcept {
|
||||
impl = std::exchange(other.impl, nullptr);
|
||||
return *this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user