libpsynth 0.2.1
Public Types | Public Member Functions | Friends
psynth::sound::buffer< Frame, IsPlanar, Alloc > Class Template Reference

container interface over buffer range. More...

#include <buffer.hpp>

Collaboration diagram for psynth::sound::buffer< Frame, IsPlanar, Alloc >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Alloc::template rebind
< unsigned char >::other 
allocator_type
typedef range_type_from_frame
< Frame, IsPlanar >::type 
range
typedef range::const_type const_range
typedef range::size_type size_type
typedef range::value_type value_type
typedef range::difference_type difference_type
typedef range::reference reference
typedef range::iterator iterator
typedef const_range::iterator const_iterator
typedef range::reverse_iterator reverse_iterator
typedef
const_range::reverse_iterator 
const_reverse_iterator

Public Member Functions

 buffer (size_type size=0, std::size_t alignment=0, const Alloc alloc_in=Alloc())
 buffer (size_type size, const Frame &frame_in, std::size_t alignment, const Alloc alloc_in=Alloc())
 buffer (const buffer &buf)
template<typename F2 , bool IP2, typename Alloc2 >
 buffer (const buffer< F2, IP2, Alloc2 > &buf)
bufferoperator= (const buffer &buf)
template<typename Buf >
bufferoperator= (const Buf &buf)
 ~buffer ()
Alloc & allocator ()
Alloc const & allocator () const
size_type size () const
void swap (buffer &buf)
void recreate (size_type size, std::size_t alignment=0, const Alloc alloc_in=Alloc())
void recreate (size_type size_, const Frame &frame_in, std::size_t alignment, const Alloc alloc_in=Alloc())

Friends

template<typename F , bool P, typename A >
const buffer< F, P, A >::rangerange (buffer< F, P, A > &buf)
template<typename F , bool P, typename A >
const buffer< F, P, A >
::const_range 
const_range (const buffer< F, P, A > &buf)

Detailed Description

template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
class psynth::sound::buffer< Frame, IsPlanar, Alloc >

container interface over buffer range.

Models BufferConcept, FrameBasedConcept

A 1D container whose elements are frames. It is templated over the frame type, a boolean indicating whether it should be planar, and an optional allocator.

Note that its element type does not have to be a frame. buffer can be instantiated with any Regular element, in which case it models the weaker RandomAccessBufferConcept and does not model FrameBasedConcept

Note:
Should we merge buffer and range? Think about constness problems.

Member Typedef Documentation

template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef Alloc::template rebind<unsigned char>::other psynth::sound::buffer< Frame, IsPlanar, Alloc >::allocator_type
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef const_range::iterator psynth::sound::buffer< Frame, IsPlanar, Alloc >::const_iterator
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef range::const_type psynth::sound::buffer< Frame, IsPlanar, Alloc >::const_range
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef const_range::reverse_iterator psynth::sound::buffer< Frame, IsPlanar, Alloc >::const_reverse_iterator
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef range::difference_type psynth::sound::buffer< Frame, IsPlanar, Alloc >::difference_type
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef range::iterator psynth::sound::buffer< Frame, IsPlanar, Alloc >::iterator
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef range_type_from_frame<Frame, IsPlanar>::type psynth::sound::buffer< Frame, IsPlanar, Alloc >::range
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef range::reference psynth::sound::buffer< Frame, IsPlanar, Alloc >::reference
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef range::reverse_iterator psynth::sound::buffer< Frame, IsPlanar, Alloc >::reverse_iterator
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef range::size_type psynth::sound::buffer< Frame, IsPlanar, Alloc >::size_type
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
typedef range::value_type psynth::sound::buffer< Frame, IsPlanar, Alloc >::value_type

Constructor & Destructor Documentation

template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
psynth::sound::buffer< Frame, IsPlanar, Alloc >::buffer ( size_type  size = 0,
std::size_t  alignment = 0,
const Alloc  alloc_in = Alloc() 
) [inline, explicit]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
psynth::sound::buffer< Frame, IsPlanar, Alloc >::buffer ( size_type  size,
const Frame &  frame_in,
std::size_t  alignment,
const Alloc  alloc_in = Alloc() 
) [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
psynth::sound::buffer< Frame, IsPlanar, Alloc >::buffer ( const buffer< Frame, IsPlanar, Alloc > &  buf) [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
template<typename F2 , bool IP2, typename Alloc2 >
psynth::sound::buffer< Frame, IsPlanar, Alloc >::buffer ( const buffer< F2, IP2, Alloc2 > &  buf) [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
psynth::sound::buffer< Frame, IsPlanar, Alloc >::~buffer ( ) [inline]

Member Function Documentation

template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
Alloc& psynth::sound::buffer< Frame, IsPlanar, Alloc >::allocator ( ) [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
Alloc const& psynth::sound::buffer< Frame, IsPlanar, Alloc >::allocator ( ) const [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
template<typename Buf >
buffer& psynth::sound::buffer< Frame, IsPlanar, Alloc >::operator= ( const Buf &  buf) [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
buffer& psynth::sound::buffer< Frame, IsPlanar, Alloc >::operator= ( const buffer< Frame, IsPlanar, Alloc > &  buf) [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
void psynth::sound::buffer< Frame, IsPlanar, Alloc >::recreate ( size_type  size,
std::size_t  alignment = 0,
const Alloc  alloc_in = Alloc () 
) [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
void psynth::sound::buffer< Frame, IsPlanar, Alloc >::recreate ( size_type  size_,
const Frame &  frame_in,
std::size_t  alignment,
const Alloc  alloc_in = Alloc() 
) [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
size_type psynth::sound::buffer< Frame, IsPlanar, Alloc >::size ( ) const [inline]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
void psynth::sound::buffer< Frame, IsPlanar, Alloc >::swap ( buffer< Frame, IsPlanar, Alloc > &  buf) [inline]

Friends And Related Function Documentation

template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
template<typename F , bool P, typename A >
const buffer<F, P, A>::const_range const_range ( const buffer< F, P, A > &  buf) [friend]
template<typename Frame, bool IsPlanar, typename Alloc = std::allocator<unsigned char>>
template<typename F , bool P, typename A >
const buffer<F, P, A>::range& range ( buffer< F, P, A > &  buf) [friend]

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