#include <nilist.h>
Inheritance diagram for Slist< T >:


Public Member Functions | |
| void | insert (const T &a) |
| void | append (const T &a) |
| T | get () |
Private Member Functions | |
| void | insert (slink *a) |
| void | append (slink *a) |
| void | remove (slink *a, slink *prev) |
| slink * | find (int key) |
| void | clear () |
| int | count () |
| slink * | last () |
| int | ac () |
| int | rc () |
Friends | |
| class | Slist_iter< T > |
| class | slist_base_iter |
|
|
Definition at line 65 of file nilist.h. References slist_base::append_count_.
00065 {return append_count_;} /* XXX */
|
|
|
Definition at line 80 of file nilist.cc. References slist_base::append_count_, slist_base::count_, slist_base::last_, and slink::next_. Referenced by Slist< T >::append(), and Islist< Segment >::append().
|
|
||||||||||
|
Definition at line 98 of file nilist.h. References slist_base::append().
00099 { slist_base::append(new Tlink<T>(a));}
|
Here is the call graph for this function:

|
|
Definition at line 62 of file nilist.h. References slist_base::last_.
00062 {last_ = 0;}
|
|
|
Reimplemented in Islist< T >, Islist< TcpSessionAgent >, Islist< IntTcpAgent >, and Islist< Segment >. Definition at line 63 of file nilist.h. References slist_base::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_, slist_base::last_, and slink::next_. Referenced by Islist< Segment >::find().
|
|
|||||||||
|
Reimplemented from slist_base. Definition at line 40 of file nilist.cc. References slist_base::get(), and Tlink< T >::info.
00041 {
00042 Tlink<T>* lnk = (Tlink<T>*) slist_base::get();
00043 T i = lnk->info;
00044 delete lnk;
00045 return i;
00046 }
|
Here is the call graph for this function:

|
|
Definition at line 48 of file nilist.cc. References slist_base::count_, slist_base::last_, and slink::next_. Referenced by Slist< T >::insert(), and Islist< Segment >::insert().
|
|
||||||||||
|
Definition at line 96 of file nilist.h. References slist_base::insert().
00097 { slist_base::insert(new Tlink<T>(a));}
|
Here is the call graph for this function:

|
|
Definition at line 64 of file nilist.h. References slist_base::last_.
00064 {return last_;} /* XXX */
|
|
|
Definition at line 66 of file nilist.h. References slist_base::remove_count_.
00066 {return remove_count_;} /* XXX */
|
|
||||||||||||
|
Definition at line 59 of file nilist.cc. References slist_base::count_, slist_base::last_, slink::next_, and slist_base::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 }
|
|
|
|
|
|||||
|
|
1.3.3