/** @file AAllocIterator.hpp * * @author Roland Conybeare, Dec 2025 **/ #pragma once #include "alloc/AllocInfo.hpp" #include "cmpresult.hpp" #include namespace xo { namespace mm { using Copaque = const void *; using Opaque = void *; /** forward decl for obj **/ struct ObjAllocIterator; /** @class AAllocIterator * @brief Abstract facet for iterating over allocs * * Iterator refers to an AllocInfo instance * Only supporting forward-allocator. **/ struct AAllocIterator { using obj_AAllocIterator = xo::facet::obj; /** RTTI: unique id# for actual runtime *data* representation **/ virtual int32_t _typeseq() const noexcept = 0; /** retrieve AllocInfo for current iterator position **/ virtual AllocInfo deref(Copaque d) const noexcept = 0; /** compare alloc iterators @p d and @p other **/ virtual cmpresult compare(Copaque d, const obj_AAllocIterator & other) const noexcept = 0; /** advance iterator to next position **/ virtual void next(Opaque d) const noexcept = 0; }; } /*namespace mm*/ } /*namespace xo*/ /* end AllocIterator.hpp */