xo-alloc2: DX1CollectorIterator infra [WIP]
This commit is contained in:
parent
59c0311ed7
commit
bf27314688
30 changed files with 1041 additions and 176 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "alloc/AllocInfo.hpp"
|
||||
#include "cmpresult.hpp"
|
||||
#include <xo/facet/obj.hpp>
|
||||
|
||||
namespace xo {
|
||||
|
|
@ -19,7 +20,8 @@ namespace xo {
|
|||
/** @class AAllocIterator
|
||||
* @brief Abstract facet for iterating over allocs
|
||||
*
|
||||
* Iterator refers to an AllocInfo instance.
|
||||
* Iterator refers to an AllocInfo instance
|
||||
* Only supporting forward-allocator.
|
||||
**/
|
||||
struct AAllocIterator {
|
||||
using obj_AAllocIterator = xo::facet::obj<AAllocIterator>;
|
||||
|
|
@ -29,13 +31,11 @@ namespace xo {
|
|||
/** retrieve AllocInfo for current iterator position
|
||||
**/
|
||||
virtual AllocInfo deref(Copaque d) const noexcept = 0;
|
||||
/** compare alloc iterators @p d and @p other for equality **/
|
||||
virtual int compare(Copaque d,
|
||||
const obj_AAllocIterator & other) 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;
|
||||
/** retreat iterator to previous position **/
|
||||
virtual void prev(Opaque d) const noexcept = 0;
|
||||
};
|
||||
} /*namespace mm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue