My Project
|
#include <sql_plist.h>
Public Types | |
typedef B | Adapter |
typedef I_P_List< T, B, C, I > | Base |
typedef I_P_List_iterator< T, Base > | Iterator |
typedef I_P_List_iterator < const T, Base > | Const_Iterator |
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) |
Friends | |
class | I_P_List_iterator< T, Base > |
class | I_P_List_iterator< const T, Base > |
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.
T | Type of elements which will belong to list. |
B | Class 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; } };
C | Policy 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. |
I | Policy 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. |