The Pedigree Project 0.1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MappingList< Object > Class Template Reference

#include <MappingList.h>

+ Collaboration diagram for MappingList< Object >:

Public Types

using Iterator = typename List< Object * >::Iterator
 
using ReverseIterator = typename List< Object * >::ReverseIterator
 

Public Member Functions

size_t count () const
 
Iterator begin ()
 
Iterator end ()
 
ReverseIterator rbegin ()
 
ReverseIterator rend ()
 
bool tryPushBack (Object *object)
 
bool reserveBack (uintptr_t address)
 
void publishBack (Object *object)
 
ObjectpopBack ()
 
Iterator erase (Iterator &it)
 
ReverseIterator erase (ReverseIterator &it)
 
Objectfind (uintptr_t address, size_t *objectVisits=nullptr) const
 

Private Member Functions

 NOT_COPYABLE_OR_ASSIGNABLE (MappingList)
 

Private Attributes

List< Object * > m_Objects
 
Tree< uintptr_t, Object * > m_Index
 
uintptr_t m_ReservedAddress = 0
 
bool m_HasReservation = false
 

Detailed Description

template<class Object>
class MappingList< Object >

Append-ordered, non-owning mapping registry with logarithmic point lookup. Callers serialize access and keep published ranges disjoint. Mapping starts stay fixed until removal; shrinking a length in place is safe.

Definition at line 12 of file MappingList.h.

Member Typedef Documentation

◆ Iterator

template<class Object >
using MappingList< Object >::Iterator = typename List<Object*>::Iterator

Definition at line 14 of file MappingList.h.

◆ ReverseIterator

template<class Object >
using MappingList< Object >::ReverseIterator = typename List<Object*>::ReverseIterator

Definition at line 15 of file MappingList.h.

Member Function Documentation

◆ begin()

template<class Object >
Iterator MappingList< Object >::begin ( )
inline

Definition at line 22 of file MappingList.h.

◆ count()

template<class Object >
size_t MappingList< Object >::count ( ) const
inline

Definition at line 19 of file MappingList.h.

◆ end()

template<class Object >
Iterator MappingList< Object >::end ( )
inline

Definition at line 25 of file MappingList.h.

◆ erase() [1/2]

template<class Object >
Iterator MappingList< Object >::erase ( Iterator it)
inline

Definition at line 78 of file MappingList.h.

◆ erase() [2/2]

template<class Object >
ReverseIterator MappingList< Object >::erase ( ReverseIterator &  it)
inline

Definition at line 83 of file MappingList.h.

◆ find()

template<class Object >
Object * MappingList< Object >::find ( uintptr_t  address,
size_t *  objectVisits = nullptr 
) const
inline

Definition at line 89 of file MappingList.h.

◆ popBack()

template<class Object >
Object * MappingList< Object >::popBack ( )
inline

Definition at line 66 of file MappingList.h.

◆ publishBack()

template<class Object >
void MappingList< Object >::publishBack ( Object object)
inline

Definition at line 57 of file MappingList.h.

◆ rbegin()

template<class Object >
ReverseIterator MappingList< Object >::rbegin ( )
inline

Definition at line 28 of file MappingList.h.

◆ rend()

template<class Object >
ReverseIterator MappingList< Object >::rend ( )
inline

Definition at line 31 of file MappingList.h.

◆ reserveBack()

template<class Object >
bool MappingList< Object >::reserveBack ( uintptr_t  address)
inline

Reserve both nodes before a fallible split/clone can alter its source.

Definition at line 44 of file MappingList.h.

References Tree< K, E >::contains(), Tree< K, E >::remove(), Tree< K, E >::tryInsert(), and List< T, nodePoolSize >::tryPushBack().

Referenced by MemoryMapManager::clone().

+ Here is the caller graph for this function:

◆ tryPushBack()

template<class Object >
bool MappingList< Object >::tryPushBack ( Object object)
inline

Definition at line 35 of file MappingList.h.

Member Data Documentation

◆ m_HasReservation

template<class Object >
bool MappingList< Object >::m_HasReservation = false
private

Definition at line 113 of file MappingList.h.

◆ m_Index

template<class Object >
Tree<uintptr_t, Object*> MappingList< Object >::m_Index
private

Definition at line 111 of file MappingList.h.

◆ m_Objects

template<class Object >
List<Object*> MappingList< Object >::m_Objects
private

Definition at line 110 of file MappingList.h.

◆ m_ReservedAddress

template<class Object >
uintptr_t MappingList< Object >::m_ReservedAddress = 0
private

Definition at line 112 of file MappingList.h.


The documentation for this class was generated from the following file: