Ardour  9.0-pre0-582-g084a23a80d
PBD::RingBufferNPT< T > Class Template Reference

#include <ringbufferNPT.h>

Classes

struct  rw_vector
 

Public Member Functions

 RingBufferNPT (size_t sz)
 
virtual ~RingBufferNPT ()
 
void reset ()
 
void set (size_t r, size_t w)
 
size_t read (T *dest, size_t cnt)
 
size_t write (const T *src, size_t cnt)
 
size_t write_one (const T src)
 
void get_read_vector (rw_vector *)
 
void get_write_vector (rw_vector *)
 
void decrement_read_ptr (size_t cnt)
 
void increment_read_ptr (size_t cnt)
 
void increment_write_ptr (size_t cnt)
 
size_t write_space ()
 
size_t read_space ()
 
T * buffer ()
 
size_t get_write_ptr () const
 
size_t get_read_ptr () const
 
size_t bufsize () const
 

Protected Attributes

T * buf
 
size_t size
 
std::atomic< int > write_ptr
 
std::atomic< int > read_ptr
 

Private Member Functions

 RingBufferNPT (RingBufferNPT const &)
 

Detailed Description

template<class T>
class PBD::RingBufferNPT< T >

Definition at line 36 of file ringbufferNPT.h.

Constructor & Destructor Documentation

◆ RingBufferNPT() [1/2]

template<class T >
PBD::RingBufferNPT< T >::RingBufferNPT ( size_t  sz)
inline

Definition at line 39 of file ringbufferNPT.h.

◆ ~RingBufferNPT()

template<class T >
virtual PBD::RingBufferNPT< T >::~RingBufferNPT ( )
inlinevirtual

Definition at line 45 of file ringbufferNPT.h.

◆ RingBufferNPT() [2/2]

template<class T >
PBD::RingBufferNPT< T >::RingBufferNPT ( RingBufferNPT< T > const &  )
private

Member Function Documentation

◆ buffer()

template<class T >
T* PBD::RingBufferNPT< T >::buffer ( )
inline

Definition at line 113 of file ringbufferNPT.h.

◆ bufsize()

template<class T >
size_t PBD::RingBufferNPT< T >::bufsize ( ) const
inline

Definition at line 116 of file ringbufferNPT.h.

◆ decrement_read_ptr()

template<class T >
void PBD::RingBufferNPT< T >::decrement_read_ptr ( size_t  cnt)
inline

Definition at line 73 of file ringbufferNPT.h.

◆ get_read_ptr()

template<class T >
size_t PBD::RingBufferNPT< T >::get_read_ptr ( ) const
inline

Definition at line 115 of file ringbufferNPT.h.

◆ get_read_vector()

template<class T >
void PBD::RingBufferNPT< T >::get_read_vector ( rw_vector )

Definition at line 213 of file ringbufferNPT.h.

◆ get_write_ptr()

template<class T >
size_t PBD::RingBufferNPT< T >::get_write_ptr ( ) const
inline

Definition at line 114 of file ringbufferNPT.h.

◆ get_write_vector()

template<class T >
void PBD::RingBufferNPT< T >::get_write_vector ( rw_vector )

Definition at line 253 of file ringbufferNPT.h.

◆ increment_read_ptr()

template<class T >
void PBD::RingBufferNPT< T >::increment_read_ptr ( size_t  cnt)
inline

Definition at line 77 of file ringbufferNPT.h.

◆ increment_write_ptr()

template<class T >
void PBD::RingBufferNPT< T >::increment_write_ptr ( size_t  cnt)
inline

Definition at line 81 of file ringbufferNPT.h.

◆ read()

template<class T >
size_t PBD::RingBufferNPT< T >::read ( T *  dest,
size_t  cnt 
)

Definition at line 129 of file ringbufferNPT.h.

◆ read_space()

template<class T >
size_t PBD::RingBufferNPT< T >::read_space ( )
inline

Definition at line 100 of file ringbufferNPT.h.

◆ reset()

template<class T >
void PBD::RingBufferNPT< T >::reset ( )
inline

Definition at line 49 of file ringbufferNPT.h.

◆ set()

template<class T >
void PBD::RingBufferNPT< T >::set ( size_t  r,
size_t  w 
)
inline

Definition at line 55 of file ringbufferNPT.h.

◆ write()

template<class T >
size_t PBD::RingBufferNPT< T >::write ( const T *  src,
size_t  cnt 
)

Definition at line 168 of file ringbufferNPT.h.

◆ write_one()

template<class T >
size_t PBD::RingBufferNPT< T >::write_one ( const T  src)

Definition at line 207 of file ringbufferNPT.h.

◆ write_space()

template<class T >
size_t PBD::RingBufferNPT< T >::write_space ( )
inline

Definition at line 85 of file ringbufferNPT.h.

Member Data Documentation

◆ buf

template<class T >
T* PBD::RingBufferNPT< T >::buf
protected

Definition at line 119 of file ringbufferNPT.h.

◆ read_ptr

template<class T >
std::atomic<int> PBD::RingBufferNPT< T >::read_ptr
mutableprotected

Definition at line 122 of file ringbufferNPT.h.

◆ size

template<class T >
size_t PBD::RingBufferNPT< T >::size
protected

Definition at line 120 of file ringbufferNPT.h.

◆ write_ptr

template<class T >
std::atomic<int> PBD::RingBufferNPT< T >::write_ptr
mutableprotected

Definition at line 121 of file ringbufferNPT.h.


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