RetroArch
Public Member Functions | Private Member Functions | Private Attributes | List of all members
internal::Stack< Allocator > Class Template Reference

A type-unsafe stack for storing different types of data. More...

#include <stack.h>

Collaboration diagram for internal::Stack< Allocator >:
[legend]

Public Member Functions

 Stack (Allocator *allocator, size_t stackCapacity)
 
 ~Stack ()
 
void Swap (Stack &rhs) RAPIDJSON_NOEXCEPT
 
void Clear ()
 
void ShrinkToFit ()
 
template<typename T >
RAPIDJSON_FORCEINLINE void Reserve (size_t count=1)
 
template<typename T >
RAPIDJSON_FORCEINLINE TPush (size_t count=1)
 
template<typename T >
RAPIDJSON_FORCEINLINE TPushUnsafe (size_t count=1)
 
template<typename T >
TPop (size_t count)
 
template<typename T >
TTop ()
 
template<typename T >
const TTop () const
 
template<typename T >
TEnd ()
 
template<typename T >
const TEnd () const
 
template<typename T >
TBottom ()
 
template<typename T >
const TBottom () const
 
bool HasAllocator () const
 
Allocator & GetAllocator ()
 
bool Empty () const
 
size_t GetSize () const
 
size_t GetCapacity () const
 

Private Member Functions

template<typename T >
void Expand (size_t count)
 
void Resize (size_t newCapacity)
 
void Destroy ()
 
 Stack (const Stack &)
 
Stackoperator= (const Stack &)
 

Private Attributes

Allocator * allocator_
 
Allocator * ownAllocator_
 
char * stack_
 
char * stackTop_
 
char * stackEnd_
 
size_t initialCapacity_
 

Detailed Description

template<typename Allocator>
class internal::Stack< Allocator >

A type-unsafe stack for storing different types of data.

Template Parameters
AllocatorAllocator for allocating stack memory.

Constructor & Destructor Documentation

◆ Stack() [1/2]

template<typename Allocator>
internal::Stack< Allocator >::Stack ( Allocator *  allocator,
size_t  stackCapacity 
)
inline

◆ ~Stack()

template<typename Allocator>
internal::Stack< Allocator >::~Stack ( )
inline

◆ Stack() [2/2]

template<typename Allocator>
internal::Stack< Allocator >::Stack ( const Stack< Allocator > &  )
private

Member Function Documentation

◆ Bottom() [1/2]

template<typename Allocator>
template<typename T >
T* internal::Stack< Allocator >::Bottom ( )
inline

◆ Bottom() [2/2]

template<typename Allocator>
template<typename T >
const T* internal::Stack< Allocator >::Bottom ( ) const
inline

◆ Clear()

template<typename Allocator>
void internal::Stack< Allocator >::Clear ( )
inline
Here is the caller graph for this function:

◆ Destroy()

template<typename Allocator>
void internal::Stack< Allocator >::Destroy ( )
inlineprivate
Here is the caller graph for this function:

◆ Empty()

template<typename Allocator>
bool internal::Stack< Allocator >::Empty ( ) const
inline
Here is the caller graph for this function:

◆ End() [1/2]

template<typename Allocator>
template<typename T >
T* internal::Stack< Allocator >::End ( )
inline

◆ End() [2/2]

template<typename Allocator>
template<typename T >
const T* internal::Stack< Allocator >::End ( ) const
inline

◆ Expand()

template<typename Allocator>
template<typename T >
void internal::Stack< Allocator >::Expand ( size_t  count)
inlineprivate

◆ GetAllocator()

template<typename Allocator>
Allocator& internal::Stack< Allocator >::GetAllocator ( )
inline
Here is the caller graph for this function:

◆ GetCapacity()

template<typename Allocator>
size_t internal::Stack< Allocator >::GetCapacity ( ) const
inline
Here is the caller graph for this function:

◆ GetSize()

template<typename Allocator>
size_t internal::Stack< Allocator >::GetSize ( ) const
inline
Here is the caller graph for this function:

◆ HasAllocator()

template<typename Allocator>
bool internal::Stack< Allocator >::HasAllocator ( ) const
inline
Here is the caller graph for this function:

◆ operator=()

template<typename Allocator>
Stack& internal::Stack< Allocator >::operator= ( const Stack< Allocator > &  )
private

◆ Pop()

template<typename Allocator>
template<typename T >
T* internal::Stack< Allocator >::Pop ( size_t  count)
inline

◆ Push()

template<typename Allocator>
template<typename T >
RAPIDJSON_FORCEINLINE T* internal::Stack< Allocator >::Push ( size_t  count = 1)
inline

◆ PushUnsafe()

template<typename Allocator>
template<typename T >
RAPIDJSON_FORCEINLINE T* internal::Stack< Allocator >::PushUnsafe ( size_t  count = 1)
inline

◆ Reserve()

template<typename Allocator>
template<typename T >
RAPIDJSON_FORCEINLINE void internal::Stack< Allocator >::Reserve ( size_t  count = 1)
inline

◆ Resize()

template<typename Allocator>
void internal::Stack< Allocator >::Resize ( size_t  newCapacity)
inlineprivate
Here is the caller graph for this function:

◆ ShrinkToFit()

template<typename Allocator>
void internal::Stack< Allocator >::ShrinkToFit ( )
inline
Here is the caller graph for this function:

◆ Swap()

template<typename Allocator>
void internal::Stack< Allocator >::Swap ( Stack< Allocator > &  rhs)
inline
Here is the caller graph for this function:

◆ Top() [1/2]

template<typename Allocator>
template<typename T >
T* internal::Stack< Allocator >::Top ( )
inline

◆ Top() [2/2]

template<typename Allocator>
template<typename T >
const T* internal::Stack< Allocator >::Top ( ) const
inline

Member Data Documentation

◆ allocator_

template<typename Allocator>
Allocator* internal::Stack< Allocator >::allocator_
private

◆ initialCapacity_

template<typename Allocator>
size_t internal::Stack< Allocator >::initialCapacity_
private

◆ ownAllocator_

template<typename Allocator>
Allocator* internal::Stack< Allocator >::ownAllocator_
private

◆ stack_

template<typename Allocator>
char* internal::Stack< Allocator >::stack_
private

◆ stackEnd_

template<typename Allocator>
char* internal::Stack< Allocator >::stackEnd_
private

◆ stackTop_

template<typename Allocator>
char* internal::Stack< Allocator >::stackTop_
private

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