sparrow 0.9.0
Loading...
Searching...
No Matches
sparrow::buffer_base< T > Class Template Reference

Base class for buffer. More...

#include <buffer.hpp>

Inheritance diagram for sparrow::buffer_base< T >:
[legend]

Classes

struct  buffer_data
 

Protected Types

using allocator_type = any_allocator<T>
 
using alloc_traits = std::allocator_traits<allocator_type>
 
using pointer = typename alloc_traits::pointer
 
using size_type = typename alloc_traits::size_type
 

Protected Member Functions

 buffer_base ()=default
 
template<allocator A>
constexpr buffer_base (const A &a) noexcept
 
template<allocator A = allocator_type>
constexpr buffer_base (size_type n, const A &a=A())
 
template<allocator A = allocator_type>
constexpr buffer_base (pointer p, size_type n, const A &a=A())
 
 ~buffer_base ()
 
 buffer_base (buffer_base &&) noexcept=default
 
template<allocator A>
constexpr buffer_base (buffer_base &&rhs, const A &a)
 
constexpr allocator_typeget_allocator () noexcept
 
constexpr const allocator_typeget_allocator () const noexcept
 
constexpr buffer_dataget_data () noexcept
 
constexpr const buffer_dataget_data () const noexcept
 
constexpr pointer allocate (size_type n)
 
constexpr void deallocate (pointer p, size_type n)
 
constexpr void create_storage (size_type n)
 
constexpr void assign_storage (pointer p, size_type n, size_type cap)
 

Detailed Description

template<class T>
class sparrow::buffer_base< T >

Base class for buffer.

This class provides memory management for the buffer class. The constructor and destructor perform allocation and deallocation of the internal storage, but do not initialize any element.

Definition at line 47 of file buffer.hpp.

Member Typedef Documentation

◆ alloc_traits

template<class T>
using sparrow::buffer_base< T >::alloc_traits = std::allocator_traits<allocator_type>
protected

Definition at line 52 of file buffer.hpp.

◆ allocator_type

template<class T>
using sparrow::buffer_base< T >::allocator_type = any_allocator<T>
protected

Definition at line 51 of file buffer.hpp.

◆ pointer

template<class T>
using sparrow::buffer_base< T >::pointer = typename alloc_traits::pointer
protected

Definition at line 53 of file buffer.hpp.

◆ size_type

template<class T>
using sparrow::buffer_base< T >::size_type = typename alloc_traits::size_type
protected

Definition at line 54 of file buffer.hpp.

Constructor & Destructor Documentation

◆ buffer_base() [1/6]

template<class T>
sparrow::buffer_base< T >::buffer_base ( )
protecteddefault
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buffer_base() [2/6]

template<class T>
template<allocator A>
sparrow::buffer_base< T >::buffer_base ( const A & a)
constexprprotectednoexcept

Definition at line 329 of file buffer.hpp.

◆ buffer_base() [3/6]

template<class T>
template<allocator A>
sparrow::buffer_base< T >::buffer_base ( size_type n,
const A & a = A() )
constexprprotected

Definition at line 336 of file buffer.hpp.

Here is the call graph for this function:

◆ buffer_base() [4/6]

template<class T>
template<allocator A>
sparrow::buffer_base< T >::buffer_base ( pointer p,
size_type n,
const A & a = A() )
constexprprotected

Definition at line 344 of file buffer.hpp.

Here is the call graph for this function:

◆ ~buffer_base()

template<class T>
sparrow::buffer_base< T >::~buffer_base ( )
protected

Definition at line 352 of file buffer.hpp.

Here is the call graph for this function:

◆ buffer_base() [5/6]

template<class T>
sparrow::buffer_base< T >::buffer_base ( buffer_base< T > && )
protecteddefaultnoexcept
Here is the call graph for this function:

◆ buffer_base() [6/6]

template<class T>
template<allocator A>
sparrow::buffer_base< T >::buffer_base ( buffer_base< T > && rhs,
const A & a )
constexprprotected

Definition at line 359 of file buffer.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ allocate()

template<class T>
auto sparrow::buffer_base< T >::allocate ( size_type n)
constexprprotected

Definition at line 390 of file buffer.hpp.

Here is the caller graph for this function:

◆ assign_storage()

template<class T>
void sparrow::buffer_base< T >::assign_storage ( pointer p,
size_type n,
size_type cap )
constexprprotected

Definition at line 410 of file buffer.hpp.

Here is the caller graph for this function:

◆ create_storage()

template<class T>
void sparrow::buffer_base< T >::create_storage ( size_type n)
constexprprotected

Definition at line 402 of file buffer.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deallocate()

template<class T>
void sparrow::buffer_base< T >::deallocate ( pointer p,
size_type n )
constexprprotected

Definition at line 396 of file buffer.hpp.

Here is the caller graph for this function:

◆ get_allocator() [1/2]

template<class T>
auto sparrow::buffer_base< T >::get_allocator ( ) const
nodiscardconstexprprotectednoexcept

Definition at line 372 of file buffer.hpp.

◆ get_allocator() [2/2]

template<class T>
auto sparrow::buffer_base< T >::get_allocator ( )
nodiscardconstexprprotectednoexcept

Definition at line 366 of file buffer.hpp.

◆ get_data() [1/2]

template<class T>
auto sparrow::buffer_base< T >::get_data ( ) const
nodiscardconstexprprotectednoexcept

Definition at line 384 of file buffer.hpp.

◆ get_data() [2/2]

template<class T>
auto sparrow::buffer_base< T >::get_data ( )
nodiscardconstexprprotectednoexcept

Definition at line 378 of file buffer.hpp.


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