You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
742B

  1. #pragma once
  2. /**
  3. * Base class for composites embeddable in a VCV Widget
  4. * This is used for "real" implementations
  5. */
  6. class WidgetComposite
  7. {
  8. public:
  9. WidgetComposite(Module * parent) :
  10. inputs(parent->inputs),
  11. outputs(parent->outputs),
  12. params(parent->params),
  13. lights(parent->lights),
  14. module(parent)
  15. {
  16. }
  17. virtual void step()
  18. {
  19. };
  20. float engineGetSampleRate()
  21. {
  22. return ::engineGetSampleRate();
  23. }
  24. float engineGetSampleTime()
  25. {
  26. return ::engineGetSampleTime();
  27. }
  28. protected:
  29. std::vector<Input>& inputs;
  30. std::vector<Output>& outputs;
  31. std::vector<Param>& params;
  32. std::vector<Light>& lights;
  33. private:
  34. Module * const module;
  35. };