Ardour  8.7-15-gadf511264b
AudioGrapher::ProcessContext< T > Class Template Reference

#include <process_context.h>

Inheritance diagram for AudioGrapher::ProcessContext< T >:
[legend]

Public Types

enum  Flags { EndOfInput = 0 }
 
typedef FlagField::Flag Flag
 

Public Member Functions

 ProcessContext (T *data, samplecnt_t samples, ChannelCount channels)
 Basic constructor with data, sample and channel count. More...
 
 ProcessContext (ProcessContext< T > const &other)
 Normal copy constructor. More...
 
template<typename Y >
 ProcessContext (ProcessContext< Y > const &other, T *data, samplecnt_t samples, ChannelCount channels)
 "Copy constructor" with unique data, sample and channel count, but copies flags More...
 
template<typename Y >
 ProcessContext (ProcessContext< Y > const &other, T *data, samplecnt_t samples)
 "Copy constructor" with unique data and sample count, but copies channel count and flags More...
 
template<typename Y >
 ProcessContext (ProcessContext< Y > const &other, T *data)
 "Copy constructor" with unique data, but copies sample and channel count + flags More...
 
ProcessContext beginning (samplecnt_t samples)
 Make new Context out of the beginning of this context. More...
 
virtual ~ProcessContext ()
 
T const * data () const
 data points to the array of data to process More...
 
T * data ()
 
samplecnt_t const & samples () const
 samples tells how many samples the array pointed by data contains More...
 
ChannelCount const & channels () const
 
samplecnt_t samples_per_channel () const
 Returns the amount of samples per channel. More...
 
bool has_flag (Flag flag) const
 
void set_flag (Flag flag) const
 
void remove_flag (Flag flag) const
 
FlagField const & flags () const
 

Protected Attributes

T *const _data
 
samplecnt_t _samples
 
ChannelCount _channels
 
FlagField _flags
 

Private Member Functions

 BOOST_STATIC_ASSERT (boost::has_trivial_destructor< T >::value)
 
void validate_data ()
 

Static Private Attributes

static const ThrowLevel throwLevel = ThrowStrict
 

Additional Inherited Members

- Protected Member Functions inherited from AudioGrapher::Throwing< L >
 Throwing ()
 
bool throw_level (ThrowLevel level)
 

Detailed Description

template<typename T = DefaultSampleType>
class AudioGrapher::ProcessContext< T >

Processing context. Constness only applies to data, not flags

Definition at line 24 of file process_context.h.

Member Typedef Documentation

◆ Flag

template<typename T = DefaultSampleType>
typedef FlagField::Flag AudioGrapher::ProcessContext< T >::Flag

Definition at line 35 of file process_context.h.

Member Enumeration Documentation

◆ Flags

template<typename T = DefaultSampleType>
enum AudioGrapher::ProcessContext::Flags
Enumerator
EndOfInput 

Definition at line 37 of file process_context.h.

Constructor & Destructor Documentation

◆ ProcessContext() [1/5]

template<typename T = DefaultSampleType>
AudioGrapher::ProcessContext< T >::ProcessContext ( T *  data,
samplecnt_t  samples,
ChannelCount  channels 
)
inline

Basic constructor with data, sample and channel count.

Definition at line 44 of file process_context.h.

◆ ProcessContext() [2/5]

template<typename T = DefaultSampleType>
AudioGrapher::ProcessContext< T >::ProcessContext ( ProcessContext< T > const &  other)
inline

Normal copy constructor.

Definition at line 49 of file process_context.h.

◆ ProcessContext() [3/5]

template<typename T = DefaultSampleType>
template<typename Y >
AudioGrapher::ProcessContext< T >::ProcessContext ( ProcessContext< Y > const &  other,
T *  data,
samplecnt_t  samples,
ChannelCount  channels 
)
inline

"Copy constructor" with unique data, sample and channel count, but copies flags

Definition at line 55 of file process_context.h.

◆ ProcessContext() [4/5]

template<typename T = DefaultSampleType>
template<typename Y >
AudioGrapher::ProcessContext< T >::ProcessContext ( ProcessContext< Y > const &  other,
T *  data,
samplecnt_t  samples 
)
inline

"Copy constructor" with unique data and sample count, but copies channel count and flags

Definition at line 61 of file process_context.h.

◆ ProcessContext() [5/5]

template<typename T = DefaultSampleType>
template<typename Y >
AudioGrapher::ProcessContext< T >::ProcessContext ( ProcessContext< Y > const &  other,
T *  data 
)
inline

"Copy constructor" with unique data, but copies sample and channel count + flags

Definition at line 67 of file process_context.h.

◆ ~ProcessContext()

template<typename T = DefaultSampleType>
virtual AudioGrapher::ProcessContext< T >::~ProcessContext ( )
inlinevirtual

Definition at line 84 of file process_context.h.

Member Function Documentation

◆ beginning()

template<typename T = DefaultSampleType>
ProcessContext AudioGrapher::ProcessContext< T >::beginning ( samplecnt_t  samples)
inline

Make new Context out of the beginning of this context.

Definition at line 72 of file process_context.h.

◆ BOOST_STATIC_ASSERT()

template<typename T = DefaultSampleType>
AudioGrapher::ProcessContext< T >::BOOST_STATIC_ASSERT ( boost::has_trivial_destructor< T >::value  )
private

◆ channels()

template<typename T = DefaultSampleType>
ChannelCount const& AudioGrapher::ProcessContext< T >::channels ( ) const
inline

channels tells how many interleaved channels data contains If channels is greater than 1, each channel contains samples / channels samples of data

Definition at line 96 of file process_context.h.

◆ data() [1/2]

template<typename T = DefaultSampleType>
T* AudioGrapher::ProcessContext< T >::data ( )
inline

Definition at line 88 of file process_context.h.

◆ data() [2/2]

template<typename T = DefaultSampleType>
T const* AudioGrapher::ProcessContext< T >::data ( ) const
inline

data points to the array of data to process

Definition at line 87 of file process_context.h.

◆ flags()

template<typename T = DefaultSampleType>
FlagField const& AudioGrapher::ProcessContext< T >::flags ( ) const
inline

Definition at line 106 of file process_context.h.

◆ has_flag()

template<typename T = DefaultSampleType>
bool AudioGrapher::ProcessContext< T >::has_flag ( Flag  flag) const
inline

Definition at line 103 of file process_context.h.

◆ remove_flag()

template<typename T = DefaultSampleType>
void AudioGrapher::ProcessContext< T >::remove_flag ( Flag  flag) const
inline

Definition at line 105 of file process_context.h.

◆ samples()

template<typename T = DefaultSampleType>
samplecnt_t const& AudioGrapher::ProcessContext< T >::samples ( ) const
inline

samples tells how many samples the array pointed by data contains

Definition at line 91 of file process_context.h.

◆ samples_per_channel()

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::ProcessContext< T >::samples_per_channel ( ) const
inline

Returns the amount of samples per channel.

Definition at line 99 of file process_context.h.

◆ set_flag()

template<typename T = DefaultSampleType>
void AudioGrapher::ProcessContext< T >::set_flag ( Flag  flag) const
inline

Definition at line 104 of file process_context.h.

◆ validate_data()

template<typename T = DefaultSampleType>
void AudioGrapher::ProcessContext< T >::validate_data ( )
inlineprivate

Definition at line 116 of file process_context.h.

Member Data Documentation

◆ _channels

template<typename T = DefaultSampleType>
ChannelCount AudioGrapher::ProcessContext< T >::_channels
protected

Definition at line 111 of file process_context.h.

◆ _data

template<typename T = DefaultSampleType>
T* const AudioGrapher::ProcessContext< T >::_data
protected

Definition at line 109 of file process_context.h.

◆ _flags

template<typename T = DefaultSampleType>
FlagField AudioGrapher::ProcessContext< T >::_flags
mutableprotected

Definition at line 113 of file process_context.h.

◆ _samples

template<typename T = DefaultSampleType>
samplecnt_t AudioGrapher::ProcessContext< T >::_samples
protected

Definition at line 110 of file process_context.h.

◆ throwLevel

template<typename T = DefaultSampleType>
const ThrowLevel AudioGrapher::ProcessContext< T >::throwLevel = ThrowStrict
staticprivate

Definition at line 29 of file process_context.h.


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