MySQL 8.4.0
Source Code Documentation
I_P_List< T, B, C, I > Class Template Reference

Intrusive parameterized list. More...

#include <sql_plist.h>

Inheritance diagram for I_P_List< T, B, C, I >:
[legend]

Public Types

typedef B Adapter
 
typedef I_P_List< T, B, C, I > Base
 
typedef I_P_List_iterator< T, BaseIterator
 
typedef I_P_List_iterator< const T, BaseConst_Iterator
 

Public Member Functions

 I_P_List ()
 
void clear ()
 
bool is_empty () const
 
void push_front (T *a)
 
void push_back (T *a)
 
void insert_after (T *pos, T *a)
 
void remove (T *a)
 
T * front ()
 
const T * front () const
 
T * pop_front ()
 
void swap (I_P_List< T, B, C > &rhs)
 

Private Attributes

T * m_first
 

Friends

class I_P_List_iterator< T, Base >
 
class I_P_List_iterator< const T, Base >
 

Additional Inherited Members

- Protected Member Functions inherited from I_P_List_null_counter
void reset ()
 
void inc ()
 
void dec ()
 
void swap (I_P_List_null_counter &)
 
- Protected Member Functions inherited from I_P_List_no_push_back< T >
 I_P_List_no_push_back (T **)
 
void set_last (T **)
 
void swap (I_P_List_no_push_back< T > &)
 

Detailed Description

template<typename T, typename B, typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
class I_P_List< T, B, C, I >

Intrusive parameterized list.

Unlike I_List does not require its elements to be descendant of ilink class and therefore allows them to participate in several such lists simultaneously.

Unlike List is doubly-linked list and thus supports efficient deletion of element without iterator.

Template Parameters
TType of elements which will belong to list.
BClass which via its methods specifies which members of T should be used for participating in this list. Here is typical layout of such class:

struct B { static inline T **next_ptr(T *el) { return &el->next; } static inline T ***prev_ptr(T *el) { return &el->prev; } };

Template Parameters
CPolicy class specifying how counting of elements in the list should be done. Instance of this class is also used as a place where information about number of list elements is stored.
See also
I_P_List_null_counter, I_P_List_counter
Template Parameters
IPolicy class specifying whether I_P_List should support efficient push_back() operation. Instance of this class is used as place where we store information to support this operation.
See also
I_P_List_no_push_back, I_P_List_fast_push_back.

Member Typedef Documentation

◆ Adapter

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
typedef B I_P_List< T, B, C, I >::Adapter

◆ Base

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
typedef I_P_List<T, B, C, I> I_P_List< T, B, C, I >::Base

◆ Const_Iterator

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
typedef I_P_List_iterator<const T, Base> I_P_List< T, B, C, I >::Const_Iterator

◆ Iterator

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
typedef I_P_List_iterator<T, Base> I_P_List< T, B, C, I >::Iterator

Constructor & Destructor Documentation

◆ I_P_List()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
I_P_List< T, B, C, I >::I_P_List ( )
inline

Member Function Documentation

◆ clear()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
void I_P_List< T, B, C, I >::clear ( )
inline

◆ front() [1/2]

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
T * I_P_List< T, B, C, I >::front ( )
inline

◆ front() [2/2]

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
const T * I_P_List< T, B, C, I >::front ( ) const
inline

◆ insert_after()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
void I_P_List< T, B, C, I >::insert_after ( T *  pos,
T *  a 
)
inline

◆ is_empty()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
bool I_P_List< T, B, C, I >::is_empty ( void  ) const
inline

◆ pop_front()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
T * I_P_List< T, B, C, I >::pop_front ( )
inline

◆ push_back()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
void I_P_List< T, B, C, I >::push_back ( T *  a)
inline

◆ push_front()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
void I_P_List< T, B, C, I >::push_front ( T *  a)
inline

◆ remove()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
void I_P_List< T, B, C, I >::remove ( T *  a)
inline

◆ swap()

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
void I_P_List< T, B, C, I >::swap ( I_P_List< T, B, C > &  rhs)
inline

Friends And Related Function Documentation

◆ I_P_List_iterator< const T, Base >

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
friend class I_P_List_iterator< const T, Base >
friend

◆ I_P_List_iterator< T, Base >

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
friend class I_P_List_iterator< T, Base >
friend

Member Data Documentation

◆ m_first

template<typename T , typename B , typename C = I_P_List_null_counter, typename I = I_P_List_no_push_back<T>>
T* I_P_List< T, B, C, I >::m_first
private

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