STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
cliext::impl::list_impl< _Value_t, _Is_ref > Class Template Reference
Inheritance diagram for cliext::impl::list_impl< _Value_t, _Is_ref >:
cliext::impl::list_base< _Value_t, _Is_ref > cliext::impl::list_select< _Value_t, _Is_ref > cliext::impl::list_select< _Value_t, __is_ref_class(_Dehandle< _Value_t >::type)&&!is_handle< _Value_t >::value > cliext::list< _Value_t >

Public Types

typedef list_impl< _Value_t, _Is_ref > _Mytype_t
 
typedef _STLCLR IList< _Value_t > _Mycont_it
 
typedef list_node< _Value_t > _Mynode_t
 
typedef cli::array< _Value_t > _Myarray_t
 
typedef System::Collections::Generic::IEnumerable< _Value_t > _Myenum_it
 
typedef _Cont_make_value< _Value_t, _Is_ref > _Mymake_t
 
typedef list_node< _Value_t > node_type
 
typedef BidirectionalIterator< _Mytype_titerator
 
typedef ConstBidirectionalIterator< _Mytype_tconst_iterator
 
typedef ReverseBidirectionalIterator< _Mytype_treverse_iterator
 
typedef ReverseBidirectionalIterator< _Mytype_tconst_reverse_iterator
 
typedef int size_type
 
typedef int difference_type
 
typedef _Value_t value_type
 
typedef value_type reference
 
typedef value_type const_reference
 
typedef _Mycont_it generic_container
 
typedef value_type generic_value
 
typedef _STLCLR Generic::ContainerBidirectionalIterator< _Value_t > generic_iterator
 
typedef _STLCLR Generic::ReverseBidirectionalIterator< _Value_t > generic_reverse_iterator
 
typedef _STLCLR BinaryDelegate< value_type, value_type, bool_Valcomp_dt
 
typedef _STLCLR UnaryDelegate< value_type, bool_Valtest_dt
 

Public Member Functions

 list_impl ()
 
list_impl operator= (list_impl%_Right)
 
 list_impl (_Mytype_t%_Right)
 
 list_impl (size_type _Count)
 
 list_impl (size_type _Count, value_type _Val)
 
template<typename _InIt_t >
 list_impl (_InIt_t _First, _InIt_t _Last)
 
template<typename _InIt_t >
void _Construct (_InIt_t _Count, _InIt_t _Val, _Int_iterator_tag%)
 
template<typename _InIt_t >
void _Construct (_InIt_t _First, _InIt_t _Last, input_iterator_tag%)
 
template<typename _InIt_t >
void _Construct (_InIt_t _First, _InIt_t _Last, random_access_iterator_tag%)
 
 list_impl (_Myenum_it^_Right)
 
 ~list_impl ()
 
unsigned long get_generation ()
 
node_type get_node (iterator _Where)
 
node_type front_node ()
 
node_type back_node ()
 
node_type head_node ()
 
reference front ()
 
reference back ()
 
_Myarray_t to_array ()
 
iterator make_iterator (node_type^_Node)
 
iterator begin ()
 
iterator end ()
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
virtual void resize (size_type _Newsize)
 
void resize (size_type _Newsize, value_type _Val)
 
size_type size ()
 
bool empty ()
 
void push_front (value_type _Val)
 
void pop_front ()
 
void push_back (value_type _Val)
 
void pop_back ()
 
void assign (size_type _Count, value_type _Val)
 
void assign (_STLCLR Generic::IInputIterator< _Value_t >^_First, _STLCLR Generic::IInputIterator< _Value_t >^_Last)
 
void assign (_Myenum_it^_Right)
 
void assign (System::Collections::IEnumerable^_Right)
 
iterator insert (iterator _Where, value_type _Val)
 
void insert (iterator _Where, size_type _Count, value_type _Val)
 
void insert (iterator _Where_iter, _STLCLR Generic::IInputIterator< _Value_t >^_First, _STLCLR Generic::IInputIterator< _Value_t >^_Last)
 
void insert (iterator _Where_iter, _Myenum_it^_Right)
 
void insert (iterator _Where_iter, System::Collections::IEnumerable^_Right)
 
void _Insert_safe (_Mynode_t^_Where, _STLCLR Generic::IInputIterator< _Value_t >^_First, _STLCLR Generic::IInputIterator< _Value_t >^_Last)
 
template<typename _InIt_t >
void _Insert_safe (_Mynode_t^_Where, _InIt_t _First, _InIt_t _Last)
 
void insert_node (node_type^_Where, size_type _Count, value_type _Val)
 
node_type insert_node (node_type^_Where, node_type^_First, node_type^_Last)
 
iterator erase (iterator _Where)
 
iterator erase (iterator _First, iterator _Last)
 
node_type erase_node (node_type^_Where)
 
iterator erase_node (node_type^_First, node_type^_Last)
 
void clear ()
 
void swap (_Mytype_t%_Right)
 
void splice (iterator _Where, _Mytype_t%_Right)
 
void splice (iterator _Where, _Mytype_t%_Right, iterator _First)
 
void splice (iterator _Where, _Mytype_t%_Right, iterator _First, iterator _Last)
 
void splice_node (node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
 
size_type unsplice_node (_Mytype_t^_Left, node_type^_First, node_type^_Last)
 
void remove (value_type _Val)
 
void remove_if (_Valtest_dt^_Pred)
 
template<typename _Pr1_t >
void remove_if (_Pr1_t _Pred)
 
void unique ()
 
void unique (_Valcomp_dt^_Pred)
 
template<typename _Pr2_t >
void unique (_Pr2_t _Pred)
 
template<typename _Pr2_t >
void _Unique (_Pr2_t _Pred)
 
void merge (_Mytype_t%_Right)
 
void merge (_Mytype_t%_Right, _Valcomp_dt^_Pred)
 
template<typename _Pr3_t >
void merge (_Mytype_t%_Right, _Pr3_t _Pred)
 
template<typename _Pr3_t >
void _Merge (_Mytype_t%_Right, _Pr3_t _Pred)
 
void sort ()
 
void sort (_Valcomp_dt^_Pred)
 
template<typename _Pr3_t >
void sort (_Pr3_t _Pred)
 
template<typename _Pr3_t >
void _Sort (_Pr3_t _Pred)
 
void reverse ()
 
 return (_Node)
 
node_type _Buynode (node_type^_Next, node_type^_Prev, value_type _Val)
 
virtual System::Object Clone ()
 

Public Attributes

property value_type front_item
 
property value_type back_item
 
_STLCLR_FIELD_ACCESS __pad0__: node_type^ _Buynode() { node_type^ _Node = gcnew node_type(this)
 
_Node _Head = _Node
 
_Node _Next = _Node
 
_Node _Prev = _Node
 
node_type _Myhead
 
size_type _Mysize
 
unsigned long _Mygen
 

Static Public Attributes

static const int _Maxsize = MAX_CONTAINER_SIZE
 

Private Attributes

property size_type Count
 
property bool IsSynchronized
 
property System::Object SyncRoot
 

Member Typedef Documentation

template<typename _Value_t, bool _Is_ref>
typedef cli::array<_Value_t> cliext::impl::list_impl< _Value_t, _Is_ref >::_Myarray_t
template<typename _Value_t, bool _Is_ref>
typedef _STLCLR IList<_Value_t> cliext::impl::list_impl< _Value_t, _Is_ref >::_Mycont_it
template<typename _Value_t, bool _Is_ref>
typedef System::Collections::Generic::IEnumerable<_Value_t> cliext::impl::list_impl< _Value_t, _Is_ref >::_Myenum_it
template<typename _Value_t, bool _Is_ref>
typedef _Cont_make_value<_Value_t, _Is_ref> cliext::impl::list_impl< _Value_t, _Is_ref >::_Mymake_t
template<typename _Value_t, bool _Is_ref>
typedef list_node<_Value_t> cliext::impl::list_impl< _Value_t, _Is_ref >::_Mynode_t
template<typename _Value_t, bool _Is_ref>
typedef list_impl<_Value_t, _Is_ref> cliext::impl::list_impl< _Value_t, _Is_ref >::_Mytype_t
template<typename _Value_t, bool _Is_ref>
typedef _STLCLR BinaryDelegate<value_type, value_type, bool> cliext::impl::list_impl< _Value_t, _Is_ref >::_Valcomp_dt
template<typename _Value_t, bool _Is_ref>
typedef _STLCLR UnaryDelegate<value_type, bool> cliext::impl::list_impl< _Value_t, _Is_ref >::_Valtest_dt
template<typename _Value_t, bool _Is_ref>
typedef ConstBidirectionalIterator<_Mytype_t> cliext::impl::list_impl< _Value_t, _Is_ref >::const_iterator
template<typename _Value_t, bool _Is_ref>
typedef value_type cliext::impl::list_impl< _Value_t, _Is_ref >::const_reference
template<typename _Value_t, bool _Is_ref>
typedef ReverseBidirectionalIterator<_Mytype_t> cliext::impl::list_impl< _Value_t, _Is_ref >::const_reverse_iterator
template<typename _Value_t, bool _Is_ref>
typedef int cliext::impl::list_impl< _Value_t, _Is_ref >::difference_type
template<typename _Value_t, bool _Is_ref>
typedef _Mycont_it cliext::impl::list_impl< _Value_t, _Is_ref >::generic_container
template<typename _Value_t, bool _Is_ref>
typedef _STLCLR Generic::ContainerBidirectionalIterator<_Value_t> cliext::impl::list_impl< _Value_t, _Is_ref >::generic_iterator
template<typename _Value_t, bool _Is_ref>
typedef _STLCLR Generic::ReverseBidirectionalIterator<_Value_t> cliext::impl::list_impl< _Value_t, _Is_ref >::generic_reverse_iterator
template<typename _Value_t, bool _Is_ref>
typedef value_type cliext::impl::list_impl< _Value_t, _Is_ref >::generic_value
template<typename _Value_t, bool _Is_ref>
typedef BidirectionalIterator<_Mytype_t> cliext::impl::list_impl< _Value_t, _Is_ref >::iterator
template<typename _Value_t, bool _Is_ref>
typedef list_node<_Value_t> cliext::impl::list_impl< _Value_t, _Is_ref >::node_type
template<typename _Value_t, bool _Is_ref>
typedef value_type cliext::impl::list_impl< _Value_t, _Is_ref >::reference
template<typename _Value_t, bool _Is_ref>
typedef ReverseBidirectionalIterator<_Mytype_t> cliext::impl::list_impl< _Value_t, _Is_ref >::reverse_iterator
template<typename _Value_t, bool _Is_ref>
typedef int cliext::impl::list_impl< _Value_t, _Is_ref >::size_type
template<typename _Value_t, bool _Is_ref>
typedef _Value_t cliext::impl::list_impl< _Value_t, _Is_ref >::value_type

Constructor & Destructor Documentation

template<typename _Value_t, bool _Is_ref>
cliext::impl::list_impl< _Value_t, _Is_ref >::list_impl ( )
inline
151  : _Mysize(0), _Mygen(0)
152  { // construct empty list
153  _Myhead = _Buynode();
154  }
node_type _Myhead
Definition: list:973
size_type _Mysize
Definition: list:974
unsigned long _Mygen
Definition: list:975
node_type _Buynode(node_type^_Next, node_type^_Prev, value_type _Val)
Definition: list:960
template<typename _Value_t, bool _Is_ref>
cliext::impl::list_impl< _Value_t, _Is_ref >::list_impl ( _Mytype_t _Right)
inline
169  : _Mysize(0), _Mygen(0)
170  { // construct by copying _Right
171  _Myhead = _Buynode();
172  insert_node(head_node(), _Right.front_node(), _Right.head_node());
173  }
node_type _Myhead
Definition: list:973
size_type _Mysize
Definition: list:974
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
unsigned long _Mygen
Definition: list:975
node_type head_node()
Definition: list:264
constexpr const _Ty &() _Right
Definition: algorithm:3723
node_type _Buynode(node_type^_Next, node_type^_Prev, value_type _Val)
Definition: list:960
template<typename _Value_t, bool _Is_ref>
cliext::impl::list_impl< _Value_t, _Is_ref >::list_impl ( size_type  _Count)
inlineexplicit
176  : _Mysize(0), _Mygen(0)
177  { // construct from _Count * value_type()
178  _Myhead = _Buynode();
180  }
node_type _Myhead
Definition: list:973
size_type _Mysize
Definition: list:974
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
_Value_t value_type
Definition: list:131
unsigned long _Mygen
Definition: list:975
_Diff _Count
Definition: algorithm:1941
node_type head_node()
Definition: list:264
node_type _Buynode(node_type^_Next, node_type^_Prev, value_type _Val)
Definition: list:960
template<typename _Value_t, bool _Is_ref>
cliext::impl::list_impl< _Value_t, _Is_ref >::list_impl ( size_type  _Count,
value_type  _Val 
)
inline
183  : _Mysize(0), _Mygen(0)
184  { // construct from _Count * _Val
185  _Myhead = _Buynode();
187  }
node_type _Myhead
Definition: list:973
size_type _Mysize
Definition: list:974
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
unsigned long _Mygen
Definition: list:975
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
node_type head_node()
Definition: list:264
node_type _Buynode(node_type^_Next, node_type^_Prev, value_type _Val)
Definition: list:960
template<typename _Value_t, bool _Is_ref>
template<typename _InIt_t >
cliext::impl::list_impl< _Value_t, _Is_ref >::list_impl ( _InIt_t  _First,
_InIt_t  _Last 
)
inline
191  : _Mysize(0), _Mygen(0)
192  { // construct from [_First, _Last)
193  _Myhead = _Buynode();
194  _Construct(_First, _Last, _Iter_category(_First));
195  }
iterator_traits< _Iter_t >::iterator_category _Iter_category(_Iter_t)
Definition: xutility:654
node_type _Myhead
Definition: list:973
size_type _Mysize
Definition: list:974
void _Construct(_InIt_t _Count, _InIt_t _Val, _Int_iterator_tag%)
Definition: list:198
unsigned long _Mygen
Definition: list:975
_FwdIt _Last
Definition: algorithm:1936
node_type _Buynode(node_type^_Next, node_type^_Prev, value_type _Val)
Definition: list:960
template<typename _Value_t, bool _Is_ref>
cliext::impl::list_impl< _Value_t, _Is_ref >::list_impl ( _Myenum_it _Right)
inline
223  : _Mysize(0), _Mygen(0)
224  { // initialize with enumeration
225  _Myhead = _Buynode();
226  for each (value_type _Val in _Right)
227  push_back(_Val);
228  }
node_type _Myhead
Definition: list:973
size_type _Mysize
Definition: list:974
_Value_t value_type
Definition: list:131
unsigned long _Mygen
Definition: list:975
_FwdIt const _Ty _Val
Definition: algorithm:1938
void push_back(value_type _Val)
Definition: list:395
constexpr const _Ty &() _Right
Definition: algorithm:3723
node_type _Buynode(node_type^_Next, node_type^_Prev, value_type _Val)
Definition: list:960
template<typename _Value_t, bool _Is_ref>
cliext::impl::list_impl< _Value_t, _Is_ref >::~list_impl ( )
inline
232  { // destroy the object
233  clear();
234  _Myhead = nullptr;
235  _Mysize = 0;
236  ++_Mygen;
237  }
node_type _Myhead
Definition: list:973
size_type _Mysize
Definition: list:974
void clear()
Definition: list:670
unsigned long _Mygen
Definition: list:975

Member Function Documentation

template<typename _Value_t, bool _Is_ref>
node_type cliext::impl::list_impl< _Value_t, _Is_ref >::_Buynode ( node_type _Next,
node_type _Prev,
value_type  _Val 
)
inline
962  { // allocate a node and set links
963  node_type^ _Node = gcnew node_type(nullptr);
964 
965  _Node->_Head = _Myhead;
966  _Node->_Next = _Next;
967  _Node->_Prev = _Prev;
968  _Node->_Myval = _Mymake_t::make_value(_Val);
969  return (_Node);
970  }
_Node _Next
Definition: list:955
static _Value_t make_value(_Value_t%_Val)
Definition: xutility:87
node_type _Myhead
Definition: list:973
list_node< _Value_t > node_type
Definition: list:118
_Mytype_t _Next
Definition: list:71
_FwdIt const _Ty _Val
Definition: algorithm:1938
_Node _Prev
Definition: list:956
template<typename _Value_t, bool _Is_ref>
template<typename _InIt_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::_Construct ( _InIt_t  _Count,
_InIt_t  _Val,
_Int_iterator_tag  
)
inline
200  { // initialize with _Count * _Val
202  }
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
_Value_t value_type
Definition: list:131
int size_type
Definition: list:129
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
template<typename _InIt_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::_Construct ( _InIt_t  _First,
_InIt_t  _Last,
input_iterator_tag  
)
inline
207  { // initialize with [_First, _Last), input iterators
208  for (; _First != _Last; ++_First)
209  push_back((value_type)*_First);
210  }
_Value_t value_type
Definition: list:131
_FwdIt _Last
Definition: algorithm:1936
void push_back(value_type _Val)
Definition: list:395
template<typename _Value_t, bool _Is_ref>
template<typename _InIt_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::_Construct ( _InIt_t  _First,
_InIt_t  _Last,
random_access_iterator_tag  
)
inline
215  { // initialize with [_First, _Last), random-access iterators
216  if (_Last < _First)
217  throw gcnew System::ArgumentOutOfRangeException();
218  for (; _First != _Last; ++_First)
219  push_back((value_type)*_First);
220  }
_Value_t value_type
Definition: list:131
_FwdIt _Last
Definition: algorithm:1936
void push_back(value_type _Val)
Definition: list:395
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::_Insert_safe ( _Mynode_t _Where,
_STLCLR Generic::IInputIterator< _Value_t >^  _First,
_STLCLR Generic::IInputIterator< _Value_t >^  _Last 
)
inline
538  { // insert [_First, _Last] at _Where, possibly from this container
539  node_type^ _Oldfirst = front_node();
540 
541  try
542  { // try to build insert list
543  for (; !_First->equal_to(_Last); _First->next())
544  insert_node(_Oldfirst,
545  1, (value_type)_First->get_cref()); // insert at beginning
546  }
547  catch (System::Object^)
548  { // failed, discard new stuff
549  for (; front_node() != _Oldfirst; )
550  pop_front();
551  throw;
552  }
553  splice_node(_Where, this,
554  front_node(), _Oldfirst); // splice new into place
555  }
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
void pop_front()
Definition: list:388
_Value_t value_type
Definition: list:131
_FwdIt _Last
Definition: algorithm:1936
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
template<typename _Value_t, bool _Is_ref>
template<typename _InIt_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::_Insert_safe ( _Mynode_t _Where,
_InIt_t  _First,
_InIt_t  _Last 
)
inline
559  { // insert [_First, _Last] at _Where, possibly from this container
560  node_type^ _Oldfirst = front_node();
561 
562  try
563  { // try to build insert list
564  for (; _First != _Last; ++_First)
565  insert_node(_Oldfirst,
566  1, (value_type)*_First); // insert new at beginning
567  }
568  catch (System::Object^)
569  { // failed, discard new stuff
570  for (; front_node() != _Oldfirst; )
571  pop_front();
572  throw;
573  }
574  splice_node(_Where, this,
575  front_node(), _Oldfirst); // splice new into place
576  }
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
void pop_front()
Definition: list:388
_Value_t value_type
Definition: list:131
_FwdIt _Last
Definition: algorithm:1936
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
template<typename _Value_t, bool _Is_ref>
template<typename _Pr3_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::_Merge ( _Mytype_t _Right,
_Pr3_t  _Pred 
)
inline
858  { // merge in elements from _Right, both ordered by _Pred
859  if ((Object^)this != %_Right)
860  { // safe to merge, do it
861  node_type^ _First1 = front_node();
862  node_type^ _First2 = _Right.front_node();
863 
864  for (; _First1 != head_node() && _First2 != _Right.head_node(); )
865  if (_Pred(_First2->_Myval, _First1->_Myval))
866  { // splice in an element from _Right
867  _First2 = _First2->next_node();
868  splice_node(_First1, %_Right,
869  _First2->prev_node(), _First2);
870  }
871  else
872  _First1 = _First1->next_node();
873 
874  splice_node(head_node(), %_Right, _First2,
875  _Right.head_node());
876  }
877  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
node_type head_node()
Definition: list:264
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
template<typename _Pr3_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::_Sort ( _Pr3_t  _Pred)
inline
897  { // order sequence, using _Pred
898  if (2 <= size())
899  { // worth sorting, do it
900  const size_type _Maxbins = 30;
901  typedef cli::array<list_impl^> _Myarray_t;
902 
903  list_impl^ _Templist = gcnew list_impl;
904  _Myarray_t^ _Binlist = gcnew _Myarray_t(_Maxbins);
905  int _Maxbin = 0;
906  int _Bin;
907  for (; !empty(); )
908  { // sort another element, using bins
909  _Templist->splice_node(_Templist->front_node(), this,
910  front_node(),
911  front_node()->next_node()); // pick an element
912  for (_Bin = 0; _Bin < _Maxbin && !_Binlist[_Bin]->empty();
913  ++_Bin)
914  { // merge into ever larger bins
915  _Binlist[_Bin]->merge(*_Templist, _Pred);
916  _Binlist[_Bin]->swap(*_Templist);
917  }
918  if (_Bin == _Maxbins)
919  _Binlist[_Bin - 1]->merge(*_Templist, _Pred);
920  else
921  { // spill to empty or new bin, while they last
922  if (_Bin == _Maxbin)
923  { // start a new bin
924  _Binlist[_Bin] = gcnew list_impl;
925  ++_Maxbin;
926  }
927  _Binlist[_Bin]->swap(*_Templist);
928  }
929  }
930  for (_Bin = 1; _Bin < _Maxbin; ++_Bin)
931  _Binlist[_Bin]->merge(*_Binlist[_Bin - 1], _Pred);
932  splice_node(head_node(), _Binlist[_Maxbin - 1],
933  _Binlist[_Maxbin - 1]->front_node(),
934  _Binlist[_Maxbin - 1]->head_node());
935  }
936  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
list_impl()
Definition: list:150
cli::array< _Value_t > _Myarray_t
Definition: list:114
void merge(_Mytype_t%_Right)
Definition: list:840
_Mytype_t next_node()
Definition: list:37
node_type front_node()
Definition: list:254
int size_type
Definition: list:129
bool empty()
Definition: list:377
node_type head_node()
Definition: list:264
size_type size()
Definition: list:372
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
template<typename _Value_t, bool _Is_ref>
template<typename _Pr2_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::_Unique ( _Pr2_t  _Pred)
inline
828  { // erase each element satisfying _Pred with previous
829  if (2 <= size())
830  { // worth doing, do it
831  for (node_type^ _First = front_node();
832  _First->next_node() != head_node(); )
833  if (_Pred(_First->_Myval, _First->next_node()->_Myval))
834  erase_node(_First->next_node());
835  else
836  _First = _First->next_node();
837  }
838  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
_Mytype_t next_node()
Definition: list:37
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
node_type erase_node(node_type^_Where)
Definition: list:645
node_type head_node()
Definition: list:264
size_type size()
Definition: list:372
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::assign ( size_type  _Count,
value_type  _Val 
)
inline
408  { // assign _Count * _Val
409  clear();
411  }
void clear()
Definition: list:670
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::assign ( _STLCLR Generic::IInputIterator< _Value_t >^  _First,
_STLCLR Generic::IInputIterator< _Value_t >^  _Last 
)
inline
415  { // assign [_First, _Last)
416  if (_First->container() != this)
417  clear();
418 
419  size_type _Oldsize = size();
420 
421  _Insert_safe(front_node(), _First, _Last);
422  for (; 0 < _Oldsize; --_Oldsize)
423  pop_back(); // discard old stuff
424  }
node_type front_node()
Definition: list:254
void clear()
Definition: list:670
void pop_back()
Definition: list:400
int size_type
Definition: list:129
void _Insert_safe(_Mynode_t^_Where, _STLCLR Generic::IInputIterator< _Value_t >^_First, _STLCLR Generic::IInputIterator< _Value_t >^_Last)
Definition: list:535
_FwdIt _Last
Definition: algorithm:1936
size_type size()
Definition: list:372
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::assign ( _Myenum_it _Right)
inline
427  { // initialize with enumeration
428  node_type^ _Oldfirst = front_node();
429 
430  try
431  { // try to build insert list
432  for each (value_type _Val in _Right)
433  insert_node(_Oldfirst, // insert new at beginning
434  1, _Val);
435  }
436  catch (System::Object^)
437  { // failed, discard new stuff
438  for (; front_node() != _Oldfirst; )
439  pop_front();
440  throw;
441  }
442  for (; _Oldfirst != head_node(); )
443  _Oldfirst = erase_node(_Oldfirst); // discard old stuff
444  }
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
void pop_front()
Definition: list:388
_Value_t value_type
Definition: list:131
node_type erase_node(node_type^_Where)
Definition: list:645
_FwdIt const _Ty _Val
Definition: algorithm:1938
node_type head_node()
Definition: list:264
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::assign ( System::Collections::IEnumerable^  _Right)
inline
447  { // initialize with enumeration
448  node_type^ _Oldfirst = front_node();
449 
450  try
451  { // try to build insert list
452  for each (value_type _Val in _Right)
453  insert_node(_Oldfirst, // insert new at beginning
454  1, _Val);
455  }
456  catch (System::Object^)
457  { // failed, discard new stuff
458  for (; front_node() != _Oldfirst; )
459  pop_front();
460  throw;
461  }
462  for (; _Oldfirst != head_node(); )
463  _Oldfirst = erase_node(_Oldfirst); // discard old stuff
464  }
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
void pop_front()
Definition: list:388
_Value_t value_type
Definition: list:131
node_type erase_node(node_type^_Where)
Definition: list:645
_FwdIt const _Ty _Val
Definition: algorithm:1938
node_type head_node()
Definition: list:264
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
reference cliext::impl::list_impl< _Value_t, _Is_ref >::back ( )
inline
305  { // get last element of mutable sequence
306  if (empty())
307  throw gcnew System::NullReferenceException();
308  return (back_node()->_Myval);
309  }
node_type back_node()
Definition: list:259
bool empty()
Definition: list:377
template<typename _Value_t, bool _Is_ref>
node_type cliext::impl::list_impl< _Value_t, _Is_ref >::back_node ( )
inline
260  { // return rightmost node in tree
261  return (head_node()->_Prev); // avoid usual check
262  }
node_type head_node()
Definition: list:264
_Node _Prev
Definition: list:956
template<typename _Value_t, bool _Is_ref>
iterator cliext::impl::list_impl< _Value_t, _Is_ref >::begin ( )
inline
332  { // return iterator for beginning of mutable sequence
333  return (make_iterator(front_node()));
334  }
node_type front_node()
Definition: list:254
iterator make_iterator(node_type^_Node)
Definition: list:326
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::clear ( )
inline
671  { // erase all
672  for (; front_node() != head_node(); )
674  }
node_type front_node()
Definition: list:254
node_type erase_node(node_type^_Where)
Definition: list:645
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
virtual System::Object cliext::impl::list_impl< _Value_t, _Is_ref >::Clone ( )
inlinevirtual

Reimplemented in cliext::list< _Value_t >.

980  { // clone the list
981  return (gcnew list_impl(*this));
982  }
list_impl()
Definition: list:150
template<typename _Value_t, bool _Is_ref>
bool cliext::impl::list_impl< _Value_t, _Is_ref >::empty ( )
inline
378  { // test if sequence is empty
379  return (size() == 0);
380  }
size_type size()
Definition: list:372
template<typename _Value_t, bool _Is_ref>
iterator cliext::impl::list_impl< _Value_t, _Is_ref >::end ( )
inline
337  { // return iterator for end of mutable sequence
338  return (make_iterator(head_node()));
339  }
iterator make_iterator(node_type^_Node)
Definition: list:326
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
iterator cliext::impl::list_impl< _Value_t, _Is_ref >::erase ( iterator  _Where)
inline
634  { // erase element at _Where
635  node_type^ _Node = get_node(_Where);
636 
637  return (make_iterator(erase_node(_Node)));
638  }
node_type get_node(iterator _Where)
Definition: list:245
iterator make_iterator(node_type^_Node)
Definition: list:326
list_node< _Value_t > node_type
Definition: list:118
node_type erase_node(node_type^_Where)
Definition: list:645
template<typename _Value_t, bool _Is_ref>
iterator cliext::impl::list_impl< _Value_t, _Is_ref >::erase ( iterator  _First,
iterator  _Last 
)
inline
641  { // erase [_First, _Last)
642  return (erase_node(get_node(_First), get_node(_Last)));
643  }
node_type get_node(iterator _Where)
Definition: list:245
node_type erase_node(node_type^_Where)
Definition: list:645
template<typename _Value_t, bool _Is_ref>
node_type cliext::impl::list_impl< _Value_t, _Is_ref >::erase_node ( node_type _Where)
inline
646  { // erase node at _Where
647  if (_Where->container() != this || _Where->is_head())
648  throw gcnew System::InvalidOperationException();
649 
650  _Mymake_t::unmake_value(_Where->_Myval);
651  _Where->_Head = nullptr; // orphan corresponding iterators
652  _Where->_Prev->_Next = _Where->_Next;
653  _Where = _Where->_Next;
654  _Where->_Prev = _Where->_Prev->_Prev;
655  --_Mysize;
656  ++_Mygen;
657  return (_Where);
658  }
size_type _Mysize
Definition: list:974
unsigned long _Mygen
Definition: list:975
static void unmake_value(_Value_t%)
Definition: xutility:92
template<typename _Value_t, bool _Is_ref>
iterator cliext::impl::list_impl< _Value_t, _Is_ref >::erase_node ( node_type _First,
node_type _Last 
)
inline
661  { // erase nodes in [_First, _Last)
662  if (_First == nullptr || _First->container() != this)
663  throw gcnew System::ArgumentException();
664 
665  for (; _First != _Last; )
666  _First = erase_node(_First);
667  return (make_iterator(_First));
668  }
iterator make_iterator(node_type^_Node)
Definition: list:326
node_type erase_node(node_type^_Where)
Definition: list:645
_FwdIt _Last
Definition: algorithm:1936
template<typename _Value_t, bool _Is_ref>
reference cliext::impl::list_impl< _Value_t, _Is_ref >::front ( )
inline
298  { // get first element of mutable sequence
299  if (empty())
300  throw gcnew System::NullReferenceException();
301  return (front_node()->_Myval);
302  }
node_type front_node()
Definition: list:254
bool empty()
Definition: list:377
template<typename _Value_t, bool _Is_ref>
node_type cliext::impl::list_impl< _Value_t, _Is_ref >::front_node ( )
inline
255  { // return leftmost node in tree
256  return (head_node()->_Next); // avoid usual check
257  }
_Node _Next
Definition: list:955
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
unsigned long cliext::impl::list_impl< _Value_t, _Is_ref >::get_generation ( )
inline
241  { // get underlying container generation
242  return (_Mygen);
243  }
unsigned long _Mygen
Definition: list:975
template<typename _Value_t, bool _Is_ref>
node_type cliext::impl::list_impl< _Value_t, _Is_ref >::get_node ( iterator  _Where)
inline
246  { // get node from valid iterator
247  node_type^ _Node = (node_type^)_Where.get_node();
248 
249  if (_Node->container() != (System::Object^)this)
250  throw gcnew System::InvalidOperationException();
251  return (_Node);
252  }
list_node< _Value_t > node_type
Definition: list:118
template<typename _Value_t, bool _Is_ref>
node_type cliext::impl::list_impl< _Value_t, _Is_ref >::head_node ( )
inline
265  { // get head node
266  return (_Myhead);
267  }
node_type _Myhead
Definition: list:973
template<typename _Value_t, bool _Is_ref>
iterator cliext::impl::list_impl< _Value_t, _Is_ref >::insert ( iterator  _Where,
value_type  _Val 
)
inline
467  { // insert _Val at _Where
468  insert_node(get_node(_Where), 1, _Val);
469  return (--_Where);
470  }
node_type get_node(iterator _Where)
Definition: list:245
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::insert ( iterator  _Where,
size_type  _Count,
value_type  _Val 
)
inline
474  { // insert _Count * _Val at _Where
475  insert_node(get_node(_Where), _Count, _Val);
476  }
node_type get_node(iterator _Where)
Definition: list:245
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::insert ( iterator  _Where_iter,
_STLCLR Generic::IInputIterator< _Value_t >^  _First,
_STLCLR Generic::IInputIterator< _Value_t >^  _Last 
)
inline
481  { // insert [_First, _Last) at _Where, input iterators
482  node_type^ _Where = get_node(_Where_iter);
483 
484  if (_First->container() == this)
485  _Insert_safe(_Where, _First, _Last);
486  else
487  for (; !_First->equal_to(_Last); _First->next())
488  insert_node(_Where, 1, (value_type)_First->get_cref());
489  }
node_type get_node(iterator _Where)
Definition: list:245
list_node< _Value_t > node_type
Definition: list:118
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
_Value_t value_type
Definition: list:131
void _Insert_safe(_Mynode_t^_Where, _STLCLR Generic::IInputIterator< _Value_t >^_First, _STLCLR Generic::IInputIterator< _Value_t >^_Last)
Definition: list:535
_FwdIt _Last
Definition: algorithm:1936
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::insert ( iterator  _Where_iter,
_Myenum_it _Right 
)
inline
493  { // insert enumeration at _Where, possibly from this container
494  node_type^ _Where = get_node(_Where_iter);
495  node_type^ _Oldfirst = front_node();
496 
497  try
498  { // try to build insert list
499  for each (value_type _Val in _Right)
500  insert_node(_Oldfirst, // insert new at beginning
501  1, _Val);
502  }
503  catch (System::Object^)
504  { // failed, discard new stuff
505  for (; front_node() != _Oldfirst; )
506  pop_front();
507  throw;
508  }
509  splice_node(_Where, this,
510  front_node(), _Oldfirst); // splice new into place
511  }
node_type get_node(iterator _Where)
Definition: list:245
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
void pop_front()
Definition: list:388
_Value_t value_type
Definition: list:131
_FwdIt const _Ty _Val
Definition: algorithm:1938
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::insert ( iterator  _Where_iter,
System::Collections::IEnumerable^  _Right 
)
inline
515  { // insert enumeration at _Where, possibly from this container
516  node_type^ _Where = get_node(_Where_iter);
517  node_type^ _Oldfirst = front_node();
518 
519  try
520  { // try to build insert list
521  for each (value_type _Val in _Right)
522  insert_node(_Oldfirst, // insert new at beginning
523  1, _Val);
524  }
525  catch (System::Object^)
526  { // failed, discard new stuff
527  for (; front_node() != _Oldfirst; )
528  pop_front();
529  throw;
530  }
531  splice_node(_Where, this,
532  front_node(), _Oldfirst); // splice new into place
533  }
node_type get_node(iterator _Where)
Definition: list:245
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
void pop_front()
Definition: list:388
_Value_t value_type
Definition: list:131
_FwdIt const _Ty _Val
Definition: algorithm:1938
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::insert_node ( node_type _Where,
size_type  _Count,
value_type  _Val 
)
inline
580  { // insert _Count * _Val at _Where
581  size_type _Added = 0;
582 
583  if ((System::Object^)_Where->container() != this)
584  throw gcnew System::ArgumentException();
585 
586  if (_Count < 0 || _Maxsize - size() < _Count)
587  throw gcnew System::ArgumentOutOfRangeException();
588  try
589  { // try to insert _Count copies
590  for (; _Added < _Count; ++_Added)
591  { // insert a node at _Where
592  node_type^ _Node = _Buynode(_Where, _Where->_Prev, _Val);
593 
594  _Where->_Prev = _Node;
595  _Node->_Prev->_Next = _Node;
596  ++_Mysize;
597  }
598  }
599  catch (System::Object^)
600  { // failed, discard new stuff
601  for (; 0 < _Added; --_Added)
602  erase_node(_Where->prev_node());
603  }
604 
605  if (0 < _Added)
606  ++_Mygen;
607  }
static const int _Maxsize
Definition: list:147
size_type _Mysize
Definition: list:974
list_node< _Value_t > node_type
Definition: list:118
int size_type
Definition: list:129
unsigned long _Mygen
Definition: list:975
node_type erase_node(node_type^_Where)
Definition: list:645
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
size_type size()
Definition: list:372
node_type _Buynode(node_type^_Next, node_type^_Prev, value_type _Val)
Definition: list:960
template<typename _Value_t, bool _Is_ref>
node_type cliext::impl::list_impl< _Value_t, _Is_ref >::insert_node ( node_type _Where,
node_type _First,
node_type _Last 
)
inline
611  { // insert copy of list subrange
612  size_type _Added = 0;
613 
614  if (_Where->container() != this)
615  throw gcnew System::ArgumentException();
616 
617  try
618  { // try to insert _Count copies
619  for (; _First != _Last; _First = _First->next_node(), ++_Added)
620  insert_node(_Where, 1, _First->_Myval);
621  }
622  catch (System::Object^)
623  { // failed, discard new stuff
624  for (; 0 < _Added; --_Added)
625  erase_node(_Where->prev_node());
626  }
627 
628  if (0 < _Added)
629  ++_Mygen;
630  return (_Where);
631  }
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
int size_type
Definition: list:129
unsigned long _Mygen
Definition: list:975
node_type erase_node(node_type^_Where)
Definition: list:645
_FwdIt _Last
Definition: algorithm:1936
template<typename _Value_t, bool _Is_ref>
iterator cliext::impl::list_impl< _Value_t, _Is_ref >::make_iterator ( node_type _Node)
inline
327  { // return iterator for node
328  return (iterator(_Node));
329  }
BidirectionalIterator< _Mytype_t > iterator
Definition: list:121
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::merge ( _Mytype_t _Right)
inline
841  { // merge in elements from _Right, both ordered by operator<
843  }
void _Merge(_Mytype_t%_Right, _Pr3_t _Pred)
Definition: list:857
Definition: xstddef:226
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::merge ( _Mytype_t _Right,
_Valcomp_dt _Pred 
)
inline
846  { // merge in elements from _Right, both ordered by _Pred
847  _Merge(_Right, _Pred);
848  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Merge(_Mytype_t%_Right, _Pr3_t _Pred)
Definition: list:857
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
template<typename _Pr3_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::merge ( _Mytype_t _Right,
_Pr3_t  _Pred 
)
inline
852  { // merge in elements from _Right, both ordered by _Pred
853  _Merge(_Right, _Pred);
854  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Merge(_Mytype_t%_Right, _Pr3_t _Pred)
Definition: list:857
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
list_impl cliext::impl::list_impl< _Value_t, _Is_ref >::operator= ( list_impl< _Value_t, _Is_ref >%  _Right)
inline
157  { // assign
158  if ((Object^)this != %_Right)
159  { // worth doing, do it
160  clear();
162  _Right.front_node(), _Right.head_node());
163  }
164  return (*this);
165  }
void clear()
Definition: list:670
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
node_type head_node()
Definition: list:264
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::pop_back ( )
inline
401  { // erase element at end
402  if (empty())
403  throw gcnew System::InvalidOperationException();
404  erase_node(back_node()); // discard from end
405  }
node_type back_node()
Definition: list:259
bool empty()
Definition: list:377
node_type erase_node(node_type^_Where)
Definition: list:645
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::pop_front ( )
inline
389  { // erase element at beginning
390  if (empty())
391  throw gcnew System::InvalidOperationException();
392  erase_node(front_node()); // discard from beginning
393  }
node_type front_node()
Definition: list:254
bool empty()
Definition: list:377
node_type erase_node(node_type^_Where)
Definition: list:645
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::push_back ( value_type  _Val)
inline
396  { // insert element at end
397  insert_node(head_node(), 1, _Val);
398  }
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
_FwdIt const _Ty _Val
Definition: algorithm:1938
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::push_front ( value_type  _Val)
inline
384  { // insert element at beginning
385  insert_node(front_node(), 1, _Val);
386  }
node_type front_node()
Definition: list:254
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<typename _Value_t, bool _Is_ref>
reverse_iterator cliext::impl::list_impl< _Value_t, _Is_ref >::rbegin ( )
inline
342  { // return reverse iterator for beginning of mutable sequence
343  return (reverse_iterator(end()));
344  }
ReverseBidirectionalIterator< _Mytype_t > reverse_iterator
Definition: list:125
iterator end()
Definition: list:336
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::remove ( value_type  _Val)
inline
780  { // erase each element matching _Val
781  for (node_type^ _First = front_node(); _First != head_node(); )
782  { // point past element and test it
783  _First = _First->next_node();
784  if (_First->prev_node()->_Myval == _Val)
785  erase_node(_First->prev_node());
786  }
787  }
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
node_type erase_node(node_type^_Where)
Definition: list:645
_FwdIt const _Ty _Val
Definition: algorithm:1938
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::remove_if ( _Valtest_dt _Pred)
inline
790  { // erase each element satisfying _Pred
791  for (node_type^ _First = front_node(); _First != head_node(); )
792  { // point past element and test it
793  _First = _First->next_node();
794  if (_Pred(_First->prev_node()->_Myval))
795  erase_node(_First->prev_node());
796  }
797  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
node_type erase_node(node_type^_Where)
Definition: list:645
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
template<typename _Pr1_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::remove_if ( _Pr1_t  _Pred)
inline
801  { // erase each element satisfying _Pred
802  for (node_type^ _First = front_node(); _First != head_node(); )
803  { // point past element and test it
804  _First = _First->next_node();
805  if (_Pred(_First->prev_node()->_Myval))
806  erase_node(_First->prev_node());
807  }
808  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
node_type erase_node(node_type^_Where)
Definition: list:645
node_type head_node()
Definition: list:264
template<typename _Value_t, bool _Is_ref>
reverse_iterator cliext::impl::list_impl< _Value_t, _Is_ref >::rend ( )
inline
347  { // return reverse iterator for end of mutable sequence
348  return (reverse_iterator(begin()));
349  }
ReverseBidirectionalIterator< _Mytype_t > reverse_iterator
Definition: list:125
iterator begin()
Definition: list:331
template<typename _Value_t, bool _Is_ref>
virtual void cliext::impl::list_impl< _Value_t, _Is_ref >::resize ( size_type  _Newsize)
inlinevirtual
356  { // determine new length, padding with value_type elements
357  resize(_Newsize, value_type());
358  }
virtual void resize(size_type _Newsize)
Definition: list:355
_Value_t value_type
Definition: list:131
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::resize ( size_type  _Newsize,
value_type  _Val 
)
inline
361  { // determine new length, padding with _Val elements
362  if (_Newsize < 0)
363  throw gcnew System::ArgumentOutOfRangeException();
364 
365  if (size() < _Newsize)
366  insert_node(head_node(), _Newsize - size(), _Val);
367  else
368  for (; _Newsize < size(); )
369  pop_back(); // discard from end
370  }
void insert_node(node_type^_Where, size_type _Count, value_type _Val)
Definition: list:578
void pop_back()
Definition: list:400
_FwdIt const _Ty _Val
Definition: algorithm:1938
node_type head_node()
Definition: list:264
size_type size()
Definition: list:372
template<typename _Value_t, bool _Is_ref>
cliext::impl::list_impl< _Value_t, _Is_ref >::return ( _Node  )
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::reverse ( )
inline
939  { // reverse sequence
940  if (2 <= size())
941  for (node_type^ _Node = front_node()->next_node();
942  _Node != head_node(); )
943  { // move next element to beginning
944  _Node = _Node->_Next;
945  splice_node(front_node(), this, _Node->_Prev, _Node);
946  }
947  }
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
_Mytype_t _Prev
Definition: list:72
node_type head_node()
Definition: list:264
size_type size()
Definition: list:372
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
template<typename _Value_t, bool _Is_ref>
size_type cliext::impl::list_impl< _Value_t, _Is_ref >::size ( )
inline
373  { // return length of sequence
374  return (_Mysize);
375  }
size_type _Mysize
Definition: list:974
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::sort ( )
inline
880  { // order sequence, using operator<
882  }
void _Sort(_Pr3_t _Pred)
Definition: list:896
Definition: xstddef:226
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::sort ( _Valcomp_dt _Pred)
inline
885  { // order sequence, using _Pred
886  _Sort(_Pred);
887  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Sort(_Pr3_t _Pred)
Definition: list:896
template<typename _Value_t, bool _Is_ref>
template<typename _Pr3_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::sort ( _Pr3_t  _Pred)
inline
891  { // order sequence, using _Pred
892  _Sort(_Pred);
893  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Sort(_Pr3_t _Pred)
Definition: list:896
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::splice ( iterator  _Where,
_Mytype_t _Right 
)
inline
694  { // splice all of _Right at _Where
695  splice_node(get_node(_Where), %_Right,
696  _Right.front_node(), _Right.head_node());
697  }
node_type get_node(iterator _Where)
Definition: list:245
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::splice ( iterator  _Where,
_Mytype_t _Right,
iterator  _First 
)
inline
700  { // splice _Right [_First, _First + 1) at _Where
701  node_type^ _Node = _Right.get_node(_First);
702 
703  splice_node(get_node(_Where), %_Right,
704  _Node, _Node->next_node());
705  }
node_type get_node(iterator _Where)
Definition: list:245
list_node< _Value_t > node_type
Definition: list:118
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::splice ( iterator  _Where,
_Mytype_t _Right,
iterator  _First,
iterator  _Last 
)
inline
709  { // splice _Right [_First, _First + 1) at _Where
710  splice_node(get_node(_Where), %_Right,
711  _Right.get_node(_First), _Right.get_node(_Last));
712  }
node_type get_node(iterator _Where)
Definition: list:245
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::splice_node ( node_type _Where,
_Mytype_t _Right,
node_type _First,
node_type _Last 
)
inline
716  { // splice _Right [_First, _Last) before _Where
717  if (_Where->container() != this
718  || _First->container() != _Right)
719  throw gcnew System::ArgumentException();
720 
721  if (_First == _Last)
722  ; // nothing to do
723  else if ((Object^)this != _Right)
724  { // get sublist from another list
725  node_type^ _Nlast = _Last->_Prev;
726 
727  _Mysize += _Right->unsplice_node(this, _First, _Last);
728  _Nlast->_Next = _Where;
729  _Where->_Prev->_Next = _First;
730  _First->_Prev = _Where->_Prev;
731  _Where->_Prev = _Nlast;
732  ++_Mygen;
733  }
734  else if (_First != _Where && _Where != _Last)
735  { // worth splicing, do it
736  node_type^ _Node = _Where->_Prev;
737 
738  _First->_Prev->_Next = _Last;
739  _Last->_Prev->_Next = _Where;
740  _Where->_Prev->_Next = _First;
741  _Where->_Prev = _Last->_Prev;
742  _Last->_Prev = _First->_Prev;
743  _First->_Prev = _Node;
744  ++_Mygen;
745  }
746  }
size_type _Mysize
Definition: list:974
list_node< _Value_t > node_type
Definition: list:118
unsigned long _Mygen
Definition: list:975
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::swap ( _Mytype_t _Right)
inline
677  { // exchange contents with _Right
678  if ((Object^)this != %_Right)
679  { // worth doing, swap
680  node_type^ _Oldfirst = front_node();
681 
682  splice_node(_Oldfirst, %_Right,
683  _Right.front_node(), _Right.head_node());
684  _Right.splice_node(_Right.head_node(), this,
685  _Oldfirst, head_node());
686 
687  ++_Mygen;
688  ++_Right._Mygen;
689  }
690  }
node_type front_node()
Definition: list:254
list_node< _Value_t > node_type
Definition: list:118
unsigned long _Mygen
Definition: list:975
node_type head_node()
Definition: list:264
void splice_node(node_type^_Where, _Mytype_t^_Right, node_type^_First, node_type^_Last)
Definition: list:714
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<typename _Value_t, bool _Is_ref>
_Myarray_t cliext::impl::list_impl< _Value_t, _Is_ref >::to_array ( )
inline
313  { // convert to array
314  _Myarray_t^ _Ans = gcnew _Myarray_t(size());
315  node_type^ _Node = head_node();
316 
317  for (int _Idx = size(); 0 <= --_Idx; )
318  { // copy back to front
319  _Node = _Node->prev_node();
320  _Ans[_Idx] = _Mymake_t::make_value(_Node->_Myval);
321  }
322  return (_Ans);
323  }
static _Value_t make_value(_Value_t%_Val)
Definition: xutility:87
cli::array< _Value_t > _Myarray_t
Definition: list:114
list_node< _Value_t > node_type
Definition: list:118
node_type head_node()
Definition: list:264
size_type size()
Definition: list:372
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::unique ( )
inline
811  { // erase each element matching previous
813  }
void _Unique(_Pr2_t _Pred)
Definition: list:827
Definition: xstddef:212
template<typename _Value_t, bool _Is_ref>
void cliext::impl::list_impl< _Value_t, _Is_ref >::unique ( _Valcomp_dt _Pred)
inline
816  { // erase each element satisfying _Pred with previous
817  _Unique(_Pred);
818  }
void _Unique(_Pr2_t _Pred)
Definition: list:827
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
template<typename _Value_t, bool _Is_ref>
template<typename _Pr2_t >
void cliext::impl::list_impl< _Value_t, _Is_ref >::unique ( _Pr2_t  _Pred)
inline
822  { // erase each element satisfying _Pred with previous
823  _Unique(_Pred);
824  }
void _Unique(_Pr2_t _Pred)
Definition: list:827
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
template<typename _Value_t, bool _Is_ref>
size_type cliext::impl::list_impl< _Value_t, _Is_ref >::unsplice_node ( _Mytype_t _Left,
node_type _First,
node_type _Last 
)
inline
750  { // unsplice [_First, _Last) to give to _Left
751  if (_First->container() != this)
752  throw gcnew System::InvalidOperationException();
753 
754  size_type _Count = 0;
755  node_type^ _Node = _First;
756 
757  for (; _Node != _Last && !_Node->is_head();
758  _Node = _Node->_Next, ++_Count)
759  _Node->_Head = _Left->head_node(); // change ownership
760 
761  if (_Node != _Last || _Maxsize - _Left->size() < _Count)
762  { // invalid splice, back out
763  for (; _First != _Node; _First = _First->_Next)
764  _Node->_Head = _Myhead; // revert ownership
765 
766  if (_Node != _Last)
767  throw gcnew System::InvalidOperationException();
768  else
769  throw gcnew System::ArgumentOutOfRangeException();
770  }
771 
772  _First->_Prev->_Next = _Last; // remove sublist
773  _Last->_Prev = _First->_Prev;
774  _Mysize -= _Count;
775  ++_Mygen;
776  return (_Count);
777  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
node_type _Myhead
Definition: list:973
static const int _Maxsize
Definition: list:147
size_type _Mysize
Definition: list:974
if(_Source==NULL||_DestinationSize< _SourceSize)
Definition: corecrt_memcpy_s.h:48
list_node< _Value_t > node_type
Definition: list:118
int size_type
Definition: list:129
unsigned long _Mygen
Definition: list:975
_Diff _Count
Definition: algorithm:1941
_FwdIt _Last
Definition: algorithm:1936

Member Data Documentation

template<typename _Value_t, bool _Is_ref>
_STLCLR_FIELD_ACCESS cliext::impl::list_impl< _Value_t, _Is_ref >::__pad0__
template<typename _Value_t, bool _Is_ref>
_Node cliext::impl::list_impl< _Value_t, _Is_ref >::_Head = _Node
template<typename _Value_t, bool _Is_ref>
const int cliext::impl::list_impl< _Value_t, _Is_ref >::_Maxsize = MAX_CONTAINER_SIZE
static
template<typename _Value_t, bool _Is_ref>
unsigned long cliext::impl::list_impl< _Value_t, _Is_ref >::_Mygen
template<typename _Value_t, bool _Is_ref>
node_type cliext::impl::list_impl< _Value_t, _Is_ref >::_Myhead
template<typename _Value_t, bool _Is_ref>
size_type cliext::impl::list_impl< _Value_t, _Is_ref >::_Mysize
template<typename _Value_t, bool _Is_ref>
_Node cliext::impl::list_impl< _Value_t, _Is_ref >::_Next = _Node
template<typename _Value_t, bool _Is_ref>
_Node cliext::impl::list_impl< _Value_t, _Is_ref >::_Prev = _Node
template<typename _Value_t, bool _Is_ref>
property value_type cliext::impl::list_impl< _Value_t, _Is_ref >::back_item
Initial value:
{
virtual value_type get()
{
return (back());
}
virtual void set(value_type _Val)
{
}
}
template<typename _Value_t, bool _Is_ref>
property size_type cliext::impl::list_impl< _Value_t, _Is_ref >::Count
private
Initial value:
{
virtual size_type get() sealed
{
return (size());
}
}
template<typename _Value_t, bool _Is_ref>
property value_type cliext::impl::list_impl< _Value_t, _Is_ref >::front_item
Initial value:
{
virtual value_type get()
{
return (front());
}
virtual void set(value_type _Val)
{
}
}
template<typename _Value_t, bool _Is_ref>
property bool cliext::impl::list_impl< _Value_t, _Is_ref >::IsSynchronized
private
Initial value:
{
virtual bool get() sealed
{
return (false);
}
}
template<typename _Value_t, bool _Is_ref>
property System::Object cliext::impl::list_impl< _Value_t, _Is_ref >::SyncRoot
private
Initial value:
{
virtual System::Object^ get() sealed
{
return (this);
}
}

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