树
0.1
数据结构_第6章
|
链接队列类 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 |
数据的常量引用 More... | |
Private Attributes | |
node * | _front |
指向队首结点 More... | |
node * | _rear |
指向队尾结点 More... | |
size_type | _size |
队列中当前元素个数 More... | |
Private Attributes inherited from Queue::Queue< T > | |
const typedef value_type & | const_reference |
数据的常量引用 More... | |
Additional Inherited Members | |
Private Types inherited from Queue::Queue< T > | |
typedef T | value_type |
类型别名定义 More... | |
typedef value_type & | reference |
数据的引用 More... | |
typedef size_t | size_type |
计数器类型 More... | |
Private Member Functions inherited from Queue::Queue< T > | |
virtual void | enQueue (const value_type &x)=0 |
入队一个元素 More... | |
virtual | ~Queue ()=default |
Destroy the Queue object. 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.
|
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.
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.
void Queue::linkQueue< T >::pop |
Removes the next element in the queue.
Definition at line 322 of file linkQueue.hh.
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.
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.
|
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 |
数据的常量引用
Definition at line 69 of file linkQueue.hh.