MySQL  8.0.27
Source Code Documentation
intrusive_list_iterator.h File Reference

Iterator utilities for working with intrusive pointers. More...

#include <assert.h>

Go to the source code of this file.

Classes

class  NextFunctionIterator< T, GetNextPointer >
 An iterator that follows a 'next' pointer with an accessor function. More...
 
class  IntrusiveListIterator< T, NextPointer >
 An iterator that follows the 'next' pointer in an intrusive list. More...
 
class  IteratorContainer< IteratorType >
 Adds a collection interface on top of an iterator. More...
 

Typedefs

template<typename T >
using GetNextPointerFunction = T *(*)(const T *)
 
template<typename T , GetNextPointerFunction< T > Fn>
using NextFunctionContainer = IteratorContainer< NextFunctionIterator< T, Fn > >
 Convenience alias for instantiating a container directly from the accessor function. More...
 
template<typename T , T *T::* NextPointer>
using IntrusiveListContainer = IteratorContainer< NextFunctionIterator< T, &GetMember< T, NextPointer > >>
 

Functions

template<typename T , T *T::* Member>
T * GetMember (const T *t)
 Helper template for the case when the 'next' member can be used directly, typically when it's public and the class definition is known. More...
 

Detailed Description

Iterator utilities for working with intrusive pointers.

Typedef Documentation

◆ GetNextPointerFunction

template<typename T >
using GetNextPointerFunction = T *(*)(const T *)

◆ IntrusiveListContainer

template<typename T , T *T::* NextPointer>
using IntrusiveListContainer = IteratorContainer<NextFunctionIterator<T, &GetMember<T, NextPointer> >>

◆ NextFunctionContainer

template<typename T , GetNextPointerFunction< T > Fn>
using NextFunctionContainer = IteratorContainer<NextFunctionIterator<T, Fn> >

Convenience alias for instantiating a container directly from the accessor function.

Function Documentation

◆ GetMember()

template<typename T , T *T::* Member>
T* GetMember ( const T *  t)

Helper template for the case when the 'next' member can be used directly, typically when it's public and the class definition is known.