PluginRequirements_QtInterface.hpp
1 #pragma once
2 #include <score/plugins/UuidKey.hpp>
3 #include <score/tools/Version.hpp>
4 
5 #include <ossia/detail/json.hpp>
6 
7 #include <score_lib_base_export.h>
8 
9 #include <vector>
10 namespace score
11 {
12 struct Plugin
13 {
14 };
15 
17 class SCORE_LIB_BASE_EXPORT Plugin_QtInterface
18 {
19 public:
20  virtual ~Plugin_QtInterface();
21 
22  virtual std::vector<PluginKey> required() const { return {}; }
23 
24  virtual Version version() const { return Version{0}; }
25 
26  virtual UuidKey<Plugin> key() const = 0;
27 
28  virtual void
29  updateSaveFile(rapidjson::Value& obj, Version obj_version, Version current_version)
30  {
31  }
32 };
33 }
34 
39 #define SCORE_PLUGIN_METADATA(Ver, Uuid) \
40 public: \
41  static constexpr score::PluginKey static_key() \
42  { \
43  return_uuid(Uuid); \
44  } \
45  \
46  constexpr score::PluginKey key() const final override \
47  { \
48  return static_key(); \
49  } \
50  \
51  score::Version version() const override \
52  { \
53  return score::Version{Ver}; \
54  } \
55  \
56 private:
Definition: UuidKey.hpp:343
Definition: PluginRequirements_QtInterface.hpp:18
Represents the version of a plug-in.
Definition: Version.hpp:13
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: PluginRequirements_QtInterface.hpp:13