Public Member Functions | Private Attributes | List of all members
b2GrowableStack< T, N > Class Template Reference

#include <b2_growable_stack.h>

Public Member Functions

 b2GrowableStack ()
 
int32 GetCount ()
 
Pop ()
 
void Push (const T &element)
 
 ~b2GrowableStack ()
 

Private Attributes

m_array [N]
 
int32 m_capacity
 
int32 m_count
 
T * m_stack
 

Detailed Description

template<typename T, int32 N>
class b2GrowableStack< 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.

Definition at line 34 of file b2_growable_stack.h.

Constructor & Destructor Documentation

◆ b2GrowableStack()

template<typename T, int32 N>
b2GrowableStack< T, N >::b2GrowableStack ( )
inline

Definition at line 37 of file b2_growable_stack.h.

◆ ~b2GrowableStack()

template<typename T, int32 N>
b2GrowableStack< T, N >::~b2GrowableStack ( )
inline

Definition at line 44 of file b2_growable_stack.h.

Member Function Documentation

◆ GetCount()

template<typename T, int32 N>
int32 b2GrowableStack< T, N >::GetCount ( )
inline

Definition at line 78 of file b2_growable_stack.h.

◆ Pop()

template<typename T, int32 N>
T b2GrowableStack< T, N >::Pop ( )
inline

Definition at line 71 of file b2_growable_stack.h.

◆ Push()

template<typename T, int32 N>
void b2GrowableStack< T, N >::Push ( const T &  element)
inline

Definition at line 53 of file b2_growable_stack.h.

Member Data Documentation

◆ m_array

template<typename T, int32 N>
T b2GrowableStack< T, N >::m_array[N]
private

Definition at line 85 of file b2_growable_stack.h.

◆ m_capacity

template<typename T, int32 N>
int32 b2GrowableStack< T, N >::m_capacity
private

Definition at line 87 of file b2_growable_stack.h.

◆ m_count

template<typename T, int32 N>
int32 b2GrowableStack< T, N >::m_count
private

Definition at line 86 of file b2_growable_stack.h.

◆ m_stack

template<typename T, int32 N>
T* b2GrowableStack< T, N >::m_stack
private

Definition at line 84 of file b2_growable_stack.h.


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


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22