cphot 0.1
A C++ tool for computing photometry from spectra.
internal::Stack< Allocator > Class Template Reference

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

#include <stack.h>

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 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
 

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

◆ Stack()

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

Definition at line 40 of file stack.h.

◆ ~Stack()

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

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

◆ Bottom() [2/2]

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

Definition at line 164 of file stack.h.

◆ Clear()

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

Definition at line 98 of file stack.h.

◆ Empty()

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

Definition at line 175 of file stack.h.

◆ End() [1/2]

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

Definition at line 155 of file stack.h.

◆ End() [2/2]

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

Definition at line 158 of file stack.h.

◆ GetAllocator()

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

Definition at line 170 of file stack.h.

◆ GetCapacity()

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

Definition at line 177 of file stack.h.

◆ GetSize()

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

Definition at line 176 of file stack.h.

◆ HasAllocator()

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

Definition at line 166 of file stack.h.

◆ Pop()

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

Definition at line 136 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 122 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 128 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 115 of file stack.h.

◆ ShrinkToFit()

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

Definition at line 100 of file stack.h.

◆ Swap()

template<typename Allocator >
void 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* internal::Stack< Allocator >::Top ( )
inline

Definition at line 143 of file stack.h.

◆ Top() [2/2]

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

Definition at line 149 of file stack.h.


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