Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
internal::Stack< Allocator > Class Template Reference

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

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/internal/json/rapidjson/internal/stack.h>

Collaboration diagram for internal::Stack< Allocator >:

Public Member Functions

 Stack (Allocator *allocator, size_t stackCapacity)
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 T * Push (size_t count=1)
template<typename T>
RAPIDJSON_FORCEINLINE T * PushUnsafe (size_t count=1)
template<typename T>
T * Pop (size_t count)
template<typename T>
T * Top ()
template<typename T>
const T * Top () const
template<typename T>
T * End ()
template<typename T>
const T * End () const
template<typename T>
T * Bottom ()
template<typename T>
const T * Bottom () const
bool HasAllocator () const
AllocatorGetAllocator ()
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 &)
Stack & operator= (const Stack &)

Private Attributes

Allocatorallocator_
AllocatorownAllocator_
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.

Definition at line 38 of file stack.h.

Constructor & Destructor Documentation

◆ Stack()

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

Definition at line 42 of file stack.h.

◆ ~Stack()

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

Definition at line 63 of file stack.h.

Member Function Documentation

◆ Bottom() [1/2]

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

Definition at line 164 of file stack.h.

◆ Bottom() [2/2]

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

Definition at line 167 of file stack.h.

◆ Clear()

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

Definition at line 100 of file stack.h.

◆ Destroy()

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

Definition at line 209 of file stack.h.

◆ Empty()

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

Definition at line 178 of file stack.h.

◆ End() [1/2]

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

Definition at line 158 of file stack.h.

◆ End() [2/2]

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

Definition at line 161 of file stack.h.

◆ Expand()

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

Definition at line 184 of file stack.h.

◆ GetAllocator()

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

Definition at line 173 of file stack.h.

◆ GetCapacity()

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

Definition at line 180 of file stack.h.

◆ GetSize()

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

Definition at line 179 of file stack.h.

◆ HasAllocator()

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

Definition at line 169 of file stack.h.

◆ Pop()

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

Definition at line 139 of file stack.h.

◆ Push()

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

Definition at line 124 of file stack.h.

◆ PushUnsafe()

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

Definition at line 130 of file stack.h.

◆ Reserve()

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

Definition at line 117 of file stack.h.

◆ Resize()

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

Definition at line 202 of file stack.h.

◆ ShrinkToFit()

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

Definition at line 102 of file stack.h.

◆ Swap()

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

Definition at line 91 of file stack.h.

◆ Top() [1/2]

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

Definition at line 146 of file stack.h.

◆ Top() [2/2]

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

Definition at line 152 of file stack.h.

Member Data Documentation

◆ allocator_

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

Definition at line 218 of file stack.h.

◆ initialCapacity_

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

Definition at line 223 of file stack.h.

◆ ownAllocator_

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

Definition at line 219 of file stack.h.

◆ stack_

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

Definition at line 220 of file stack.h.

◆ stackEnd_

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

Definition at line 222 of file stack.h.

◆ stackTop_

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

Definition at line 221 of file stack.h.


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