30template <
typename T,
typename L>
94 *B::prev_ptr(
m_first) = B::next_ptr(a);
96 I::set_last(B::next_ptr(a));
102 T **
last = I::get_last();
103 *B::next_ptr(a) = *
last;
105 *B::prev_ptr(a) =
last;
106 I::set_last(B::next_ptr(a));
113 *B::next_ptr(a) = *B::next_ptr(pos);
114 *B::prev_ptr(a) = B::next_ptr(pos);
115 *B::next_ptr(pos) = a;
116 if (*B::next_ptr(a)) {
117 T *old_next = *B::next_ptr(a);
118 *B::prev_ptr(old_next) = B::next_ptr(a);
120 I::set_last(B::next_ptr(a));
125 T *next = *B::next_ptr(a);
127 *B::prev_ptr(next) = *B::prev_ptr(a);
129 I::set_last(*B::prev_ptr(a));
130 **B::prev_ptr(a) = next;
167template <
typename T,
typename L>
197template <
typename T, T *T::*next, T **T::*prev>
199 static inline T **
next_ptr(T *el) {
return &(el->*next); }
200 static inline const T *
const *
next_ptr(
const T *el) {
return &(el->*next); }
201 static inline T ***
prev_ptr(T *el) {
return &(el->*prev); }
Element counting policy class for I_P_List which provides basic element counting.
Definition: sql_plist.h:222
uint elements() const
Definition: sql_plist.h:233
uint m_counter
Definition: sql_plist.h:223
void reset()
Definition: sql_plist.h:227
void inc()
Definition: sql_plist.h:228
void swap(I_P_List_counter &rhs)
Definition: sql_plist.h:230
void dec()
Definition: sql_plist.h:229
I_P_List_counter()
Definition: sql_plist.h:226
An insertion policy class for I_P_List which can be used when fast push_back() operation is required.
Definition: sql_plist.h:260
void swap(I_P_List_fast_push_back< T > &rhs)
Definition: sql_plist.h:267
void set_last(T **a)
Definition: sql_plist.h:265
T ** m_last
Definition: sql_plist.h:261
I_P_List_fast_push_back(T **a)
Definition: sql_plist.h:264
T ** get_last() const
Definition: sql_plist.h:266
Iterator for I_P_List.
Definition: sql_plist.h:168
void rewind()
Definition: sql_plist.h:189
T * operator++()
Definition: sql_plist.h:185
I_P_List_iterator(const L &a)
Definition: sql_plist.h:173
void init(const L &a)
Definition: sql_plist.h:176
const L * list
Definition: sql_plist.h:169
I_P_List_iterator(const L &a, T *current_arg)
Definition: sql_plist.h:174
T * current
Definition: sql_plist.h:170
T * operator++(int)
Definition: sql_plist.h:180
A null insertion policy class for I_P_List to be used in cases when push_back() operation is not nece...
Definition: sql_plist.h:242
I_P_List_no_push_back(T **)
Definition: sql_plist.h:244
void swap(I_P_List_no_push_back< T > &)
Definition: sql_plist.h:251
void set_last(T **)
Definition: sql_plist.h:245
Element counting policy class for I_P_List to be used in cases when no element counting should be don...
Definition: sql_plist.h:209
void dec()
Definition: sql_plist.h:213
void swap(I_P_List_null_counter &)
Definition: sql_plist.h:214
void reset()
Definition: sql_plist.h:211
void inc()
Definition: sql_plist.h:212
Intrusive parameterized list.
Definition: sql_plist.h:75
void remove(T *a)
Definition: sql_plist.h:124
void clear()
Definition: sql_plist.h:85
bool is_empty() const
Definition: sql_plist.h:90
void push_back(T *a)
Definition: sql_plist.h:101
I_P_List< T, B, C, I > Base
Definition: sql_plist.h:156
void swap(I_P_List< T, B, C > &rhs)
Definition: sql_plist.h:142
B Adapter
Definition: sql_plist.h:155
I_P_List_iterator< const T, Base > Const_Iterator
Definition: sql_plist.h:158
T * front()
Definition: sql_plist.h:133
T * pop_front()
Definition: sql_plist.h:135
I_P_List()
Definition: sql_plist.h:84
T * m_first
Definition: sql_plist.h:76
void insert_after(T *pos, T *a)
Definition: sql_plist.h:109
void push_front(T *a)
Definition: sql_plist.h:91
const T * front() const
Definition: sql_plist.h:134
I_P_List_iterator< T, Base > Iterator
Definition: sql_plist.h:157
#define L
Definition: ctype-tis620.cc:76
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
static const std::string dec("DECRYPTION")
Some integer typedefs for easier portability.
Type inc(Shards< COUNT > &shards, size_t id)
Increment the counter of a shard by 1.
Definition: ut0counter.h:293
std::string HARNESS_EXPORT reset()
get 'reset attributes' ESC sequence.
Definition: vt100.cc:37
struct result result
Definition: result.h:34
static void swap(String &a, String &b) noexcept
Definition: sql_string.h:642
Hook class which via its methods specifies which members of T should be used for participating in a i...
Definition: sql_plist.h:198
static const T *const * next_ptr(const T *el)
Definition: sql_plist.h:200
static T *** prev_ptr(T *el)
Definition: sql_plist.h:201
static T ** next_ptr(T *el)
Definition: sql_plist.h:199
unsigned int uint
Definition: uca9-dump.cc:75