MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SLListImpl< P, T, U > Class Template Reference

#include <SLList.hpp>

Inheritance diagram for SLListImpl< P, T, U >:
Collaboration diagram for SLListImpl< P, T, U >:

Classes

struct  Head
struct  HeadPOD

Public Member Functions

 SLListImpl (P &thePool)
bool seize (Ptr< T > &)
bool seizeId (Ptr< T > &, Uint32 i)
bool seizeN (Ptr< T > &, Uint32 n)
void release ()
void remove ()
void getPtr (Ptr< T > &, Uint32 i) const
void getPtr (Ptr< T > &) const
T * getPtr (Uint32 i) const
bool first (Ptr< T > &) const
bool next (Ptr< T > &) const
bool hasNext (const Ptr< T > &) const
void add (Ptr< T > &p)
void add (Uint32 first, Ptr< T > &last)
bool remove_front (Ptr< T > &)
Uint32 noOfElements () const
void print (NdbOut &out)
bool empty () const

Protected Attributes

Head head
P & thePool

Detailed Description

template<typename P, typename T, typename U = T>
class SLListImpl< P, T, U >

Template class used for implementing an list of object retreived from a pool

Definition at line 30 of file SLList.hpp.

Member Function Documentation

template<typename P, typename T, typename U = T>
void SLListImpl< P, T, U >::add ( Ptr< T > &  p)
inline

Add

Definition at line 121 of file SLList.hpp.

template<typename P , typename T, typename U >
void SLListImpl< P, T, U >::add ( Uint32  first,
Ptr< T > &  last 
)
inline

Add a list to list all elements must be correctly initilized correctly wrt next/prev

Definition at line 295 of file SLList.hpp.

Here is the call graph for this function:

template<typename P , typename T, typename U >
bool SLListImpl< P, T, U >::first ( Ptr< T > &  p) const
inline

Update ptr to first element in list

Return i

Definition at line 350 of file SLList.hpp.

Here is the caller graph for this function:

template<typename P , typename T, typename U >
void SLListImpl< P, T, U >::getPtr ( Ptr< T > &  p,
Uint32  i 
) const
inline

Update i & p value according to i

Definition at line 320 of file SLList.hpp.

template<typename P , typename T, typename U >
void SLListImpl< P, T, U >::getPtr ( Ptr< T > &  p) const
inline

Update p value for ptr according to i value

Definition at line 329 of file SLList.hpp.

template<typename P , typename T, typename U >
T * SLListImpl< P, T, U >::getPtr ( Uint32  i) const
inline

Get pointer for i value

Definition at line 337 of file SLList.hpp.

template<typename P , typename T, typename U >
bool SLListImpl< P, T, U >::hasNext ( const Ptr< T > &  p) const
inline

Check if next exists

NOTE ptr must be both p & i

Definition at line 382 of file SLList.hpp.

template<typename P , typename T, typename U >
bool SLListImpl< P, T, U >::next ( Ptr< T > &  p) const
inline

Get next element

NOTE ptr must be both p & i

Definition at line 366 of file SLList.hpp.

Here is the caller graph for this function:

template<typename P, typename T, typename U = T>
void SLListImpl< P, T, U >::print ( NdbOut &  out)
inline

Print (Run operator NdbOut<< on every element)

Definition at line 154 of file SLList.hpp.

template<typename P , typename T , typename U >
void SLListImpl< P, T, U >::release ( )
inline

Return all objects to the pool

Definition at line 304 of file SLList.hpp.

Here is the caller graph for this function:

template<typename P , typename T , typename U >
void SLListImpl< P, T, U >::remove ( void  )
inline

Remove all object from list but don't return to pool

Definition at line 272 of file SLList.hpp.

template<typename P , typename T, typename U >
bool SLListImpl< P, T, U >::remove_front ( Ptr< T > &  p)
inline

Remove object from list

Does not return it to pool

Definition at line 280 of file SLList.hpp.

template<typename P , typename T, typename U >
bool SLListImpl< P, T, U >::seize ( Ptr< T > &  p)
inline

Allocate an object from pool - update Ptr

Return i

Definition at line 205 of file SLList.hpp.

Here is the caller graph for this function:

template<typename P , typename T, typename U >
bool SLListImpl< P, T, U >::seizeId ( Ptr< T > &  p,
Uint32  i 
)
inline

Allocate object i from pool - update Ptr

Return i

Definition at line 222 of file SLList.hpp.

template<typename P , typename T, typename U >
bool SLListImpl< P, T, U >::seizeN ( Ptr< T > &  p,
Uint32  n 
)
inline

Allocate nobjects from pool

Return i value of first object allocated or RNIL if fails

Failure

Success

Definition at line 239 of file SLList.hpp.

Here is the call graph for this function:


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