Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::core::Buffer< T > Class Template Reference

Buffer. More...

#include <buffer.h>

Inheritance diagram for roc::core::Buffer< T >:
roc::core::RefCounted< Buffer< T >, FactoryAllocation< BufferFactory< T > > > roc::core::NonCopyable< T > roc::core::FactoryAllocation< BufferFactory< T > >

Public Member Functions

 Buffer (BufferFactory< T > &factory)
 Initialize empty buffer.
 
size_t size () const
 Get maximum number of elements.
 
T * data ()
 Get buffer data.
 
- Public Member Functions inherited from roc::core::RefCounted< Buffer< T >, FactoryAllocation< BufferFactory< T > > >
 RefCounted ()
 Initialization with default allocation policy.
 
 RefCounted (const FactoryAllocation< BufferFactory< T > > &policy)
 Initialization with arbitrary allocation policy.
 
long getref () const
 Get reference counter.
 
void incref () const
 Increment reference counter.
 
void decref () const
 Decrement reference counter.
 

Static Public Member Functions

static Buffercontainer_of (void *data)
 Get pointer to buffer from the pointer to its data.
 

Additional Inherited Members

- Protected Member Functions inherited from roc::core::FactoryAllocation< BufferFactory< T > >
BufferFactory< T > & factory () const
 Get factory.
 
 FactoryAllocation ()
 Initialize in invalid state. Such instance wont be usable.
 
 FactoryAllocation (BufferFactory< T > &factory)
 Initialize with given factory. Such instance will use factory to destroy objects.
 
void destroy (T &object)
 Destroy object and deallocate its memory.
 

Detailed Description

template<class T>
class roc::core::Buffer< T >

Buffer.

Definition at line 24 of file buffer.h.

Constructor & Destructor Documentation

◆ Buffer()

template<class T >
roc::core::Buffer< T >::Buffer ( BufferFactory< T > &  factory)
inlineexplicit

Initialize empty buffer.

Definition at line 29 of file buffer.h.

Member Function Documentation

◆ container_of()

template<class T >
static Buffer * roc::core::Buffer< T >::container_of ( void *  data)
inlinestatic

Get pointer to buffer from the pointer to its data.

Definition at line 45 of file buffer.h.

◆ data()

template<class T >
T * roc::core::Buffer< T >::data ( )
inline

Get buffer data.

Definition at line 40 of file buffer.h.

◆ size()

template<class T >
size_t roc::core::Buffer< T >::size ( ) const
inline

Get maximum number of elements.

Definition at line 35 of file buffer.h.


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