35 template<
typename TYPE,
36 template <
typename,
typename>
typename SERIAL =
chain,
37 template <
typename>
typename ALLOC =
allocator>
47 explicit stack(
const SERIAL<TYPE, ALLOC<TYPE>>&
serial = SERIAL<TYPE, ALLOC<TYPE>>{});
55 stack(
const std::initializer_list<TYPE>& lst);
96 void push(
const TYPE& e);
123 [[nodiscard]] std::string
className()
const override;
127 template<
typename TYPE,
128 template <
typename,
typename>
typename SERIAL,
129 template <
typename>
typename ALLOC>
133 template<
typename TYPE,
134 template <
typename,
typename>
typename SERIAL,
135 template <
typename>
typename ALLOC>
137 :
stack(SERIAL<TYPE, ALLOC<TYPE>>(lst)) {}
139 template<
typename TYPE,
140 template <
typename,
typename>
typename SERIAL,
141 template <
typename>
typename ALLOC>
145 template<
typename TYPE,
146 template <
typename,
typename>
typename SERIAL,
147 template <
typename>
typename ALLOC>
149 if (
this == &other)
return *
this;
154 template<
typename TYPE,
155 template <
typename,
typename>
typename SERIAL,
156 template <
typename>
typename ALLOC>
162template<
typename TYPE,
163 template <
typename,
typename>
typename SERIAL,
164 template <
typename>
typename ALLOC>
170 this->
serial_ = std::move(other.serial_);
171 other.serial_ = SERIAL<TYPE, ALLOC<TYPE>>{};
175 template<
typename TYPE,
176 template <
typename,
typename>
typename SERIAL,
177 template <
typename>
typename ALLOC>
182 template<
typename TYPE,
183 template <
typename,
typename>
typename SERIAL,
184 template <
typename>
typename ALLOC>
189 template<
typename TYPE,
190 template <
typename,
typename>
typename SERIAL,
191 template <
typename>
typename ALLOC>
196 template<
typename TYPE,
197 template <
typename,
typename>
typename SERIAL,
198 template <
typename>
typename ALLOC>
Non-cyclic doubly linked list implementation.
Default memory allocator using allocators utilities.
Definition allocator.h:154
Non-cyclic doubly linked list container.
Definition chain.h:36
chain< TYPE, allocator< TYPE > > serial_
Definition containerAdapter.h:60
containerAdapter(const chain< TYPE, allocator< TYPE > > &serial)
Definition containerAdapter.h:139
Abstract base class for sequential containers with index-based access.
Definition serial.h:34
TYPE top() const
Accesses the top element of the stack.
Definition stack.h:192
stack & operator=(const stack &other)
Copy assignment operator.
Definition stack.h:148
void push(const TYPE &e)
Pushes element to the top of the stack.
Definition stack.h:178
TYPE pop()
Removes and returns top element from the stack.
Definition stack.h:185
stack(const SERIAL< TYPE, ALLOC< TYPE > > &serial=SERIAL< TYPE, ALLOC< TYPE > >{})
Constructs a stack with specified underlying container and allocator.
Definition stack.h:130
std::string className() const override
Gets the class name identifier.
Definition stack.h:199
Base class for container adapters with common interfaces.
Main namespace for the project Original.
Definition algorithms.h:21