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.

29 lines
536B

  1. #pragma once
  2. #include <common.hpp>
  3. #include <engine/Module.hpp>
  4. namespace rack {
  5. namespace engine {
  6. struct Cable {
  7. /** Unique ID for referring to the cable in the engine.
  8. Between 0 and 2^53 since this is serialized with JSON.
  9. Assigned when added to the engine.
  10. */
  11. int64_t id = -1;
  12. Module* inputModule = NULL;
  13. int inputId = -1;
  14. Module* outputModule = NULL;
  15. int outputId = -1;
  16. json_t* toJson();
  17. void fromJson(json_t* rootJ);
  18. PRIVATE static void jsonStripIds(json_t* rootJ);
  19. };
  20. } // namespace engine
  21. } // namespace rack