NCBI C++ ToolKit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
rapidjson::internal::Stack< Allocator > Class Template Reference

Search Toolkit Book for rapidjson::internal::Stack

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

#include <misc/jsonwrapp/rapidjson11/internal/stack.h>

+ Inheritance diagram for rapidjson::internal::Stack< Allocator >:
+ Collaboration diagram for rapidjson::internal::Stack< Allocator >:

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
 
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 &)
 
Stackoperator= (const Stack &)
 

Private Attributes

Allocatorallocator_
 
AllocatorownAllocator_
 
char * stack_
 
char * stackTop_
 
char * stackEnd_
 
size_t initialCapacity_
 

Detailed Description

template<typename Allocator>
class rapidjson::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

◆ Stack() [1/2]

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

Definition at line 40 of file stack.h.

◆ ~Stack()

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

Definition at line 61 of file stack.h.

◆ Stack() [2/2]

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

Member Function Documentation

◆ Bottom() [1/2]

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

Definition at line 162 of file stack.h.

◆ Bottom() [2/2]

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

Definition at line 165 of file stack.h.

◆ Clear()

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

Definition at line 98 of file stack.h.

◆ Destroy()

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

Definition at line 207 of file stack.h.

◆ Empty()

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

◆ End() [1/2]

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

Definition at line 156 of file stack.h.

◆ End() [2/2]

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

Definition at line 159 of file stack.h.

◆ Expand()

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

Definition at line 182 of file stack.h.

◆ GetAllocator()

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

Definition at line 171 of file stack.h.

◆ GetCapacity()

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

Definition at line 178 of file stack.h.

◆ GetSize()

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

◆ HasAllocator()

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

Definition at line 167 of file stack.h.

◆ operator=()

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

◆ Pop()

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

Definition at line 137 of file stack.h.

◆ Push()

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

Definition at line 122 of file stack.h.

◆ PushUnsafe()

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

Definition at line 128 of file stack.h.

◆ Reserve()

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

Definition at line 115 of file stack.h.

◆ Resize()

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

Definition at line 200 of file stack.h.

◆ ShrinkToFit()

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

Definition at line 100 of file stack.h.

◆ Swap()

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

Definition at line 89 of file stack.h.

◆ Top() [1/2]

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

Definition at line 144 of file stack.h.

◆ Top() [2/2]

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

Definition at line 150 of file stack.h.

Member Data Documentation

◆ allocator_

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

Definition at line 216 of file stack.h.

◆ initialCapacity_

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

Definition at line 221 of file stack.h.

◆ ownAllocator_

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

Definition at line 217 of file stack.h.

◆ stack_

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

Definition at line 218 of file stack.h.

◆ stackEnd_

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

Definition at line 220 of file stack.h.

◆ stackTop_

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

Definition at line 219 of file stack.h.


The documentation for this class was generated from the following file:
Modified on Mon Jul 15 05:35:34 2024 by modify_doxy.py rev. 669887