|
队列
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 |
| Êý¾ÝµÄ³£Á¿ÒýÓà 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 |
³ö¶ÓÒ»¸öÔªËØ
Implements Queue::Queue< T >.
Definition at line 173 of file linkQueue.hh.
| 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 |
Êý¾ÝµÄ³£Á¿ÒýÓÃ
Definition at line 69 of file linkQueue.hh.