Go to the source code of this file.
|
template<class T > |
AbsListNode< T > * | glob_insert_before (AbsList< T > &, AbsListNode< T > *, const T &fel) |
|
template<class T > |
AbsListNode< T > * | glob_insert_after (AbsList< T > &, AbsListNode< T > *, const T &fel) |
|
template<class T > |
void | glob_pilfer (AbsList< T > &, PILF_CONST AbsList< T > &) |
|
template<class T > |
void | print_AbsList (std::ostream &file, const AbsList< T > &f, int l) |
|
template<class T > |
void | print_AbsList (std::ostream &file, const AbsList< T > &f) |
|
template<class T > |
std::ostream & | operator<< (std::ostream &file, const AbsListNode< T > &f) |
|
template<class T > |
std::ostream & | operator<< (std::ostream &file, const AbsList< T > &f) |
|
◆ glob_insert_after()
Definition at line 441 of file AbsList.h.
442 {
444 if (aln == NULL)
445 {
446 if (al.qel == 0)
447 {
449 al.last_node = al.first_node;
450 new_aln = al.first_node;
451 al.qel = 1;
452 } else {
453 mcerr <<
"ERROR in template<class T> AbsListNode<T>* glob_insert_after\n";
454 mcerr <<
" aln is zero, but the list is not empty\n";
456 }
457 } else {
459 {
461 << "ERROR in template<class T> AbsListNode<T>* glob_insert_after\n";
462 mcerr <<
"aln->get_heed_node() != this\n";
465 } else {
466 if (al.qel <= 0)
467 {
468 mcerr <<
"ERROR in template<class T> AbsListNode<T>* "
469 "glob_insert_after\n";
470 mcerr <<
"qel <= 0 but aln is not empty\n";
473 } else {
475
476 if (aln == al.last_node) {
477 al.last_node = new_aln;
478 }
479 al.qel++;
480 }
481 }
482 }
483 return new_aln;
484}
AbsList< T > * get_head_node(void) const
AbsListNode< T > * get_next_node(void) const
#define Iprintn(file, name)
#define Iprint2n(file, name1, name2)
Referenced by AbsList< T >::insert_after().
◆ glob_insert_before()
Definition at line 322 of file AbsList.h.
323 {
325 if (aln == NULL)
326 {
327 if (al.qel == 0)
328 {
329 if (al.first_node != NULL || al.last_node != NULL) {
330 mcerr <<
"ERROR in template<class T> AbsListNode<T>* "
331 "glob_insert_before\n";
332 mcerr <<
"qel == 0, but first_node != NULL || last_node != NULL \n";
336 }
338 al.last_node = al.first_node;
339 new_aln = al.first_node;
340 al.qel = 1;
341 } else {
343 << "ERROR in template<class T> AbsListNode<T>* glob_insert_before\n";
344 mcerr <<
" aln is zero, but the list is not empty\n";
346 }
347 } else {
350 << "ERROR in template<class T> AbsListNode<T>* glob_insert_before\n";
351 mcerr <<
"aln->get_head_node() != this\n";
354 } else {
355 if (al.qel <= 0) {
356 mcerr <<
"ERROR in template<class T> AbsListNode<T>* "
357 "glob_insert_before\n";
358 mcerr <<
"qel <= 0 but aln is not empty\n";
361 } else {
363 if (aln == al.first_node) {
364 al.first_node = new_aln;
365 }
366 al.qel++;
367 }
368 }
369 }
370 return new_aln;
371}
AbsListNode< T > * get_prev_node(void) const
◆ glob_pilfer()
Definition at line 635 of file AbsList.h.
635 {
636#ifdef DEBUG_ABSLIST
637 mcout <<
"void glob_pilfer(AbsList<T>& this_al, PILF_CONST AbsList<T>& al) "
638 "is starting\n";
639#endif
640 if (this_al.qel != 0) {
641 if (al.qel != 0) {
642 mcerr <<
"ERROR in glob_pilfer(...):\n";
643 mcerr <<
"Both the destination and source lists are not empty\n";
644
645
647 } else {
649 }
650 }
651 this_al.first_node = al.first_node;
652 this_al.last_node = al.last_node;
653 this_al.qel = al.qel;
655 while (cur_node != NULL) {
656 cur_node->head_node = &this_al;
658 }
659 al.first_node = NULL;
660 al.last_node = NULL;
661 al.qel = 0;
662}
Referenced by AbsList< T >::pilfer().
◆ operator<<() [1/2]
template<class T >
std::ostream & operator<< |
( |
std::ostream & |
file, |
|
|
const AbsList< T > & |
f |
|
) |
| |
Definition at line 767 of file AbsList.h.
767 {
768 mfunnamep(
"template<class T> std::ostream& operator<<(std::ostream& file, "
769 "const AbsList<T>& f)");
771
772 long n = 0;
776 Ifile <<
"n=" << n <<
" el[n]=" << aln->
el <<
'\n';
777 n++;
778 }
779
780
781
782
783
784
785
788 return file;
789}
#define mfunnamep(string)
AbsListNode< T > * get_next_node(AbsListNode< T > *an) const
std::ostream & yesindent(std::ostream &f)
◆ operator<<() [2/2]
template<class T >
std::ostream & operator<< |
( |
std::ostream & |
file, |
|
|
const AbsListNode< T > & |
f |
|
) |
| |
Definition at line 751 of file AbsList.h.
751 {
752 mfunnamep(
"template<class T> std::ostream& operator<<(std::ostream& file, "
753 "const AbsListNode<T>& f)");
754 Ifile <<
"AbsListNode<T>:\n";
756#ifdef DONT_USE_ABSPTR
757#else
758 file << (*(static_cast<const RegPassivePtr*>(&f))) << '\n';
759#endif
760 file << "Element:\n";
763 return file;
764}
◆ print_AbsList() [1/2]
template<class T >
void print_AbsList |
( |
std::ostream & |
file, |
|
|
const AbsList< T > & |
f |
|
) |
| |
Definition at line 727 of file AbsList.h.
727 {
728 mfunnamep(
"template<class T> void print_AbsList(std::ostream& file, const "
729 "AbsList<T>& f)");
731
732 long n = 0;
738 n++;
739 }
740
741
742
743
744
745
748}
std::ostream & noindent(std::ostream &f)
◆ print_AbsList() [2/2]
template<class T >
void print_AbsList |
( |
std::ostream & |
file, |
|
|
const AbsList< T > & |
f, |
|
|
int |
l |
|
) |
| |
Definition at line 703 of file AbsList.h.
703 {
704 mfunnamep(
"template<class T> void print_AbsList(std::ostream& file, const "
705 "AbsList<T>& f, int l)");
707
708 long n = 0;
713 aln->
el.print(file, l);
714 n++;
715 }
716
717
718
719
720
721
722
725}