|
Photon Engine 2.0.0-beta
A physically based renderer.
|
A fixed size stack backed by an array. The container inherits the properties of a fixed size array of type T. The container keeps all N elements alive until its lifetime ends, even if elements are popped/removed from the stack. It is guaranteed that no dynamic memory allocation takes place.
More...
#include <TArrayStack.h>
Public Member Functions | |
| TArrayStack () | |
| template<typename U > | |
| void | push (U &&item) |
| Adds an item to the stack. The item originally at the target index will be overwritten. | |
| void | pop () |
| Removes the top item from the stack. The item originally at the target index is still alive after this call. | |
| T & | top () |
| const T & | top () const |
| std::size_t | height () const |
| void | clear () |
| bool | isEmpty () const |
| T & | operator[] (std::size_t index) |
| const T & | operator[] (std::size_t index) const |
A fixed size stack backed by an array. The container inherits the properties of a fixed size array of type T. The container keeps all N elements alive until its lifetime ends, even if elements are popped/removed from the stack. It is guaranteed that no dynamic memory allocation takes place.
|
inline |
Creates empty stack.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Removes the top item from the stack. The item originally at the target index is still alive after this call.
|
inline |
Adds an item to the stack. The item originally at the target index will be overwritten.
|
inline |
|
inline |