优先级队列  0.1
数据结构_第7章
List::sLinkList< T > Class Template Reference

#include <sLinkList.h>

Inheritance diagram for List::sLinkList< T >:
Collaboration diagram for List::sLinkList< T >:

Classes

class  const_iterator
 
class  iterator
 
struct  node
 

Public Member Functions

 sLinkList ()
 
 sLinkList (const std::initializer_list< T > &il)
 
virtual ~sLinkList ()
 
virtual void clear ()
 
virtual int length () const
 
virtual void insert (int i, const T &obj)
 
virtual void remove (int i)
 
virtual int search (const T &obj) const
 
virtual T visit (int i) const
 
virtual void traverse () const
 
void erase (const T &lb, const T &rb)
 
void reverse ()
 
findKthLast (int k)
 
virtual iterator begin ()
 
virtual const_iterator begin () const
 
virtual iterator end ()=delete
 
virtual const_iterator end () const =delete
 
noderetNode () const
 
- Public Member Functions inherited from List::List< T >
virtual ~List ()=default
 

Private Member Functions

nodemove (int i) const
 

Private Attributes

nodehead
 
int currentLength
 

Detailed Description

template<typename T>
class List::sLinkList< T >

Definition at line 25 of file sLinkList.h.

Constructor & Destructor Documentation

◆ sLinkList() [1/2]

template<typename T >
List::sLinkList< T >::sLinkList ( )
inline

Definition at line 99 of file sLinkList.h.

◆ sLinkList() [2/2]

template<class T >
List::sLinkList< T >::sLinkList ( const std::initializer_list< T > &  il)

Definition at line 132 of file sLinkList.h.

References List::sLinkList< T >::currentLength, and List::sLinkList< T >::insert().

Here is the call graph for this function:

◆ ~sLinkList()

template<typename T >
virtual List::sLinkList< T >::~sLinkList ( )
inlinevirtual

Definition at line 101 of file sLinkList.h.

References List::sLinkList< T >::clear(), and List::sLinkList< T >::head.

Here is the call graph for this function:

Member Function Documentation

◆ begin() [1/2]

template<typename T >
virtual iterator List::sLinkList< T >::begin ( )
inlinevirtual

Definition at line 118 of file sLinkList.h.

References List::sLinkList< T >::head, and List::sLinkList< T >::node::next.

◆ begin() [2/2]

template<typename T >
virtual const_iterator List::sLinkList< T >::begin ( ) const
inlinevirtual

Definition at line 119 of file sLinkList.h.

References List::sLinkList< T >::head, and List::sLinkList< T >::node::next.

◆ clear()

template<class T >
void List::sLinkList< T >::clear
virtual

Implements List::List< T >.

Definition at line 156 of file sLinkList.h.

References List::sLinkList< T >::node::next.

Referenced by List::sLinkList< T >::~sLinkList().

Here is the caller graph for this function:

◆ end() [1/2]

template<typename T >
virtual const_iterator List::sLinkList< T >::end ( ) const
virtualdelete

◆ end() [2/2]

template<typename T >
virtual iterator List::sLinkList< T >::end ( )
virtualdelete

◆ erase()

template<class T >
void List::sLinkList< T >::erase ( const T &  lb,
const T &  rb 
)

◆ findKthLast()

template<class T >
T List::sLinkList< T >::findKthLast ( int  k)

◆ insert()

template<class T >
void List::sLinkList< T >::insert ( int  i,
const T &  obj 
)
virtual

Implements List::List< T >.

Definition at line 172 of file sLinkList.h.

References List::sLinkList< T >::node::next.

Referenced by List::sLinkList< T >::sLinkList().

Here is the caller graph for this function:

◆ length()

template<class T >
int List::sLinkList< T >::length
virtual

Implements List::List< T >.

Definition at line 150 of file sLinkList.h.

◆ move()

template<class T >
sLinkList< T >::node * List::sLinkList< T >::move ( int  i) const
private

Definition at line 140 of file sLinkList.h.

References List::sLinkList< T >::node::next.

◆ remove()

template<class T >
void List::sLinkList< T >::remove ( int  i)
virtual

Implements List::List< T >.

Definition at line 180 of file sLinkList.h.

References List::sLinkList< T >::node::next.

◆ retNode()

template<typename T >
node& List::sLinkList< T >::retNode ( ) const
inline

Definition at line 124 of file sLinkList.h.

References List::sLinkList< T >::head.

◆ reverse()

template<class T >
void List::sLinkList< T >::reverse

Definition at line 249 of file sLinkList.h.

References List::sLinkList< T >::node::next.

◆ search()

template<class T >
int List::sLinkList< T >::search ( const T &  obj) const
virtual

Implements List::List< T >.

Definition at line 192 of file sLinkList.h.

References List::sLinkList< T >::node::data, and List::sLinkList< T >::node::next.

◆ traverse()

template<class T >
void List::sLinkList< T >::traverse
virtual

◆ visit()

template<class T >
T List::sLinkList< T >::visit ( int  i) const
virtual

Implements List::List< T >.

Definition at line 210 of file sLinkList.h.

Member Data Documentation

◆ currentLength

template<typename T >
int List::sLinkList< T >::currentLength
private

Definition at line 38 of file sLinkList.h.

Referenced by List::sLinkList< T >::sLinkList().

◆ head

template<typename T >
node* List::sLinkList< T >::head
private

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