![]() |
Audacity 3.2.0
|
abstract base class with methods to produce SampleBlock objects More...
#include <SampleBlock.h>
Classes | |
| struct | Factory |
| Global factory of per-project factories of sample blocks. More... | |
Public Types | |
| using | SampleBlockIDs = std::unordered_set< SampleBlockID > |
Public Types inherited from Observer::Publisher< SampleBlockCreateMessage > | |
| using | message_type = SampleBlockCreateMessage |
| using | CallbackReturn = std::conditional_t< true, void, bool > |
| using | Callback = std::function< CallbackReturn(const SampleBlockCreateMessage &) > |
| Type of functions that can be connected to the Publisher. More... | |
Public Member Functions | |
| virtual | ~SampleBlockFactory () |
| SampleBlockPtr | Create (constSamplePtr src, size_t numsamples, sampleFormat srcformat) |
| SampleBlockPtr | CreateSilent (size_t numsamples, sampleFormat srcformat) |
| SampleBlockPtr | CreateFromXML (sampleFormat srcformat, const AttributesList &attrs) |
| SampleBlockPtr | CreateFromId (sampleFormat srcformat, SampleBlockID id) |
| virtual SampleBlockIDs | GetActiveBlockIDs ()=0 |
Public Member Functions inherited from Observer::Publisher< SampleBlockCreateMessage > | |
| Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
| Constructor supporting type-erased custom allocation/deletion. More... | |
| Publisher (Publisher &&)=default | |
| Publisher & | operator= (Publisher &&)=default |
| Subscription | Subscribe (Callback callback) |
| Connect a callback to the Publisher; later-connected are called earlier. More... | |
| Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
| Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Static Public Member Functions | |
| static SampleBlockFactoryPtr | New (AudacityProject &project) |
Protected Member Functions | |
| virtual SampleBlockPtr | DoCreate (constSamplePtr src, size_t numsamples, sampleFormat srcformat)=0 |
| virtual SampleBlockPtr | DoCreateSilent (size_t numsamples, sampleFormat srcformat)=0 |
| virtual SampleBlockPtr | DoCreateFromXML (sampleFormat srcformat, const AttributesList &attrs)=0 |
| virtual SampleBlockPtr | DoCreateFromId (sampleFormat srcformat, SampleBlockID id)=0 |
Protected Member Functions inherited from Observer::Publisher< SampleBlockCreateMessage > | |
| CallbackReturn | Publish (const SampleBlockCreateMessage &message) |
| Send a message to connected callbacks. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Observer::Publisher< SampleBlockCreateMessage > | |
| static constexpr bool | notifies_all |
abstract base class with methods to produce SampleBlock objects
Definition at line 113 of file SampleBlock.h.
| using SampleBlockFactory::SampleBlockIDs = std::unordered_set<SampleBlockID> |
Definition at line 145 of file SampleBlock.h.
|
virtualdefault |
| SampleBlockPtr SampleBlockFactory::Create | ( | constSamplePtr | src, |
| size_t | numsamples, | ||
| sampleFormat | srcformat | ||
| ) |
Definition at line 26 of file SampleBlock.cpp.
References DoCreate(), Observer::Publisher< SampleBlockCreateMessage >::Publish(), and THROW_INCONSISTENCY_EXCEPTION.
Referenced by anonymous_namespace{Sequence.cpp}::ShareOrCopySampleBlock().
| SampleBlockPtr SampleBlockFactory::CreateFromId | ( | sampleFormat | srcformat, |
| SampleBlockID | id | ||
| ) |
Definition at line 59 of file SampleBlock.cpp.
References DoCreateFromId(), Observer::Publisher< SampleBlockCreateMessage >::Publish(), and THROW_INCONSISTENCY_EXCEPTION.
| SampleBlockPtr SampleBlockFactory::CreateFromXML | ( | sampleFormat | srcformat, |
| const AttributesList & | attrs | ||
| ) |
Definition at line 48 of file SampleBlock.cpp.
References DoCreateFromXML(), Observer::Publisher< SampleBlockCreateMessage >::Publish(), and THROW_INCONSISTENCY_EXCEPTION.
| SampleBlockPtr SampleBlockFactory::CreateSilent | ( | size_t | numsamples, |
| sampleFormat | srcformat | ||
| ) |
Definition at line 37 of file SampleBlock.cpp.
References DoCreateSilent(), Observer::Publisher< SampleBlockCreateMessage >::Publish(), and THROW_INCONSISTENCY_EXCEPTION.
|
protectedpure virtual |
Implemented in SqliteSampleBlockFactory, and MockSampleBlockFactory.
Referenced by Create().
|
protectedpure virtual |
Implemented in SqliteSampleBlockFactory, and MockSampleBlockFactory.
Referenced by CreateFromId().
|
protectedpure virtual |
Implemented in SqliteSampleBlockFactory, and MockSampleBlockFactory.
Referenced by CreateFromXML().
|
protectedpure virtual |
Implemented in SqliteSampleBlockFactory, and MockSampleBlockFactory.
Referenced by CreateSilent().
|
pure virtual |
Implemented in SqliteSampleBlockFactory, and MockSampleBlockFactory.
|
static |
Definition at line 16 of file SampleBlock.cpp.
References factory, GlobalVariable< Factory, const std::function< SampleBlockFactoryPtr(AudacityProject &) >, nullptr, Options... >::Get(), project, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by BenchmarkDialog::OnRun().