树  0.1
数据结构_第6章
Stack::linkStack< T > Class Template Reference

#include <linkStack.hpp>

Inheritance diagram for Stack::linkStack< T >:
Collaboration diagram for Stack::linkStack< T >:

Classes

struct  node
 

Public Member Functions

 linkStack ()
 
 linkStack (std::initializer_list< T > &&il)
 
virtual bool isEmpty () const
 
virtual void push (const T &elem)
 
virtual void push (T &&elem)
 
virtual T pop ()
 
virtual T top () const
 
virtual ~linkStack ()
 
- Public Member Functions inherited from Stack::Stack< T >
virtual ~Stack ()=default
 

Private Attributes

nodetop_p
 

Detailed Description

template<typename T>
class Stack::linkStack< T >

Definition at line 36 of file linkStack.hpp.

Constructor & Destructor Documentation

◆ linkStack() [1/2]

template<class T >
Stack::linkStack< T >::linkStack

Definition at line 66 of file linkStack.hpp.

◆ linkStack() [2/2]

template<class T >
Stack::linkStack< T >::linkStack ( std::initializer_list< T > &&  il)

Definition at line 72 of file linkStack.hpp.

◆ ~linkStack()

template<class T >
Stack::linkStack< T >::~linkStack
virtual

Definition at line 80 of file linkStack.hpp.

References Stack::linkStack< T >::top_p.

Member Function Documentation

◆ isEmpty()

template<class T >
bool Stack::linkStack< T >::isEmpty
virtual

Implements Stack::Stack< T >.

Definition at line 121 of file linkStack.hpp.

◆ pop()

template<class T >
T Stack::linkStack< T >::pop
virtual

Implements Stack::Stack< T >.

Definition at line 103 of file linkStack.hpp.

References Stack::linkStack< T >::node::data, and Stack::linkStack< T >::top_p.

◆ push() [1/2]

template<class T >
void Stack::linkStack< T >::push ( const T &  elem)
virtual

◆ push() [2/2]

template<class T >
void Stack::linkStack< T >::push ( T &&  elem)
virtual

Definition at line 97 of file linkStack.hpp.

◆ top()

template<class T >
T Stack::linkStack< T >::top
virtual

Implements Stack::Stack< T >.

Definition at line 115 of file linkStack.hpp.

Member Data Documentation

◆ top_p

template<typename T >
node* Stack::linkStack< T >::top_p
private

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