/* * include/framework/interface/Shard.h * * Copyright (C) 2023 Douglas B. Rumbaugh * * Distributed under the Modified BSD License. * */ #pragma once #include "framework/ShardRequirements.h" namespace de { template concept ShardInterface = RecordInterface && requires(S s, std::vector spp, void *p, bool b, size_t i, BufferView bv, R r) { {S(spp)}; {S(std::move(bv))}; {s.point_lookup(r, b) } -> std::same_as*>; {s.get_data()} -> std::same_as*>; {s.get_record_count()} -> std::convertible_to; {s.get_tombstone_count()} -> std::convertible_to; {s.get_memory_usage()} -> std::convertible_to; {s.get_aux_memory_usage()} -> std::convertible_to; }; template concept SortedShardInterface = ShardInterface && requires(S s, R r, R *rp, size_t i) { {s.lower_bound(r)} -> std::convertible_to; {s.upper_bound(r)} -> std::convertible_to; {s.get_record_at(i)} -> std::same_as*>; }; }