ctkCmdLineModuleDefaultPathBuilder.h 1.8 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 __ctkCmdLineModuleDefaultPathBuilder_h
  16. #define __ctkCmdLineModuleDefaultPathBuilder_h
  17. #include "ctkCommandLineModulesCoreExport.h"
  18. #include <QStringList>
  19. #include <QScopedPointer>
  20. class ctkCmdLineModuleDefaultPathBuilderPrivate;
  21. /**
  22. * \class ctkCmdLineModuleDefaultPathBuilder
  23. * \brief Builds up a list of file paths to search for command line modules.
  24. *
  25. * Unfinished:
  26. *
  27. * <pre>
  28. * Implements the following basic strategy:
  29. * 1. CTK_MODULE_LOAD_PATH environment variable
  30. * 2. Home directory
  31. * 3. Home directory / cli-modules
  32. * 4. Current working directory
  33. * 5. Current working directory / cli-modules
  34. * 6. Application directory
  35. * 7. Application directory / cli-modules
  36. * </pre>
  37. *
  38. * \author m.clarkson@ucl.ac.uk
  39. */
  40. class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleDefaultPathBuilder
  41. {
  42. public:
  43. ctkCmdLineModuleDefaultPathBuilder();
  44. ~ctkCmdLineModuleDefaultPathBuilder();
  45. virtual QStringList build();
  46. private:
  47. QScopedPointer<ctkCmdLineModuleDefaultPathBuilderPrivate> d;
  48. Q_DISABLE_COPY(ctkCmdLineModuleDefaultPathBuilder)
  49. };
  50. #endif