mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
38c4cde5a3
Summary: Extended DeltaChain with CDeltaChain and PyDeltaChain which are wrappers around c and python delta chains respectively. The declaration and implementation of c and python delta chains as well as DeltaChainLink were put in a different file. Test Plan: * Ensure that unit tests pass Reviewers: ryanmce, durham, simonfar, #fbhgext Reviewed By: ryanmce, durham, #fbhgext Differential Revision: https://phab.mercurial-scm.org/D630
37 lines
849 B
C++
37 lines
849 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 "cstore/deltachain.h"
|
|
#include "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
|