The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

82 lines
2.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-11 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifndef __JUCER_MODULE_JUCEHEADER__
  19. #define __JUCER_MODULE_JUCEHEADER__
  20. #include "../jucer_Headers.h"
  21. #include "jucer_Project.h"
  22. class ProjectExporter;
  23. class ProjectSaver;
  24. //==============================================================================
  25. class LibraryModule
  26. {
  27. public:
  28. LibraryModule() {}
  29. virtual ~LibraryModule() {}
  30. virtual String getID() const = 0;
  31. virtual void prepareExporter (ProjectExporter&, ProjectSaver&) const = 0;
  32. virtual void writeIncludes (Project&, OutputStream& out) = 0;
  33. virtual void createPropertyEditors (const ProjectExporter&, Array <PropertyComponent*>&) const = 0;
  34. virtual void getConfigFlags (Project&, OwnedArray<Project::ConfigFlag>&) const = 0;
  35. };
  36. //==============================================================================
  37. class ModuleList
  38. {
  39. public:
  40. ModuleList();
  41. static ModuleList& getInstance();
  42. //==============================================================================
  43. void rescan();
  44. LibraryModule* loadModule (const String& uid) const;
  45. void getDependencies (const String& moduleID, StringArray& dependencies) const;
  46. void createDependencies (const String& moduleID, OwnedArray<LibraryModule>& modules) const;
  47. //==============================================================================
  48. struct Module
  49. {
  50. LibraryModule* create() const;
  51. String uid, name, description;
  52. File file;
  53. };
  54. const Module* findModuleInfo (const String& uid) const;
  55. OwnedArray<Module> modules;
  56. private:
  57. File moduleFolder;
  58. };
  59. #endif // __JUCER_MODULE_JUCEHEADER__