AlgoPlus v0.1.0
Loading...
Searching...
No Matches
stack_list< T > Class Template Reference

stack_list class More...

#include <stack_list.h>

Classes

class  Iterator
 Iterator class. More...
 

Public Member Functions

 stack_list (std::vector< T > v={}) noexcept
 Construct a new stack list object.
 
 stack_list (const stack_list &s)
 Copy constructor for stack list class.
 
stack_listoperator= (const stack_list &s)
 operator = for stack list class
 
void clear ()
 clear function
 
size_t size ()
 size functon
 
void push (T key)
 push function
 
top ()
 top function
 
void pop ()
 pop function removes the top of the stack
 
Iterator begin ()
 pointer to the top of the stack
 
Iterator end ()
 pointer to the end of the stack
 

Detailed Description

template<typename T>
class stack_list< T >

stack_list class

Constructor & Destructor Documentation

◆ stack_list() [1/2]

template<typename T >
stack_list< T >::stack_list ( std::vector< T > v = {})
inlineexplicitnoexcept

Construct a new stack list object.

Parameters
vinitializer vector

◆ stack_list() [2/2]

template<typename T >
stack_list< T >::stack_list ( const stack_list< T > & s)
inlineexplicit

Copy constructor for stack list class.

Parameters
sthe stack we want to copy

Member Function Documentation

◆ begin()

template<typename T >
Iterator stack_list< T >::begin ( )
inline

pointer to the top of the stack

Returns
Iterator

◆ end()

template<typename T >
Iterator stack_list< T >::end ( )
inline

pointer to the end of the stack

Returns
Iterator

◆ operator=()

template<typename T >
stack_list & stack_list< T >::operator= ( const stack_list< T > & s)
inline

operator = for stack list class

Parameters
sthe stack we want to copy
Returns
stack_list&

◆ push()

template<typename T >
void stack_list< T >::push ( T key)
inline

push function

Parameters
keythe key to be pushed

◆ size()

template<typename T >
size_t stack_list< T >::size ( )
inline

size functon

Returns
size_t the size of the stack

◆ top()

template<typename T >
T stack_list< T >::top ( )
inline

top function

Returns
T the top of the stack

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