foobar2000 SDK  2015-08-03
Public Types | Public Member Functions | Private Attributes
pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >

#include <memalign.h>

Public Types

typedef mem_block_aligned_t< obj_t, alignBytes > self_t
 

Public Member Functions

 mem_block_aligned_incremental_t ()
 
 mem_block_aligned_incremental_t (self_t const &other)
 
 mem_block_aligned_incremental_t (self_t &&other)
 
obj_t * get_ptr ()
 
const obj_t * get_ptr () const
 
size_t get_size () const
 
self_t const & operator= (self_t const &other)
 
self_t const & operator= (self_t &&other)
 
obj_t * ptr ()
 
const obj_t * ptr () const
 
void resize (size_t s)
 
void set_size (size_t s)
 
size_t size () const
 

Private Attributes

mem_block_aligned_t< obj_t, alignBytes > m
 
size_t m_size
 

Detailed Description

template<typename obj_t, unsigned alignBytes = 16>
class pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >

Definition at line 111 of file memalign.h.

Member Typedef Documentation

template<typename obj_t , unsigned alignBytes = 16>
typedef mem_block_aligned_t<obj_t, alignBytes> pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::self_t

Definition at line 113 of file memalign.h.

Constructor & Destructor Documentation

template<typename obj_t , unsigned alignBytes = 16>
pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::mem_block_aligned_incremental_t ( )
inline

Definition at line 130 of file memalign.h.

template<typename obj_t , unsigned alignBytes = 16>
pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::mem_block_aligned_incremental_t ( self_t const &  other)
inline

Definition at line 131 of file memalign.h.

131 : m(other.m), m_size(other.m_size) {}
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136
template<typename obj_t , unsigned alignBytes = 16>
pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::mem_block_aligned_incremental_t ( self_t &&  other)
inline

Definition at line 132 of file memalign.h.

132 : m(std::move(other.m)), m_size(other.m_size) { other.m_size = 0; }
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136

Member Function Documentation

template<typename obj_t , unsigned alignBytes = 16>
obj_t* pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::get_ptr ( )
inline

Definition at line 128 of file memalign.h.

128 { return m.ptr(); }
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136
template<typename obj_t , unsigned alignBytes = 16>
const obj_t* pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::get_ptr ( ) const
inline

Definition at line 129 of file memalign.h.

129 { return m.ptr(); }
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136
template<typename obj_t , unsigned alignBytes = 16>
size_t pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::get_size ( ) const
inline

Definition at line 124 of file memalign.h.

124 {return m_size; }
template<typename obj_t , unsigned alignBytes = 16>
self_t const& pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::operator= ( self_t const &  other)
inline

Definition at line 133 of file memalign.h.

133 {m = other.m; m_size = other.m_size; return *this;}
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136
template<typename obj_t , unsigned alignBytes = 16>
self_t const& pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::operator= ( self_t &&  other)
inline

Definition at line 134 of file memalign.h.

134 {m = std::move(other.m); m_size = other.m_size; other.m_size = 0; return *this;}
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136
template<typename obj_t , unsigned alignBytes = 16>
obj_t* pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::ptr ( )
inline

Definition at line 126 of file memalign.h.

126 { return m.ptr(); }
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136
template<typename obj_t , unsigned alignBytes = 16>
const obj_t* pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::ptr ( ) const
inline

Definition at line 127 of file memalign.h.

127 { return m.ptr(); }
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136
template<typename obj_t , unsigned alignBytes = 16>
void pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::resize ( size_t  s)
inline

Definition at line 115 of file memalign.h.

115  {
116  if (s > m.size()) {
117  m.resize( multiply_guarded<size_t>(s, 3) / 2 );
118  }
119  m_size = s;
120  }
mem_block_aligned_t< obj_t, alignBytes > m
Definition: memalign.h:136
template<typename obj_t , unsigned alignBytes = 16>
void pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::set_size ( size_t  s)
inline

Definition at line 121 of file memalign.h.

121 {resize(s);}
template<typename obj_t , unsigned alignBytes = 16>
size_t pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::size ( ) const
inline

Definition at line 123 of file memalign.h.

123 { return m_size; }

Field Documentation

template<typename obj_t , unsigned alignBytes = 16>
mem_block_aligned_t<obj_t, alignBytes> pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::m
private

Definition at line 136 of file memalign.h.

template<typename obj_t , unsigned alignBytes = 16>
size_t pfc::mem_block_aligned_incremental_t< obj_t, alignBytes >::m_size
private

Definition at line 137 of file memalign.h.


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