sapling/hgext/extlib/cstore/datastore.h
Durham Goode 228e6a901e cstore: move to hgext/extlib/
Summary: Moves cstore to hgext/extlib/ and makes it build.

Test Plan: make local && run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6678852
2018-01-08 17:55:53 -08:00

37 lines
875 B
C++

// Copyright (c) 2004-present, Facebook, Inc.
// All Rights Reserved.
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
// datastore.h - c++ declarations for a data store
// no-check-code
#ifndef FBHGEXT_DATASTORE_H
#define FBHGEXT_DATASTORE_H
#include <memory>
#include "hgext/extlib/cstore/deltachain.h"
#include "hgext/extlib/cstore/key.h"
class DataStore {
protected:
DataStore() {}
public:
virtual ~DataStore() {}
virtual DeltaChainIterator getDeltaChain(const Key &key) = 0;
virtual std::shared_ptr<DeltaChain> getDeltaChainRaw(const Key &key) = 0;
virtual std::shared_ptr<KeyIterator> getMissing(KeyIterator &missing) = 0;
virtual bool contains(const Key &key) = 0;
virtual void markForRefresh() = 0;
};
#endif // FBHGEXT_DATASTORE_H