数据结构实验5
Classes | Public Member Functions | List of all members
my::deque< T > Class Template Reference

#include <deque.h>

Classes

class  const_iterator
 
class  iterator
 
struct  Node
 

Public Member Functions

size_type size () const noexcept
 
size_type max_size () const noexcept
 
bool empty () const noexcept
 
void push_front (const T &x)
 
void push_front (T &&x)
 
void push_back (const T &x)
 
void push_back (T &&x)
 
void pop_front ()
 
void pop_back ()
 
T & front ()
 
const T & front () const
 
T & back ()
 
const T & back () const
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 
iterator begin () noexcept
 
iterator end () noexcept
 
T & at (size_type pos)
 
const T & at (size_type pos) const
 
T & operator[] (size_type pos) noexcept
 
const T & operator[] (size_type pos) const noexcept
 
 deque ()
 
 deque (const deque &x)
 
dequeoperator= (const deque &x)
 
 deque (deque &&x) noexcept
 
dequeoperator= (deque &&x) noexcept
 
 deque (std::initializer_list< T > x)
 
dequeoperator= (std::initializer_list< T > x)
 
 ~deque ()
 

Constructor & Destructor Documentation

◆ deque() [1/4]

template<typename T >
my::deque< T >::deque ( )
inline

默认构造函数

◆ deque() [2/4]

template<typename T >
my::deque< T >::deque ( const deque< T > &  x)
inline

拷贝构造函数

Parameters
xdeque的常左值引用

◆ deque() [3/4]

template<typename T >
my::deque< T >::deque ( deque< T > &&  x)
inlinenoexcept

移动构造函数

Parameters
xdeque类型右值

◆ deque() [4/4]

template<typename T >
my::deque< T >::deque ( std::initializer_list< T >  x)
inline

列表初始化函数

接受一个大括号列表

Parameters
xstd::initializer_list类型

◆ ~deque()

template<typename T >
my::deque< T >::~deque ( )
inline

析构函数

Member Function Documentation

◆ at() [1/2]

template<typename T >
T& my::deque< T >::at ( size_type  pos)
inline

◆ at() [2/2]

template<typename T >
const T& my::deque< T >::at ( size_type  pos) const
inline

◆ back() [1/2]

template<typename T >
T& my::deque< T >::back ( )
inline

◆ back() [2/2]

template<typename T >
const T& my::deque< T >::back ( ) const
inline

◆ begin() [1/2]

template<typename T >
const_iterator my::deque< T >::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

template<typename T >
iterator my::deque< T >::begin ( )
inlinenoexcept

◆ empty()

template<typename T >
bool my::deque< T >::empty ( ) const
inlinenoexcept

◆ end() [1/2]

template<typename T >
const_iterator my::deque< T >::end ( ) const
inlinenoexcept

◆ end() [2/2]

template<typename T >
iterator my::deque< T >::end ( )
inlinenoexcept

◆ front() [1/2]

template<typename T >
T& my::deque< T >::front ( )
inline

◆ front() [2/2]

template<typename T >
const T& my::deque< T >::front ( ) const
inline

◆ max_size()

template<typename T >
size_type my::deque< T >::max_size ( ) const
inlinenoexcept

返回队列最大长度

[[nodiscard]]指让编译器提醒用户不要忽略函数返回值

Returns
队列最大长度:size_type

◆ operator=() [1/3]

template<typename T >
deque& my::deque< T >::operator= ( const deque< T > &  x)
inline

拷贝赋值函数

Parameters
xdeque的左值引用

◆ operator=() [2/3]

template<typename T >
deque& my::deque< T >::operator= ( deque< T > &&  x)
inlinenoexcept

移动赋值函数

Parameters
xdeque类型右值

◆ operator=() [3/3]

template<typename T >
deque& my::deque< T >::operator= ( std::initializer_list< T >  x)
inline

列表初始化函数

接受一个大括号列表

Parameters
xstd::initializer_list类型

◆ operator[]() [1/2]

template<typename T >
const T& my::deque< T >::operator[] ( size_type  pos) const
inlinenoexcept

◆ operator[]() [2/2]

template<typename T >
T& my::deque< T >::operator[] ( size_type  pos)
inlinenoexcept

◆ pop_back()

template<typename T >
void my::deque< T >::pop_back ( )
inline

◆ pop_front()

template<typename T >
void my::deque< T >::pop_front ( )
inline

◆ push_back() [1/2]

template<typename T >
void my::deque< T >::push_back ( const T &  x)
inline

◆ push_back() [2/2]

template<typename T >
void my::deque< T >::push_back ( T &&  x)
inline

◆ push_front() [1/2]

template<typename T >
void my::deque< T >::push_front ( const T &  x)
inline

◆ push_front() [2/2]

template<typename T >
void my::deque< T >::push_front ( T &&  x)
inline

◆ size()

template<typename T >
size_type my::deque< T >::size ( ) const
inlinenoexcept

返回当前队列长度

Returns
队列长度:size_type

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