Ponca  7df32c91629c89b89840c4d7917cb272433f2d2b
Point Cloud Analysis library
Loading...
Searching...
No Matches
stack.hpp
1
9namespace Ponca
10{
11 template <class T, int N>
12 Stack<T, N>::Stack() : m_size(0), m_data()
13 {
14 }
15
16 template <class T, int N>
17 const T& Stack<T, N>::top() const
18 {
19 return STD_SAFE_AT(m_data, m_size - 1);
20 }
21
22 template <class T, int N>
24 {
25 return STD_SAFE_AT(m_data, m_size - 1);
26 }
27
28 template <class T, int N>
29 bool Stack<T, N>::empty() const
30 {
31 return m_size == 0;
32 }
33
34 template <class T, int N>
36 {
37 return m_size;
38 }
40 template <class T, int N>
41 void Stack<T, N>::push(const T& value)
42 {
43 STD_SAFE_AT(m_data, m_size) = value;
44 ++m_size;
45 }
46
47 template <class T, int N>
49 {
50 ++m_size;
51 }
53 template <class T, int N>
55 {
56 --m_size;
57 }
58
59 template <class T, int N>
61 {
62 m_size = 0;
63 }
64
65} // namespace Ponca
Aggregator class used to declare specialized structures using CRTP.
Definition basket.h:257
Stack with fixed-size storage.
Definition stack.h:26
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition bitset.h:17