My Project
Public Types | Public Member Functions | Friends
I_P_List< T, B, C, I > Class Template Reference

#include <sql_plist.h>

List of all members.

Public Types

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

Public Member Functions

void empty ()
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)


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

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.

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; } };

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
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.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines