Pad.h 1003 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef APPLICATION_H
  2. #define APPLICATION_H
  3. #include <string>
  4. #include <json/json.h>
  5. class PadConfiguration;
  6. class PadDefinition;
  7. class MidiMessageList;
  8. class Pad
  9. {
  10. public:
  11. Pad();
  12. Pad(const std::string& file);
  13. Pad(PadConfiguration* p);
  14. Pad(PadDefinition* p);
  15. virtual ~Pad();
  16. bool load_configuration(const std::string& file);
  17. void remove_configuration();
  18. void connect(bool in = true, bool out=true);
  19. const std::string& get_name() const;
  20. bool is_valid(){return this==NULL;}
  21. bool operator!(){return this==NULL;}
  22. operator bool(){return this!=NULL;}
  23. void clear();
  24. void input(MidiMessageList*);
  25. void input(Json::Value&);
  26. void input(const std::string&);
  27. protected:
  28. PadConfiguration* m_configuration;
  29. PadDefinition* m_pad_definition;
  30. std::string m_name;
  31. };
  32. #endif // APPLICATION_H