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 >
T * Bottom ()
 
template<typename T >
const T * Bottom () const
 
void Clear ()
 
bool Empty () const
 
template<typename T >
T * End ()
 
template<typename T >
const T * End () const
 
Allocator & GetAllocator ()
 
size_t GetCapacity () const
 
size_t GetSize () const
 
bool HasAllocator () const
 
template<typename T >
T * Pop (size_t count)
 
template<typename T >
RAPIDJSON_FORCEINLINE T * Push (size_t count=1)
 
template<typename T >
RAPIDJSON_FORCEINLINE T * PushUnsafe (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 >
T * Top ()
 
template<typename T >
const T * Top () 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 41 of file stack.h.

Constructor & Destructor Documentation

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

Definition at line 45 of file stack.h.

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

Definition at line 70 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 174 of file stack.h.

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

Definition at line 179 of file stack.h.

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

Definition at line 104 of file stack.h.

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

Definition at line 221 of file stack.h.

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

Definition at line 190 of file stack.h.

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

Definition at line 164 of file stack.h.

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

Definition at line 169 of file stack.h.

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

Definition at line 196 of file stack.h.

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

Definition at line 185 of file stack.h.

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

Definition at line 192 of file stack.h.

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

Definition at line 191 of file stack.h.

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

Definition at line 183 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 145 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 129 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 135 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 121 of file stack.h.

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

Definition at line 213 of file stack.h.

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

Definition at line 106 of file stack.h.

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

Definition at line 95 of file stack.h.

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

Definition at line 152 of file stack.h.

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

Definition at line 158 of file stack.h.

Member Data Documentation

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

Definition at line 230 of file stack.h.

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

Definition at line 235 of file stack.h.

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

Definition at line 231 of file stack.h.

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

Definition at line 232 of file stack.h.

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

Definition at line 234 of file stack.h.

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

Definition at line 233 of file stack.h.


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


livox_ros_driver
Author(s): Livox Dev Team
autogenerated on Mon Mar 15 2021 02:40:46