队列
0.1
数据结构_第4章
|
Ӷ More...
#include <linkQueue.hh>
Classes | |
struct | node |
linkQueueĽ More... | |
Public Types | |
typedef T | value_type |
ͱ More... | |
typedef value_type & | reference |
ݵ More... | |
typedef size_t | size_type |
More... | |
Public Member Functions | |
linkQueue () | |
Construct a new link Queue object. More... | |
virtual | ~linkQueue () |
Destroy the link Queue object. More... | |
virtual bool | isEmpty () const |
жӿ More... | |
virtual void | enQueue (const_reference &x) |
һԪ More... | |
virtual value_type | deQueue () |
һԪ More... | |
virtual value_type | getHead () const |
Get the Head object. More... | |
bool | empty () const |
Test whether container is empty. More... | |
size_type | size () const |
Returns the number of elements in the queue. More... | |
reference & | front () |
Returns a reference to the next element in the queue. More... | |
const_reference & | front () const |
Returns a reference to the next element in the queue. More... | |
reference & | back () |
Returns a reference to the last element in the queue. More... | |
const_reference & | back () const |
Returns a reference to the last element in the queue. More... | |
void | push (const value_type &val) |
Inserts a new element at the end of the queue, after its current last element. More... | |
void | push (value_type &&val) |
Inserts a new element at the end of the queue. More... | |
void | pop () |
Removes the next element in the queue. More... | |
Public Attributes | |
const typedef value_type & | const_reference |
ݵij More... | |
Private Member Functions | |
virtual void | enQueue (const value_type &x)=0 |
入队一个元素 More... | |
Private Attributes | |
node * | _front |
ָ More... | |
node * | _rear |
ָβ More... | |
size_type | _size |
еǰԪظ More... | |
Ӷ
T | ݵ |
Definition at line 46 of file linkQueue.hh.
typedef value_type& Queue::linkQueue< T >::reference |
ݵ
Definition at line 68 of file linkQueue.hh.
typedef size_t Queue::linkQueue< T >::size_type |
Definition at line 70 of file linkQueue.hh.
typedef T Queue::linkQueue< T >::value_type |
Queue::linkQueue< T >::linkQueue |
Construct a new link Queue object.
Definition at line 246 of file linkQueue.hh.
|
virtual |
Destroy the link Queue object.
Definition at line 252 of file linkQueue.hh.
linkQueue< T >::const_reference & Queue::linkQueue< T >::back |
Returns a reference to the last element in the queue.
Definition at line 288 of file linkQueue.hh.
const_reference& Queue::linkQueue< T >::back | ( | ) | const |
Returns a reference to the last element in the queue.
|
inlinevirtual |
bool Queue::linkQueue< T >::empty |
Test whether container is empty.
Definition at line 264 of file linkQueue.hh.
|
pure virtualinherited |
入队一个元素
x | 数据的值 |
|
inlinevirtual |
linkQueue< T >::const_reference & Queue::linkQueue< T >::front |
Returns a reference to the next element in the queue.
Definition at line 276 of file linkQueue.hh.
Referenced by main().
const_reference& Queue::linkQueue< T >::front | ( | ) | const |
Returns a reference to the next element in the queue.
|
inlinevirtual |
Get the Head object.
Implements Queue::Queue< T >.
Definition at line 185 of file linkQueue.hh.
|
inlinevirtual |
жӿ
Implements Queue::Queue< T >.
Definition at line 153 of file linkQueue.hh.
Referenced by main().
void Queue::linkQueue< T >::pop |
Removes the next element in the queue.
Definition at line 322 of file linkQueue.hh.
Referenced by main().
void Queue::linkQueue< T >::push | ( | const value_type & | val | ) |
Inserts a new element at the end of the queue, after its current last element.
val | ݵֵ |
Definition at line 300 of file linkQueue.hh.
Referenced by main().
void Queue::linkQueue< T >::push | ( | value_type && | val | ) |
Inserts a new element at the end of the queue.
val | ݵֵ |
Definition at line 311 of file linkQueue.hh.
References Queue::linkQueue< T >::node::_next.
linkQueue< T >::size_type Queue::linkQueue< T >::size |
Returns the number of elements in the queue.
Definition at line 270 of file linkQueue.hh.
Referenced by main().
|
private |
ָ
Definition at line 120 of file linkQueue.hh.
|
private |
ָβ
Definition at line 126 of file linkQueue.hh.
|
private |
еǰԪظ
Definition at line 132 of file linkQueue.hh.
const typedef value_type& Queue::linkQueue< T >::const_reference |
ݵij
Definition at line 69 of file linkQueue.hh.