/ CPP_Modules / CPP_Module_08 / ex02 / MutantStack.hpp
MutantStack.hpp
 1  /* ************************************************************************** */
 2  /*                                                                            */
 3  /*                                                        :::      ::::::::   */
 4  /*   MutantStack.hpp                                    :+:      :+:    :+:   */
 5  /*                                                    +:+ +:+         +:+     */
 6  /*   By: gychoi <gychoi@student.42seoul.kr>         +#+  +:+       +#+        */
 7  /*                                                +#+#+#+#+#+   +#+           */
 8  /*   Created: 2023/12/31 01:17:49 by gychoi            #+#    #+#             */
 9  /*   Updated: 2023/12/31 02:59:58 by gychoi           ###   ########.fr       */
10  /*                                                                            */
11  /* ************************************************************************** */
12  
13  #ifndef __MUTANTSTACK_HPP__
14  #define __MUTANTSTACK_HPP__
15  
16  #include <deque>
17  #include <stack>
18  
19  template <typename T>
20  class MutantStack : public std::stack<T>
21  {
22  public:
23  	MutantStack();
24  	MutantStack(MutantStack const& other);
25  	MutantStack&	operator=(MutantStack const& other);
26  	virtual ~MutantStack();
27  
28  public:
29  	typedef typename std::stack<T>::container_type::iterator
30  													iterator;
31  	typedef typename std::stack<T>::container_type::reverse_iterator
32  													reverse_iterator;
33  	typedef typename std::stack<T>::container_type::const_iterator
34  													const_iterator;
35  	typedef typename std::stack<T>::container_type::const_reverse_iterator
36  													const_reverse_iterator;
37  
38  public:
39  	iterator				begin();
40  	iterator				end();
41  	const_iterator			begin() const;
42  	const_iterator			end() const;
43  	reverse_iterator		rbegin();
44  	reverse_iterator		rend();
45  	const_reverse_iterator	rbegin() const;
46  	const_reverse_iterator	rend() const;
47  };
48  
49  #include "MutantStack.tpp"
50  #endif /* __MUTANTSTACK_HPP__ */