Box2D  3.0.0
A Real-Time-Oriented 2-D Physics Engine
Public Types | Public Member Functions | Static Public Attributes | List of all members
box2d::GrowableStack< T, N > Class Template Reference

This is a growable LIFO stack with an initial capacity of N. If the stack size exceeds the initial capacity, the heap is used to increase the size of the stack. More...

#include <GrowableStack.hpp>

Public Types

using size_type = size_t
 

Public Member Functions

 GrowableStack ()=default
 
 ~GrowableStack () noexcept
 
void Push (const T &element)
 
Pop ()
 
constexpr size_type GetCount () const noexcept
 

Static Public Attributes

static constexpr auto BufferGrowthRate = size_type{2}
 

Detailed Description

template<typename T, size_t N>
class box2d::GrowableStack< T, N >

This is a growable LIFO stack with an initial capacity of N. If the stack size exceeds the initial capacity, the heap is used to increase the size of the stack.

Member Typedef Documentation

◆ size_type

template<typename T , size_t N>
using box2d::GrowableStack< T, N >::size_type = size_t

Constructor & Destructor Documentation

◆ GrowableStack()

template<typename T , size_t N>
box2d::GrowableStack< T, N >::GrowableStack ( )
default

◆ ~GrowableStack()

template<typename T , size_t N>
box2d::GrowableStack< T, N >::~GrowableStack ( )
inlinenoexcept

Member Function Documentation

◆ GetCount()

template<typename T , size_t N>
constexpr size_type box2d::GrowableStack< T, N >::GetCount ( ) const
inlinenoexcept

◆ Pop()

template<typename T , size_t N>
T box2d::GrowableStack< T, N >::Pop ( )
inline

◆ Push()

template<typename T , size_t N>
void box2d::GrowableStack< T, N >::Push ( const T &  element)
inline

Member Data Documentation

◆ BufferGrowthRate

template<typename T , size_t N>
constexpr auto box2d::GrowableStack< T, N >::BufferGrowthRate = size_type{2}
static

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