Move I_P_List_adapter to sql_plist.h as it is currently being used

for code other then in mdl.h. Since the adapter is generic, it is
better located in sql_plist.h.
This commit is contained in:
Davi Arnaut 2011-04-11 08:39:15 -03:00
parent c210b98b53
commit 74ccd37745
2 changed files with 14 additions and 15 deletions

View File

@ -286,21 +286,6 @@ private:
};
/**
Hook class which via its methods specifies which members
of T should be used for participating in MDL lists.
*/
template <typename T, T* T::*next, T** T::*prev>
struct I_P_List_adapter
{
static inline T **next_ptr(T *el) { return &(el->*next); }
static inline T ***prev_ptr(T *el) { return &(el->*prev); }
};
/**
A pending metadata lock request.

View File

@ -187,6 +187,20 @@ public:
};
/**
Hook class which via its methods specifies which members
of T should be used for participating in a intrusive list.
*/
template <typename T, T* T::*next, T** T::*prev>
struct I_P_List_adapter
{
static inline T **next_ptr(T *el) { return &(el->*next); }
static inline T ***prev_ptr(T *el) { return &(el->*prev); }
};
/**
Element counting policy class for I_P_List to be used in
cases when no element counting should be done.