diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-07-14 09:43:59 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-07-14 13:04:43 +0200 |
commit | 3eb7e8d5a8b75a645d9994152451ce213e164887 (patch) | |
tree | 8fcc0585d46796ef593195f2f93f3bd34a7722bb /src/handle-fwd.hpp | |
parent | b99da22eec9ff299141f51f94a5b6b88640d0b60 (diff) |
zz
Diffstat (limited to 'src/handle-fwd.hpp')
-rw-r--r-- | src/handle-fwd.hpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/handle-fwd.hpp b/src/handle-fwd.hpp deleted file mode 100644 index 3e010f6d..00000000 --- a/src/handle-fwd.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -namespace floormat::impl_handle { - -template<typename OBJ, uint32_t PAGE_SIZE> struct Handle; -template<typename Obj, uint32_t PageSize> struct Item; -template<typename Obj, uint32_t PageSize> class Page; -template<typename Obj, uint32_t PageSize> class Pool; - -template<typename OBJ, uint32_t PAGE_SIZE> -struct Handle final -{ - uint32_t index = (uint32_t)-1; - uint32_t counter = 0; - - const OBJ& get() const; - OBJ& get(); - bool operator==(const Handle& other) const noexcept; - explicit operator bool() const noexcept; - -private: - static Item<OBJ, PAGE_SIZE>& get_from_pool(uint32_t index, uint32_t counter); -}; - -} // namespace floormat::impl_handle - -namespace floormat { - -template<typename Obj, uint32_t PageSize> -using handle = struct impl_handle::Handle<Obj, PageSize>; - -} // namespace floormat |