ctkCmdLineModuleBackend.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*=============================================================================
  2. Library: CTK
  3. Copyright (c) German Cancer Research Center,
  4. Division of Medical and Biological Informatics
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. =============================================================================*/
  15. #ifndef CTKCMDLINEMODULEBACKEND_H
  16. #define CTKCMDLINEMODULEBACKEND_H
  17. #include "ctkCommandLineModulesCoreExport.h"
  18. class ctkCmdLineModuleFrontend;
  19. class ctkCmdLineModuleFuture;
  20. template<typename T> class QList;
  21. class QUrl;
  22. struct CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleBackend
  23. {
  24. ~ctkCmdLineModuleBackend();
  25. virtual QString name() const = 0;
  26. virtual QString description() const = 0;
  27. virtual QList<QString> schemes() const = 0;
  28. virtual qint64 timeStamp(const QUrl& location) const = 0;
  29. /**
  30. * @brief Get the XML parameter description from the given location.
  31. * @param location The location URL specifying the module.
  32. * @return The raw XML parameter description.
  33. *
  34. * This method may be concurrently called by the ctkCmdLineModuleManager and
  35. * must be thread-safe.
  36. *
  37. */
  38. virtual QByteArray rawXmlDescription(const QUrl& location) = 0;
  39. protected:
  40. friend class ctkCmdLineModuleManager;
  41. virtual ctkCmdLineModuleFuture run(ctkCmdLineModuleFrontend* frontend) = 0;
  42. //virtual ctkCmdLineModule* createModule(const QString& scheme) = 0;
  43. };
  44. #endif // CTKCMDLINEMODULEBACKEND_H