栈  0.1
数据结构_第3章
List::seqList< T > Class Template Reference

#include <seqList.h>

Inheritance diagram for List::seqList< T >:
[legend]
Collaboration diagram for List::seqList< T >:
[legend]

Classes

class  const_iterator
 
class  iterator
 

Public Member Functions

 seqList (int initSize=10)
 
 seqList (const seqList< T > &rhs)
 
 seqList (seqList< T > &&rvalue)
 
virtual ~seqList ()
 
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
 
virtual iterator begin ()
 
virtual const_iterator begin () const
 
virtual iterator end ()
 
virtual const_iterator end () const
 

Private Member Functions

void doubleSpace ()
 

Private Attributes

T * data
 
int currentLength
 
int maxSize
 

Detailed Description

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

Definition at line 22 of file seqList.h.

Constructor & Destructor Documentation

◆ seqList() [1/3]

template<class T >
List::seqList< T >::seqList ( int  initSize = 10)

Definition at line 139 of file seqList.h.

◆ seqList() [2/3]

template<class T >
List::seqList< T >::seqList ( const seqList< T > &  rhs)

Definition at line 155 of file seqList.h.

References List::seqList< T >::maxSize.

◆ seqList() [3/3]

template<class T >
List::seqList< T >::seqList ( seqList< T > &&  rvalue)

Definition at line 146 of file seqList.h.

◆ ~seqList()

template<class T >
List::seqList< T >::~seqList
virtual

Definition at line 105 of file seqList.h.

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 97 of file seqList.h.

References List::seqList< T >::data.

◆ begin() [2/2]

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

Definition at line 98 of file seqList.h.

References List::seqList< T >::data.

◆ clear()

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

Implements List::List< T >.

Definition at line 111 of file seqList.h.

◆ doubleSpace()

template<class T >
void List::seqList< T >::doubleSpace
private

Definition at line 173 of file seqList.h.

◆ end() [1/2]

template<typename T >
virtual iterator List::seqList< T >::end ( )
inlinevirtual

Definition at line 99 of file seqList.h.

References List::seqList< T >::currentLength, and List::seqList< T >::data.

◆ end() [2/2]

template<typename T >
virtual const_iterator List::seqList< T >::end ( ) const
inlinevirtual

Definition at line 100 of file seqList.h.

References List::seqList< T >::currentLength, and List::seqList< T >::data.

◆ insert()

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

Implements List::List< T >.

Definition at line 184 of file seqList.h.

Referenced by List::operator+().

Here is the caller graph for this function:

◆ length()

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

Implements List::List< T >.

Definition at line 117 of file seqList.h.

Referenced by List::operator+().

Here is the caller graph for this function:

◆ remove()

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

Implements List::List< T >.

Definition at line 196 of file seqList.h.

◆ search()

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

Implements List::List< T >.

Definition at line 163 of file seqList.h.

◆ traverse()

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

Definition at line 129 of file seqList.h.

◆ visit()

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

Implements List::List< T >.

Definition at line 123 of file seqList.h.

Referenced by List::operator+().

Here is the caller graph for this function:

Member Data Documentation

◆ currentLength

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

Definition at line 26 of file seqList.h.

Referenced by List::seqList< T >::end().

◆ data

template<typename T >
T* List::seqList< T >::data
private

Definition at line 25 of file seqList.h.

Referenced by List::seqList< T >::begin(), and List::seqList< T >::end().

◆ maxSize

template<typename T >
int List::seqList< T >::maxSize
private

Definition at line 27 of file seqList.h.

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


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