DeSiGNAR  0.5a
Data Structures General Library
list.H
Go to the documentation of this file.
1 /*
2  This file is part of Designar.
3  Copyright (C) 2017 by Alejandro J. Mujica
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  Any user request of this software, write to
19 
20  Alejandro Mujica
21 
22  aledrums@gmail.com
23 */
24 
25 # ifndef DSGLIST_H
26 # define DSGLIST_H
27 
28 # include <nodesdef.H>
29 # include <containeralgorithms.H>
30 
31 namespace Designar
32 {
33 
34  template <typename T>
35  class NodeSLList
36  {
37  public:
38  using Node = SLNode<T>;
39 
40  private:
41  Node * head;
42  Node * tail;
43 
44  void add_to_empty_list(Node * node)
45  {
46  assert(head == nullptr);
47  assert(tail == nullptr);
48  head = tail = node;
49  }
50 
51  public:
53  : head(nullptr), tail(nullptr)
54  {
55  // empty
56  }
57 
58  NodeSLList(const NodeSLList &) = delete;
59 
61  : NodeSLList()
62  {
63  swap(l);
64  }
65 
66  NodeSLList & operator = (const NodeSLList &) = delete;
67 
69  {
70  swap(l);
71  return *this;
72  }
73 
74  void swap(NodeSLList & l)
75  {
76  std::swap(head, l.head);
77  std::swap(tail, l.tail);
78  }
79 
80  bool is_empty() const
81  {
82  return head == nullptr;
83  }
84 
85  bool is_unitarian_or_empty() const
86  {
87  return head == tail;
88  }
89 
90  bool is_unitarian() const
91  {
92  return head == tail and head != nullptr;
93  }
94 
95  void insert(Node * node)
96  {
97  if (head == nullptr)
98  add_to_empty_list(node);
99  else
100  {
101  node->get_next() = head;
102  head = node;
103  }
104  }
105 
106  void append(Node * node)
107  {
108  if (head == nullptr)
109  add_to_empty_list(node);
110  else
111  {
112  tail->insert_next(node);
113  tail = node;
114  }
115  }
116 
118  {
119  return head;
120  }
121 
122  const Node *& get_first() const
123  {
124  return (const Node *&) head;
125  }
126 
128  {
129  return tail;
130  }
131 
132  const Node *& get_last() const
133  {
134  return (const Node *&) tail;
135  }
136 
138  {
139  if (head == nullptr)
140  return nullptr;
141 
142  Node * ret_val = head;
143  head = ret_val->get_next();
144  ret_val->reset();
145 
146  if (head == nullptr)
147  tail = nullptr;
148 
149  return ret_val;
150  }
151 
152  void concat(NodeSLList * l)
153  {
154  if (l->is_empty())
155  return;
156 
157  if (this->is_empty())
158  {
159  this->head = l->head;
160  this->tail = l->tail;
161  }
162  else
163  {
164  this->tail->get_next() = l->head;
165  this->tail = l->tail;
166  }
167 
168  l->head = l->tail = nullptr;
169  }
170 
171  void concat(NodeSLList & l)
172  {
173  concat(&l);
174  }
175 
176  void split(NodeSLList &, NodeSLList &);
177  };
178 
179  template <typename T>
181  {
182  assert(l.is_empty());
183  assert(r.is_empty());
184 
185  while (not this->is_empty())
186  {
187  l->append(this->remove_first());
188 
189  if (not l->is_empty())
190  r->append(this->remove_first());
191  }
192  }
193 
194  template <typename T>
195  class SLList : public NodeSLList<T>,
196  public ContainerAlgorithms<SLList<T>, T>
197  {
198  using Node = SLNode<T>;
199  using BaseList = NodeSLList<T>;
200 
201  nat_t num_items;
202 
203  void copy_list(const SLList &);
204 
205  void empty_list();
206 
207  public:
208  using ItemType = T;
209  using KeyType = T;
210  using DataType = T;
211  using ValueType = T;
212  using SizeType = nat_t;
213 
215  : BaseList(), num_items(0)
216  {
217  // empty
218  }
219 
220  SLList(const SLList & l)
221  : SLList()
222  {
223  copy_list(l);
224  }
225 
227  : SLList()
228  {
229  this->swap(l);
230  }
231 
232  SLList(const std::initializer_list<T> &);
233 
235  {
236  clear();
237  }
238 
239  nat_t size() const
240  {
241  return num_items;
242  }
243 
244  void clear()
245  {
246  empty_list();
247  }
248 
249  T & insert(const T & item)
250  {
251  Node * node = new Node(item);
252  BaseList::insert(node);
253  ++num_items;
254  return node->get_item();
255  }
256 
257  T & insert(T && item)
258  {
259  Node * node = new Node(std::forward<T>(item));
260  BaseList::insert(node);
261  ++num_items;
262  return node->get_item();
263  }
264 
265  T & append(const T & item)
266  {
267  Node * node = new Node(item);
268  BaseList::append(node);
269  ++num_items;
270  return node->get_item();
271  }
272 
273  T & append(T && item)
274  {
275  Node * node = new Node(std::forward<T>(item));
276  BaseList::append(node);
277  ++num_items;
278  return node->get_item();
279  }
280 
281  T & get_first()
282  {
283  if (num_items == 0)
284  throw std::underflow_error("List is empty");
285 
286  return BaseList::get_first()->get_item();
287  }
288 
289  const T & get_first() const
290  {
291  if (num_items == 0)
292  throw std::underflow_error("List is empty");
293 
294  return BaseList::get_first()->get_item();
295  }
296 
297  T & get_last()
298  {
299  if (num_items == 0)
300  throw std::underflow_error("List is empty");
301 
302  return BaseList::get_last()->get_item();
303  }
304 
305  const T & get_last() const
306  {
307  if (num_items == 0)
308  throw std::underflow_error("There is not element in list");
309 
310  return BaseList::get_last()->get_item();
311  }
312 
314  {
315  if (num_items == 0)
316  throw std::underflow_error("There is not element in list");
317 
318  Node * p = BaseList::remove_first();
319  T ret_val = std::move(p->get_item());
320  delete p;
321  --num_items;
322  return ret_val;
323  }
324 
325  void swap(SLList & l)
326  {
327  BaseList::swap(l);
328  std::swap(num_items, l.num_items);
329  }
330 
331  void concat(SLList & l)
332  {
333  num_items += l.num_items;
334  BaseList::concat(l);
335  l.num_items = 0;
336  }
337 
338  SLList & operator = (const SLList & l)
339  {
340  if (this == &l)
341  return *this;
342 
343  clear();
344  copy_list(l);
345  return *this;
346  }
347 
349  {
350  swap(l);
351  return *this;
352  }
353 
354  class Iterator : public ForwardIterator<Iterator, T>
355  {
356  friend class BasicIterator<Iterator, T>;
357 
358  SLList * list_ptr;
359  Node * curr;
360  Node * pred;
361  lint_t pos;
362 
363  void locate_position();
364 
365 
366  protected:
367  Node * get_location() const
368  {
369  return curr;
370  }
371 
372  public:
374  : list_ptr(nullptr), curr(nullptr), pred(nullptr), pos(-1)
375  {
376  // empty
377  }
378 
379  Iterator(const SLList<T> & l)
380  : list_ptr(&const_cast<SLList<T> &>(l)),
381  curr(((BaseList &)l).get_first()), pred(nullptr), pos(0)
382  {
383  // empty
384  }
385 
386  Iterator(const SLList<T> & l, Node * c)
387  : list_ptr(&const_cast<SLList<T> &>(l)), curr(c), pred(nullptr), pos(0)
388  {
389  locate_position();
390  }
391 
392  Iterator(const Iterator & it)
393  : list_ptr(it.list_ptr), curr(it.curr), pred(it.pred), pos(it.pos)
394  {
395  // empty
396  }
397 
399  : Iterator()
400  {
401  swap(it);
402  }
403 
405  {
406  if (this == &it)
407  return *this;
408 
409  list_ptr = it.list_ptr;
410  curr = it.curr;
411  pred = it.pred;
412  pos = it.pos;
413 
414  return *this;
415  }
416 
418  {
419  swap(it);
420  return *this;
421  }
422 
423  void swap(Iterator & it)
424  {
425  std::swap(list_ptr, it.list_ptr);
426  std::swap(curr, it.curr);
427  std::swap(pred, it.pred);
428  std::swap(pos, it.pos);
429  }
430 
432  {
433  return pos;
434  }
435 
436  bool has_current() const
437  {
438  return curr != nullptr;
439  }
440 
442  {
443  if (not has_current())
444  throw std::overflow_error("There is not current element");
445 
446  return curr->get_item();
447  }
448 
449  const T & get_current() const
450  {
451  if (not has_current())
452  throw std::overflow_error("There is not current element");
453 
454  return curr->get_item();
455  }
456 
457  void next()
458  {
459  if (not has_current())
460  return;
461 
462  pred = curr;
463  ++pos;
464  curr = curr->get_next();
465  }
466 
467  void reset()
468  {
469  curr = ((BaseList *) list_ptr)->get_first();
470  pos = 0;
471  }
472 
473  T del()
474  {
475  if (not has_current())
476  throw std::logic_error("There is not current element");
477 
478  if (pred == nullptr)
479  {
480  T ret_val = list_ptr->remove_first();
481  curr = ((BaseList *) list_ptr)->get_first();
482  return ret_val;
483  }
484 
485  curr = curr->get_next();
486 
487  if (curr == nullptr)
488  ((BaseList *) list_ptr)->get_last() = pred;
489 
490  Node * p = pred->remove_next();
491  T ret_val = std::move(p->get_item());
492  delete p;
493  --list_ptr->num_items;
494  return ret_val;
495  }
496  };
497 
499  {
500  return Iterator(*this);
501  }
502 
503  Iterator begin() const
504  {
505  return Iterator(*this);
506  }
507 
509  {
510  return Iterator(*this, nullptr);
511  }
512 
513  Iterator end() const
514  {
515  return Iterator(*this, nullptr);
516  }
517 
518  T & select(nat_t);
519 
520  const T & select(nat_t) const;
521 
522  T & operator [] (nat_t i)
523  {
524  return select(i);
525  }
526 
527  const T & operator [] (nat_t i) const
528  {
529  return select(i);
530  }
531  };
532 
533  template <typename T>
534  SLList<T>::SLList(const std::initializer_list<T> & l)
535  : SLList()
536  {
537  for (const T & item : l)
538  append(item);
539  }
540 
541  template <typename T>
542  void SLList<T>::copy_list(const SLList & l)
543  {
544  Node * n = ((BaseList &) l).get_first();
545 
546  while (n != nullptr)
547  {
548  append(n->get_item());
549  n = n->get_next();
550  }
551  }
552 
553  template <typename T>
554  void SLList<T>::empty_list()
555  {
556  while (not this->is_empty())
557  remove_first();
558  }
559 
560  template <typename T>
562  {
563  for (T & item : *this)
564  {
565  if (i-- == 0)
566  return item;
567  }
568  throw std::out_of_range("Index out of range");
569  }
570 
571  template <typename T>
572  const T & SLList<T>::select(nat_t i) const
573  {
574  for (const T & item : *this)
575  {
576  if (i-- == 0)
577  return item;
578  }
579  throw std::out_of_range("Index out of range");
580  }
581 
582  template <typename T>
584  {
585  if (curr == nullptr)
586  {
587  pos = list_ptr->size();
588  pred = ((BaseList *)list_ptr)->get_last();
589  return;
590  }
591 
592  Node * ptr = ((BaseList *)list_ptr)->get_first();
593 
594  while (ptr != curr)
595  {
596  pred = ptr;
597  ptr = ptr->get_next();
598  ++pos;
599  }
600  }
601 
602  template <typename T>
603  class DLList : public DL,
604  public ContainerAlgorithms<DLList<T>, T>
605  {
606  using Base = DL;
607  using Node = DLNode<T>;
608 
609  nat_t num_items;
610 
611  void copy_list(const DLList &);
612 
613  void empty_list();
614 
615  public:
616  using ItemType = T;
617  using KeyType = T;
618  using DataType = T;
619  using ValueType = T;
620  using SizeType = nat_t;
621 
623  : Base(), num_items(0)
624  {
625  // empty
626  }
627 
628  DLList(const DLList & l)
629  : DLList()
630  {
631  copy_list(l);
632  }
633 
635  : DLList()
636  {
637  swap(l);
638  }
639 
640  DLList(const std::initializer_list<T> &);
641 
643  {
644  clear();
645  }
646 
647  nat_t size() const
648  {
649  return num_items;
650  }
651 
652  void clear()
653  {
654  empty_list();
655  }
656 
657  void swap(DLList & l)
658  {
659  std::swap(num_items, l.num_items);
660  Base::swap(&l);
661  }
662 
663  T & insert(const T & item)
664  {
665  Node * node = new Node(item);
666  Base::insert_next(node);
667  ++num_items;
668  return node->get_item();
669  }
670 
671  T & insert(T && item)
672  {
673  Node * node = new Node(std::forward<T>(item));
674  Base::insert_next(node);
675  ++num_items;
676  return node->get_item();
677  }
678 
679  T & append(const T & item)
680  {
681  Node * node = new Node(item);
682  Base::insert_prev(node);
683  ++num_items;
684  return node->get_item();
685  }
686 
687  T & append(T && item)
688  {
689  Node * node = new Node(std::forward<T>(item));
690  Base::insert_prev(node);
691  ++num_items;
692  return node->get_item();
693  }
694 
695  T & get_first()
696  {
697  if (Base::is_empty())
698  throw std::underflow_error("List is empty");
699 
700  return static_cast<Node *>(DL::get_next())->get_item();
701  }
702 
703  const T & get_first() const
704  {
705  if (Base::is_empty())
706  throw std::underflow_error("List is empty");
707 
708  return static_cast<const Node *>(DL::get_next())->get_item();
709  }
710 
711  T & get_last()
712  {
713  if (Base::is_empty())
714  throw std::underflow_error("List is empty");
715 
716  return static_cast<Node *>(DL::get_prev())->get_item();
717  }
718 
719  const T & get_last() const
720  {
721  if (Base::is_empty())
722  throw std::underflow_error("List is empty");
723 
724  return static_cast<const Node *>(DL::get_prev())->get_item();
725  }
726 
728  {
729  if (Base::is_empty())
730  throw std::underflow_error("List is empty");
731 
732  Node * node = static_cast<Node *>(DL::remove_next());
733  T ret_val = std::move(node->get_item());
734  delete node;
735  --num_items;
736  return ret_val;
737  }
738 
740  {
741  if (Base::is_empty())
742  throw std::underflow_error("List is empty");
743 
744  Node * node = static_cast<Node *>(DL::remove_prev());;
745  T ret_val = std::move(node->get_item());
746  delete node;
747  --num_items;
748  return ret_val;
749  }
750 
751  void remove(T & item)
752  {
753  Node * zero = 0;
754  nat_t off_set = nat_t(&zero->item);
755  Node * item_node = (Node *) (nat_t(&item) - off_set);
756  item_node->del();
757  delete item_node;
758  --num_items;
759  }
760 
761  DLList & operator = (const DLList & l)
762  {
763  if (this == &l)
764  return *this;
765 
766  clear();
767  copy_list(l);
768  return *this;
769  }
770 
772  {
773  swap(l);
774  return *this;
775  }
776 
777  class Iterator : public DL::Iterator,
778  public BidirectionalIterator<Iterator, T>
779  {
780  friend class BasicIterator<Iterator, T>;
781 
782  using Base = DL::Iterator;
783 
784  DLList * list_ptr;
785  lint_t pos;
786 
787  void locate_position();
788 
789  public:
791  : Base(), list_ptr(nullptr), pos(-1)
792  {
793  // empty
794  }
795 
796  Iterator(const DLList & l)
797  : Base(&const_cast<DLList &>(l)), list_ptr(&const_cast<DLList &>(l)),
798  pos(0)
799  {
800  // empty
801  }
802 
803  Iterator(const DLList & l, DL * c)
804  : Base(&const_cast<DLList &>(l), c), list_ptr(&const_cast<DLList &>(l)),
805  pos(0)
806  {
807  locate_position();
808  }
809 
810  Iterator(const Iterator & it)
811  : Base(it), list_ptr(it.list_ptr), pos(it.pos)
812  {
813  // empty
814  }
815 
817  : Iterator()
818  {
819  swap(it);
820  }
821 
823  {
824  if (this == &it)
825  return *this;
826 
827  (Base &) *this = it;
828  list_ptr = it.list_ptr;
829  pos = it.pos;
830  return *this;
831  }
832 
834  {
835  swap(it);
836  return *this;
837  }
838 
839  void swap(Iterator & it)
840  {
841  Base::swap(it);
842  std::swap(list_ptr, it.list_ptr);
843  std::swap(pos, it.pos);
844  }
845 
847  {
848  return pos;
849  }
850 
852  {
853  return static_cast<Node *>(Base::get_current())->get_item();
854  }
855 
856  const T & get_current() const
857  {
858  return static_cast<Node *>(Base::get_current())->get_item();
859  }
860 
861  T del()
862  {
863  Node * p = static_cast<Node *>(Base::del());
864  T ret_val = std::move(p->get_item());
865  delete p;
866  --list_ptr->num_items;
867  return ret_val;
868  }
869 
870  void next()
871  {
872  Base::next();
873  ++pos;
874  }
875 
876  void prev()
877  {
878  Base::prev();
879  --pos;
880  }
881  };
882 
884  {
885  return Iterator(*this);
886  }
887 
888  Iterator begin() const
889  {
890  return Iterator(*this);
891  }
892 
894  {
895  return Iterator(*this, this);
896  }
897 
898  Iterator end() const
899  {
900  return Iterator(*this, const_cast<DLList *>(this));
901  }
902 
903  T & select(nat_t);
904 
905  const T & select(nat_t) const;
906 
908  {
909  return select(i);
910  }
911 
912  const T & operator [] (nat_t i) const
913  {
914  return select(i);
915  }
916  };
917 
918  template <typename T>
919  DLList<T>::DLList(const std::initializer_list<T> & l)
920  : DLList()
921  {
922  for (const T & item : l)
923  append(item);
924  }
925 
926  template <typename T>
927  void DLList<T>::copy_list(const DLList & l)
928  {
929  Node * node = static_cast<Node *>(const_cast<DLList &>(l).get_next());
930 
931  while ((DL *)node != &l)
932  {
933  append(node->get_item());
934  node = node->get_next();
935  }
936  }
937 
938  template <typename T>
939  void DLList<T>::empty_list()
940  {
941  while (not this->is_empty())
942  remove_first();
943  }
944 
945  template <typename T>
947  {
948  for (T & item : *this)
949  {
950  if (i-- == 0)
951  return item;
952  }
953  throw std::out_of_range("Index out of range");
954  }
955 
956  template <typename T>
957  const T & DLList<T>::select(nat_t i) const
958  {
959  for (const T & item : *this)
960  {
961  if (i-- == 0)
962  return item;
963  }
964  throw std::out_of_range("Index out of range");
965  }
966 
967  template <typename T>
969  {
970  DL * ptr = list_ptr->get_next();
971 
972  while (ptr != Base::get_location())
973  {
974  ptr = ptr->get_next();
975  ++pos;
976  }
977  }
978 
979 } // end namespace Designar
980 
981 # endif // DSGLIST_H
DL * remove_prev()
Definition: nodesdef.H:222
NodeSLList & operator=(const NodeSLList &)=delete
Iterator(Iterator &&it)
Definition: list.H:398
void reset()
Definition: list.H:467
void clear()
Definition: list.H:652
Definition: list.H:777
void split(NodeSLList &, NodeSLList &)
Definition: list.H:180
lint_t get_position() const
Definition: list.H:846
Definition: list.H:35
Node *& get_last()
Definition: list.H:127
T remove_first()
Definition: list.H:313
void concat(SLList &l)
Definition: list.H:331
SLList(SLList &&l)
Definition: list.H:226
const Node *& get_first() const
Definition: list.H:122
void swap(Iterator &it)
Definition: list.H:839
T & append(const T &item)
Definition: list.H:265
Iterator end() const
Definition: list.H:513
void swap(Iterator &it)
Definition: list.H:423
DLList()
Definition: list.H:622
Definition: iterator.H:92
bool is_empty() const
Definition: nodesdef.H:153
Definition: nodesdef.H:113
SLNode *& get_next()
Definition: nodesdef.H:83
Iterator begin() const
Definition: list.H:503
void concat(NodeSLList *l)
Definition: list.H:152
T & get_item()
Definition: nodesdef.H:454
MapKey< Node< GT > *, Arc< GT > ** > ValueType
Definition: list.H:619
Iterator(const DLList &l)
Definition: list.H:796
T & insert(T &&item)
Definition: list.H:671
T ValueType
Definition: list.H:211
bool is_empty() const
Definition: list.H:80
MapKey< Node< GT > *, Arc< GT > ** > KeyType
Definition: list.H:617
SLList(const SLList &l)
Definition: list.H:220
DLList(DLList &&l)
Definition: list.H:634
T remove_last()
Definition: list.H:739
Definition: iterator.H:36
Node * get_location() const
Definition: list.H:367
void swap(NodeSLList &l)
Definition: list.H:74
T & get_first()
Definition: list.H:695
void insert_next(SLNode *p)
Definition: nodesdef.H:93
Definition: list.H:603
DLList(const DLList &l)
Definition: list.H:628
Iterator(const SLList< T > &l)
Definition: list.H:379
T & get_last()
Definition: list.H:711
const T & get_first() const
Definition: list.H:703
void append(Node *node)
Definition: list.H:106
T & get_current()
Definition: list.H:851
T & get_item()
Definition: nodesdef.H:73
T KeyType
Definition: list.H:209
DL *& get_prev()
Definition: nodesdef.H:178
Node *& get_first()
Definition: list.H:117
void del()
Definition: nodesdef.H:208
Iterator end()
Definition: list.H:508
bool is_unitarian() const
Definition: list.H:90
bool has_current() const
Definition: list.H:436
Iterator(const SLList< T > &l, Node *c)
Definition: list.H:386
Iterator begin()
Definition: list.H:498
Iterator begin() const
Definition: list.H:888
T & insert(const T &item)
Definition: list.H:249
void swap(SLList &l)
Definition: list.H:325
long long lint_t
Definition: types.H:49
T & insert(const T &item)
Definition: list.H:663
const T & get_first() const
Definition: list.H:289
void insert(Node *node)
Definition: list.H:95
Definition: italgorithms.H:33
Definition: nodesdef.H:415
nat_t size() const
Definition: list.H:239
Iterator(const DLList &l, DL *c)
Definition: list.H:803
SLNode< T > Node
Definition: list.H:38
Definition: containeralgorithms.H:33
void reset()
Definition: nodesdef.H:68
~SLList()
Definition: list.H:234
MapKey< Node< GT > *, Arc< GT > ** > ItemType
Definition: list.H:616
void clear()
Definition: list.H:244
T DataType
Definition: list.H:210
Iterator()
Definition: list.H:790
Iterator()
Definition: list.H:373
T & append(T &&item)
Definition: list.H:687
T & insert(T &&item)
Definition: list.H:257
MapKey< Node< GT > *, Arc< GT > ** > DataType
Definition: list.H:618
T & append(const T &item)
Definition: list.H:679
DL * remove_next()
Definition: nodesdef.H:215
DLNode *& get_next()
Definition: nodesdef.H:464
const Node *& get_last() const
Definition: list.H:132
T & append(T &&item)
Definition: list.H:273
const T & get_current() const
Definition: list.H:856
Iterator(const Iterator &it)
Definition: list.H:810
nat_t SizeType
Definition: list.H:212
T & select(nat_t)
Definition: list.H:946
T & get_last()
Definition: list.H:297
bool is_unitarian_or_empty() const
Definition: list.H:85
T del()
Definition: list.H:473
T & get_first()
Definition: list.H:281
const T & get_last() const
Definition: list.H:719
NodeSLList()
Definition: list.H:52
Definition: iterator.H:112
void swap(DLList &l)
Definition: list.H:657
Definition: array.H:32
Iterator begin()
Definition: list.H:883
unsigned long int nat_t
Definition: types.H:50
nat_t size() const
Definition: list.H:647
~DLList()
Definition: list.H:642
Iterator end()
Definition: list.H:893
T & operator[](nat_t i)
Definition: list.H:522
void next()
Definition: list.H:457
void concat(NodeSLList &l)
Definition: list.H:171
const T & get_last() const
Definition: list.H:305
Iterator(const Iterator &it)
Definition: list.H:392
Definition: nodesdef.H:35
T remove_first()
Definition: list.H:727
void next()
Definition: list.H:870
const T & get_current() const
Definition: list.H:449
NodeSLList(NodeSLList &&l)
Definition: list.H:60
Iterator end() const
Definition: list.H:898
Iterator(Iterator &&it)
Definition: list.H:816
SLList()
Definition: list.H:214
T & select(nat_t)
Definition: list.H:561
T del()
Definition: list.H:861
SLList & operator=(const SLList &l)
Definition: list.H:338
T ItemType
Definition: list.H:208
DL *& get_next()
Definition: nodesdef.H:168
T & get_current()
Definition: list.H:441
lint_t get_position() const
Definition: list.H:431
Definition: list.H:354
void prev()
Definition: list.H:876
Node * remove_first()
Definition: list.H:137
SLNode * remove_next()
Definition: nodesdef.H:101
Definition: nodesdef.H:293