MCPcopy Create free account
hub / github.com/ElementsProject/elements / NewIterator

Method NewIterator

src/leveldb/db/db_test.cc:2042–2052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2040 return Status::NotFound(key);
2041 }
2042 Iterator* NewIterator(const ReadOptions& options) override {
2043 if (options.snapshot == nullptr) {
2044 KVMap* saved = new KVMap;
2045 *saved = map_;
2046 return new ModelIter(saved, true);
2047 } else {
2048 const KVMap* snapshot_state =
2049 &(reinterpret_cast<const ModelSnapshot*>(options.snapshot)->map_);
2050 return new ModelIter(snapshot_state, false);
2051 }
2052 }
2053 const Snapshot* GetSnapshot() override {
2054 ModelSnapshot* snapshot = new ModelSnapshot;
2055 snapshot->map_ = map_;

Callers 3

ContentsMethod · 0.45
TESTFunction · 0.45
CompareIteratorsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected