ReactOS 0.4.15-dev-8119-g4fb2fdb
_Sl_global< _Dummy > Class Template Reference

#include <_slist_base.h>

Static Public Member Functions

static size_t _STLP_CALL size (_Slist_node_base *__node)
 
static _Slist_node_base *_STLP_CALL __reverse (_Slist_node_base *__node)
 
static void _STLP_CALL __splice_after (_Slist_node_base *__pos, _Slist_node_base *__before_first, _Slist_node_base *__before_last)
 
static void _STLP_CALL __splice_after (_Slist_node_base *__pos, _Slist_node_base *__head)
 
static _Slist_node_base *_STLP_CALL __previous (_Slist_node_base *__head, const _Slist_node_base *__node)
 
static const _Slist_node_base *_STLP_CALL __previous (const _Slist_node_base *__head, const _Slist_node_base *__node)
 

Detailed Description

template<class _Dummy>
class _Sl_global< _Dummy >

Definition at line 52 of file _slist_base.h.

Member Function Documentation

◆ __previous() [1/2]

template<class _Dummy >
_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE _Slist_node_base *_STLP_CALL _Sl_global< _Dummy >::__previous ( _Slist_node_base __head,
const _Slist_node_base __node 
)
static

Definition at line 39 of file _slist_base.c.

40 {
41 while (__head && __head->_M_next != __node)
42 __head = __head->_M_next;
43 return __head;
44}
_Slist_node_base * _M_next
Definition: _slist_base.h:39

Referenced by _Sl_global< _Dummy >::__previous(), slist< _Tp, >::erase(), slist< _Tp, >::insert(), slist< _Tp, >::previous(), and slist< _Tp, >::splice().

◆ __previous() [2/2]

template<class _Dummy >
static const _Slist_node_base *_STLP_CALL _Sl_global< _Dummy >::__previous ( const _Slist_node_base __head,
const _Slist_node_base __node 
)
inlinestatic

Definition at line 66 of file _slist_base.h.

67 {
69 }
static _Slist_node_base *_STLP_CALL __previous(_Slist_node_base *__head, const _Slist_node_base *__node)
Definition: _slist_base.c:39
#define __CONST_CAST(__x, __y)
Definition: features.h:584

◆ __reverse()

template<class _Dummy >
_Slist_node_base *_STLP_CALL _Sl_global< _Dummy >::__reverse ( _Slist_node_base __node)
static

Definition at line 74 of file _slist_base.c.

74 {
75 _Slist_node_base* __result = __node;
76 __node = __node->_M_next;
77 __result->_M_next = 0;
78 while(__node) {
79 _Slist_node_base* __next = __node->_M_next;
80 __node->_M_next = __result;
81 __result = __node;
82 __node = __next;
83 }
84 return __result;
85}

Referenced by slist< _Tp, >::reverse().

◆ __splice_after() [1/2]

template<class _Dummy >
void _STLP_CALL _Sl_global< _Dummy >::__splice_after ( _Slist_node_base __pos,
_Slist_node_base __before_first,
_Slist_node_base __before_last 
)
static

Definition at line 60 of file _slist_base.c.

62 {
63 if (__pos != __before_first && __pos != __before_last) {
64 _Slist_node_base* __first = __before_first->_M_next;
65 _Slist_node_base* __after = __pos->_M_next;
66 __before_first->_M_next = __before_last->_M_next;
67 __pos->_M_next = __first;
68 __before_last->_M_next = __after;
69 }
70}

Referenced by slist< _Tp, >::splice(), and slist< _Tp, >::splice_after().

◆ __splice_after() [2/2]

template<class _Dummy >
void _STLP_CALL _Sl_global< _Dummy >::__splice_after ( _Slist_node_base __pos,
_Slist_node_base __head 
)
static

Definition at line 48 of file _slist_base.c.

48 {
49 _Slist_node_base* __before_last = __previous(__head, 0);
50 if (__before_last != __head) {
51 _Slist_node_base* __after = __pos->_M_next;
52 __pos->_M_next = __head->_M_next;
53 __head->_M_next = 0;
54 __before_last->_M_next = __after;
55 }
56}

◆ size()

template<class _Dummy >
size_t _STLP_CALL _Sl_global< _Dummy >::size ( _Slist_node_base __node)
static

Definition at line 89 of file _slist_base.c.

89 {
90 size_t __result = 0;
91 for ( ; __node != 0; __node = __node->_M_next)
92 ++__result;
93 return __result;
94}

Referenced by slist< _Tp, >::size().


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