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>

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

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.

Definition at line 36 of file stack.h.

Constructor & Destructor Documentation

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

Definition at line 40 of file stack.h.

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

Definition at line 61 of file stack.h.

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

Member Function Documentation

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

Definition at line 162 of file stack.h.

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

Definition at line 165 of file stack.h.

template<typename Allocator>
void internal::Stack< Allocator >::Clear ( )
inline

Definition at line 98 of file stack.h.

template<typename Allocator>
void internal::Stack< Allocator >::Destroy ( )
inlineprivate

Definition at line 207 of file stack.h.

template<typename Allocator>
bool internal::Stack< Allocator >::Empty ( ) const
inline

Definition at line 176 of file stack.h.

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

Definition at line 156 of file stack.h.

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

Definition at line 159 of file stack.h.

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

Definition at line 182 of file stack.h.

template<typename Allocator>
Allocator& internal::Stack< Allocator >::GetAllocator ( )
inline

Definition at line 171 of file stack.h.

template<typename Allocator>
size_t internal::Stack< Allocator >::GetCapacity ( ) const
inline

Definition at line 178 of file stack.h.

template<typename Allocator>
size_t internal::Stack< Allocator >::GetSize ( ) const
inline

Definition at line 177 of file stack.h.

template<typename Allocator>
bool internal::Stack< Allocator >::HasAllocator ( ) const
inline

Definition at line 167 of file stack.h.

template<typename Allocator>
Stack& internal::Stack< Allocator >::operator= ( const Stack< Allocator > &  )
private
template<typename Allocator>
template<typename T >
T* internal::Stack< Allocator >::Pop ( size_t  count)
inline

Definition at line 137 of file stack.h.

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

Definition at line 122 of file stack.h.

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

Definition at line 128 of file stack.h.

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

Definition at line 115 of file stack.h.

template<typename Allocator>
void internal::Stack< Allocator >::Resize ( size_t  newCapacity)
inlineprivate

Definition at line 200 of file stack.h.

template<typename Allocator>
void internal::Stack< Allocator >::ShrinkToFit ( )
inline

Definition at line 100 of file stack.h.

template<typename Allocator>
void internal::Stack< Allocator >::Swap ( Stack< Allocator > &  rhs)
inline

Definition at line 89 of file stack.h.

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

Definition at line 144 of file stack.h.

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

Definition at line 150 of file stack.h.

Member Data Documentation

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

Definition at line 216 of file stack.h.

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

Definition at line 221 of file stack.h.

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

Definition at line 217 of file stack.h.

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

Definition at line 218 of file stack.h.

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

Definition at line 220 of file stack.h.

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

Definition at line 219 of file stack.h.


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


choreo_rapidjson
Author(s):
autogenerated on Thu Jul 18 2019 03:59:10