VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
vae_effects_list.hpp
Go to the documentation of this file.
1#ifndef _VAE_EFFECTS_LIST
2#define _VAE_EFFECTS_LIST
3
4#include "../vae_util.hpp"
6
7namespace vae { namespace core { namespace effect {
8 class EffectsFactory;
9
12 using Constructor = EffectBase* (*)();
14 const char* name = nullptr;
16 };
19
20 public:
22 static EffectsList i;
23 return i;
24 }
25
26 void add(const char* name, Constructor constructor) {
27 for (auto& i : mEffects) {
28 if (i.name != nullptr) { continue; }
29 i = { name, constructor };
30 return;
31 }
32 VAE_ASSERT(false)// can't add effect
33 }
34 };
35} } } // vae::core::faust
36
38
39#endif // _VAE_EFFECTS_LIST
static EffectsList & instance()
void add(const char *name, Constructor constructor)
Contains Typedefinitions and basic structures use by the public API and internally.
Definition: vae.hpp:31
#define VAE_ASSERT(condition)
Definition: vae_util.hpp:11