#include <nilist.h>
Inheritance diagram for slist_base:


Public Member Functions | |
| slist_base () | |
| slist_base (slink *a) | |
| void | insert (slink *a) |
| void | append (slink *a) |
| void | remove (slink *a, slink *prev) |
| slink * | get () |
| slink * | find (int key) |
| void | clear () |
| int | count () |
| slink * | last () |
| int | ac () |
| int | rc () |
Private Attributes | |
| slink * | last_ |
| int | count_ |
| int | append_count_ |
| int | remove_count_ |
Friends | |
| class | slist_base_iter |
|
|
Definition at line 52 of file nilist.h. References append_count_, count_, last_, and remove_count_.
00052 {last_ = 0;count_=0;append_count_=0;remove_count_=0;}
|
|
|
Definition at line 53 of file nilist.h. References last_, and slink::next_.
|
|
|
Definition at line 65 of file nilist.h. References append_count_.
00065 {return append_count_;} /* XXX */
|
|
|
Definition at line 80 of file nilist.cc. References append_count_, count_, last_, and slink::next_. Referenced by Slist< T >::append(), and Islist< Segment >::append().
|
|
|
Definition at line 62 of file nilist.h. References last_.
00062 {last_ = 0;}
|
|
|
Reimplemented in Islist< T >, Islist< TcpSessionAgent >, Islist< IntTcpAgent >, and Islist< Segment >. Definition at line 63 of file nilist.h. References count_. Referenced by slist_base_iter::count(), and Islist< Segment >::count().
00063 {return count_;}
|
|
|
Reimplemented in Islist< T >, Islist< TcpSessionAgent >, Islist< IntTcpAgent >, and Islist< Segment >. Definition at line 104 of file nilist.cc. References slink::key_, last_, and slink::next_. Referenced by Islist< Segment >::find().
|
|
|
Reimplemented in Islist< T >, Slist< T >, Islist< TcpSessionAgent >, Islist< IntTcpAgent >, and Islist< Segment >. Definition at line 92 of file nilist.cc. References count_, last_, and slink::next_. Referenced by Islist< Segment >::get(), and Slist< T >::get().
|
|
|
Definition at line 48 of file nilist.cc. References count_, last_, and slink::next_. Referenced by Slist< T >::insert(), and Islist< Segment >::insert().
|
|
|
Definition at line 64 of file nilist.h. References last_.
00064 {return last_;} /* XXX */
|
|
|
Definition at line 66 of file nilist.h. References remove_count_.
00066 {return remove_count_;} /* XXX */
|
|
||||||||||||
|
Definition at line 59 of file nilist.cc. References count_, last_, slink::next_, and remove_count_. Referenced by Islist< Segment >::remove().
00060 {
00061 remove_count_++; /* XXX */
00062 count_--;
00063 if (prev && prev->next_ != a)
00064 printf("In remove(): Error: prev->next!=a prev=%p a=%p\n", prev, a);
00065 if (last_ == NULL)
00066 return;
00067 if (prev == NULL)
00068 if (last_->next_ == a)
00069 prev = last_;
00070 else
00071 return;
00072
00073 prev->next_ = a->next_;
00074 if (last_ == a) // a was last in list
00075 last_ = prev;
00076 if (last_->next_ == a) // a was only one in list
00077 last_ = NULL;
00078 }
|
|
|
|
|
|
Definition at line 49 of file nilist.h. Referenced by ac(), append(), and slist_base(). |
|
|
Definition at line 48 of file nilist.h. Referenced by append(), count(), get(), insert(), remove(), and slist_base(). |
|
|
Definition at line 47 of file nilist.h. Referenced by append(), clear(), find(), get(), slist_base_iter::get_last(), insert(), last(), slist_base_iter::operator()(), remove(), slist_base(), and slist_base_iter::slist_base_iter(). |
|
|
Definition at line 50 of file nilist.h. Referenced by rc(), remove(), and slist_base(). |
1.3.3