diff options
Diffstat (limited to 'include/framework/interface/Shard.h')
| -rw-r--r-- | include/framework/interface/Shard.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/framework/interface/Shard.h b/include/framework/interface/Shard.h index ea58b2a..d3a6cf8 100644 --- a/include/framework/interface/Shard.h +++ b/include/framework/interface/Shard.h @@ -1,7 +1,7 @@ /* - * include/framework/ShardInterface.h + * include/framework/interface/Shard.h * - * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu> + * Copyright (C) 2023 Douglas B. Rumbaugh <drumbaugh@psu.edu> * * All rights reserved. Published under the Modified BSD License. * @@ -15,12 +15,22 @@ namespace de { -//template <template<typename> typename S, typename R> +// FIXME: The interface is not completely specified yet, as it is pending +// determining a good way to handle additional template arguments +// to get the Record type into play template <typename S> -concept ShardInterface = requires(S s, void *p, bool b) { - //{s.point_lookup(r, b) } -> std::same_as<R*>; +concept ShardInterface = requires(S s, S **spp, void *p, bool b, size_t i) { + {S(spp, i)}; + /* + {S(mutable buffer)} + {s.point_lookup(r, b) } -> std::convertible_to<void*> + */ + {s.get_data()} -> std::convertible_to<void*>; + {s.get_record_count()} -> std::convertible_to<size_t>; + {s.get_tombstone_count()} -> std::convertible_to<size_t>; {s.get_memory_usage()} -> std::convertible_to<size_t>; + {s.get_aux_memory_usage()} -> std::convertible_to<size_t>; }; } |