树  0.1
数据结构_第6章
Queue::Queue< T > Class Template Referenceabstract

队列的抽象类 More...

#include <Queue.h>

Inheritance diagram for Queue::Queue< T >:
Collaboration diagram for Queue::Queue< T >:

Public Types

typedef T value_type
 类型别名定义 More...
 
typedef value_typereference
 数据的引用 More...
 
typedef size_t size_type
 计数器类型 More...
 

Public Member Functions

virtual bool isEmpty () const =0
 判队空 More...
 
virtual void enQueue (const value_type &x)=0
 入队一个元素 More...
 
virtual value_type deQueue ()=0
 出队一个元素 More...
 
virtual value_type getHead () const =0
 Get the Head object. More...
 
virtual ~Queue ()=default
 Destroy the Queue object. More...
 

Public Attributes

const typedef value_typeconst_reference
 数据的常量引用 More...
 

Detailed Description

template<typename T>
class Queue::Queue< T >

队列的抽象类

Template Parameters
T数据的类型

Definition at line 45 of file Queue.h.

Member Typedef Documentation

◆ reference

template<typename T >
typedef value_type& Queue::Queue< T >::reference

数据的引用

Definition at line 67 of file Queue.h.

◆ size_type

template<typename T >
typedef size_t Queue::Queue< T >::size_type

计数器类型

Definition at line 69 of file Queue.h.

◆ value_type

template<typename T >
typedef T Queue::Queue< T >::value_type

类型别名定义

Note
测试:能否从被派生类继承 数据类型

Definition at line 66 of file Queue.h.

Constructor & Destructor Documentation

◆ ~Queue()

template<typename T >
virtual Queue::Queue< T >::~Queue ( )
virtualdefault

Destroy the Queue object.

Member Function Documentation

◆ deQueue()

template<typename T >
virtual value_type Queue::Queue< T >::deQueue ( )
pure virtual

出队一个元素

Returns
value_type 出队数据的值

Implemented in Queue::linkQueue< T >, Queue::seqQueue< T >, and Queue::vecQueue< T >.

◆ enQueue()

template<typename T >
virtual void Queue::Queue< T >::enQueue ( const value_type x)
pure virtual

入队一个元素

Parameters
x数据的值

◆ getHead()

template<typename T >
virtual value_type Queue::Queue< T >::getHead ( ) const
pure virtual

Get the Head object.

Returns
value_type 队首元素的值

Implemented in Queue::linkQueue< T >, Queue::seqQueue< T >, and Queue::vecQueue< T >.

◆ isEmpty()

template<typename T >
virtual bool Queue::Queue< T >::isEmpty ( ) const
pure virtual

判队空

Returns
true 队空
false 队非空

Implemented in Queue::linkQueue< T >, Queue::seqQueue< T >, and Queue::vecQueue< T >.

Member Data Documentation

◆ const_reference

template<typename T >
const typedef value_type& Queue::Queue< T >::const_reference

数据的常量引用

Definition at line 68 of file Queue.h.


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