DHART
Loading...
Searching...
No Matches
nanort::StackAllocator< T, stack_capacity > Class Template Reference

#include <nanort.h>

+ Inheritance diagram for nanort::StackAllocator< T, stack_capacity >:
+ Collaboration diagram for nanort::StackAllocator< T, stack_capacity >:

Classes

struct  rebind
 
struct  Source
 

Public Types

typedef std::allocator< T >::pointer pointer
 
typedef std::allocator< T >::size_type size_type
 

Public Member Functions

 StackAllocator (const StackAllocator< T, stack_capacity > &rhs)
 
template<typename U , size_t other_capacity>
 StackAllocator (const StackAllocator< U, other_capacity > &other)
 
 StackAllocator (Source *source)
 
pointer allocate (size_type n, void *hint=0)
 
void deallocate (pointer p, size_type n)
 

Private Attributes

Sourcesource_
 

Detailed Description

template<typename T, size_t stack_capacity>
class nanort::StackAllocator< T, stack_capacity >

Definition at line 138 of file nanort.h.


Class Documentation

◆ nanort::StackAllocator::rebind

struct nanort::StackAllocator::rebind
template<typename T, size_t stack_capacity>
template<typename U>
struct nanort::StackAllocator< T, stack_capacity >::rebind< U >

Definition at line 174 of file nanort.h.

Class Members
typedef StackAllocator< U, stack_capacity > other

Member Typedef Documentation

◆ pointer

template<typename T , size_t stack_capacity>
typedef std::allocator<T>::pointer nanort::StackAllocator< T, stack_capacity >::pointer

Definition at line 140 of file nanort.h.

◆ size_type

template<typename T , size_t stack_capacity>
typedef std::allocator<T>::size_type nanort::StackAllocator< T, stack_capacity >::size_type

Definition at line 141 of file nanort.h.

Constructor & Destructor Documentation

◆ StackAllocator() [1/3]

template<typename T , size_t stack_capacity>
nanort::StackAllocator< T, stack_capacity >::StackAllocator ( const StackAllocator< T, stack_capacity > &  rhs)
inline

Definition at line 179 of file nanort.h.

◆ StackAllocator() [2/3]

template<typename T , size_t stack_capacity>
template<typename U , size_t other_capacity>
nanort::StackAllocator< T, stack_capacity >::StackAllocator ( const StackAllocator< U, other_capacity > &  other)
inline

Definition at line 192 of file nanort.h.

◆ StackAllocator() [3/3]

template<typename T , size_t stack_capacity>
nanort::StackAllocator< T, stack_capacity >::StackAllocator ( Source source)
inlineexplicit

Definition at line 197 of file nanort.h.

Member Function Documentation

◆ allocate()

template<typename T , size_t stack_capacity>
pointer nanort::StackAllocator< T, stack_capacity >::allocate ( size_type  n,
void *  hint = 0 
)
inline

Definition at line 202 of file nanort.h.

References nanort::StackAllocator< T, stack_capacity >::source_, nanort::StackAllocator< T, stack_capacity >::Source::stack_buffer(), and nanort::StackAllocator< T, stack_capacity >::Source::used_stack_buffer_.

+ Here is the call graph for this function:

◆ deallocate()

template<typename T , size_t stack_capacity>
void nanort::StackAllocator< T, stack_capacity >::deallocate ( pointer  p,
size_type  n 
)
inline

Definition at line 215 of file nanort.h.

References nanort::StackAllocator< T, stack_capacity >::source_, nanort::StackAllocator< T, stack_capacity >::Source::stack_buffer(), and nanort::StackAllocator< T, stack_capacity >::Source::used_stack_buffer_.

+ Here is the call graph for this function:

Member Data Documentation

◆ source_

template<typename T , size_t stack_capacity>
Source* nanort::StackAllocator< T, stack_capacity >::source_
private

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