소스 검색

Added class level doxygen for command line modules

MattClarkson 13 년 전
부모
커밋
fad36e7ea1
40개의 변경된 파일339개의 추가작업 그리고 40개의 파일을 삭제
  1. 4 0
      Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerDirectorySettings.h
  2. 4 1
      Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerMainWindow.h
  3. 4 0
      Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerProgressWidget.h
  4. 4 0
      Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerTabList.h
  5. 4 0
      Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerTreeWidget.h
  6. 5 0
      Libs/CommandLineModules/Backend/FunctionPointer/ctkCmdLineModuleBackendFunctionPointer.h
  7. 6 0
      Libs/CommandLineModules/Backend/FunctionPointer/ctkCmdLineModuleFunctionPointerTask_p.h
  8. 6 0
      Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleBackendLocalProcess.h
  9. 6 0
      Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessTask.h
  10. 5 0
      Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessWatcher_p.h
  11. 32 2
      Libs/CommandLineModules/Core/ctkCmdLineModuleBackend.h
  12. 35 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleCache_p.h
  13. 1 2
      Libs/CommandLineModules/Core/ctkCmdLineModuleDefaultPathBuilder.cpp
  14. 29 9
      Libs/CommandLineModules/Core/ctkCmdLineModuleDefaultPathBuilder.h
  15. 2 2
      Libs/CommandLineModules/Core/ctkCmdLineModuleDescription.h
  16. 12 7
      Libs/CommandLineModules/Core/ctkCmdLineModuleDirectoryWatcher.h
  17. 82 3
      Libs/CommandLineModules/Core/ctkCmdLineModuleFrontend.h
  18. 3 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleFrontendFactory.h
  19. 5 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleFuture.h
  20. 4 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleFutureInterface.h
  21. 2 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleManager.h
  22. 3 3
      Libs/CommandLineModules/Core/ctkCmdLineModuleParameter.h
  23. 3 4
      Libs/CommandLineModules/Core/ctkCmdLineModuleParameterGroup.h
  24. 2 3
      Libs/CommandLineModules/Core/ctkCmdLineModulePathBuilder.h
  25. 3 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleReference.h
  26. 5 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleResult.h
  27. 5 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleRunException.h
  28. 2 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleXmlException.h
  29. 5 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleXmlMsgHandler_p.h
  30. 6 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleXmlParser_p.h
  31. 5 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleXmlProgressWatcher.h
  32. 2 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleXmlValidator.h
  33. 2 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleXslTransform.h
  34. 18 2
      Libs/CommandLineModules/Documentation/CTKCommandLineModules.dox
  35. 5 0
      Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleFrontendFactoryQtGui.h
  36. 5 0
      Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleFrontendQtGui.h
  37. 1 0
      Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleMenuFactoryQtGui.h
  38. 2 2
      Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleObjectTreeWalker_p.h
  39. 5 0
      Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendFactoryQtWebKit.h
  40. 5 0
      Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendQtWebKit_p.h

+ 4 - 0
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerDirectorySettings.h

@@ -24,6 +24,10 @@
 
 
 #include <ctkSettingsPanel.h>
 #include <ctkSettingsPanel.h>
 
 
+/**
+ * \class ctkCmdLineModuleExplorerDirectorySettings
+ * \brief Example application settings panel.
+ */
 class ctkCmdLineModuleExplorerDirectorySettings : public ctkSettingsPanel
 class ctkCmdLineModuleExplorerDirectorySettings : public ctkSettingsPanel
 {
 {
 public:
 public:

+ 4 - 1
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerMainWindow.h

@@ -39,7 +39,10 @@ namespace Ui {
 class ctkCmdLineModuleExplorerMainWindow;
 class ctkCmdLineModuleExplorerMainWindow;
 }
 }
 
 
-
+/**
+ * \class ctkCLModuleExplorerMainWindow
+ * \brief Example application main window.
+ */
 class ctkCLModuleExplorerMainWindow : public QMainWindow
 class ctkCLModuleExplorerMainWindow : public QMainWindow
 {
 {
   Q_OBJECT
   Q_OBJECT

+ 4 - 0
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerProgressWidget.h

@@ -34,6 +34,10 @@ namespace Ui {
 class ctkCmdLineModuleExplorerProgressWidget;
 class ctkCmdLineModuleExplorerProgressWidget;
 }
 }
 
 
+/**
+ * \class ctkCmdLineModuleExplorerProgressWidget
+ * \brief Example application progress update widget.
+ */
 class ctkCmdLineModuleExplorerProgressWidget : public QWidget
 class ctkCmdLineModuleExplorerProgressWidget : public QWidget
 {
 {
   Q_OBJECT
   Q_OBJECT

+ 4 - 0
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerTabList.h

@@ -31,6 +31,10 @@ class ctkCmdLineModuleManager;
 class QTabWidget;
 class QTabWidget;
 class QModelIndex;
 class QModelIndex;
 
 
+/**
+ * \class ctkCmdLineModuleExplorerTabList
+ * \brief Example application tab list
+ */
 class ctkCmdLineModuleExplorerTabList : public QObject
 class ctkCmdLineModuleExplorerTabList : public QObject
 {
 {
   Q_OBJECT
   Q_OBJECT

+ 4 - 0
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerTreeWidget.h

@@ -29,6 +29,10 @@
 class ctkCmdLineModuleFrontend;
 class ctkCmdLineModuleFrontend;
 struct ctkCmdLineModuleFrontendFactory;
 struct ctkCmdLineModuleFrontendFactory;
 
 
+/**
+ * \class ctkCmdLineModuleExplorerTreeWidget
+ * \brief Example application tree widget.
+ */
 class ctkCmdLineModuleExplorerTreeWidget : public QTreeWidget
 class ctkCmdLineModuleExplorerTreeWidget : public QTreeWidget
 {
 {
   Q_OBJECT
   Q_OBJECT

+ 5 - 0
Libs/CommandLineModules/Backend/FunctionPointer/ctkCmdLineModuleBackendFunctionPointer.h

@@ -91,6 +91,11 @@ Q_DECLARE_METATYPE(QList<int>*)
 
 
 struct ctkCmdLineModuleBackendFunctionPointerPrivate;
 struct ctkCmdLineModuleBackendFunctionPointerPrivate;
 
 
+/**
+ * \class ctkCmdLineModuleBackendFunctionPointer
+ * \brief Provides a back-end implementation to enable directly calling a function pointer.
+ * \ingroup CommandLineModulesBackendFunctionPointer
+ */
 class CTK_CMDLINEMODULEBACKENDFP_EXPORT ctkCmdLineModuleBackendFunctionPointer : public ctkCmdLineModuleBackend
 class CTK_CMDLINEMODULEBACKENDFP_EXPORT ctkCmdLineModuleBackendFunctionPointer : public ctkCmdLineModuleBackend
 {
 {
 
 

+ 6 - 0
Libs/CommandLineModules/Backend/FunctionPointer/ctkCmdLineModuleFunctionPointerTask_p.h

@@ -28,6 +28,12 @@
 
 
 #include <QRunnable>
 #include <QRunnable>
 
 
+/**
+ * \class ctkCmdLineModuleFunctionPointerTask
+ * \brief Provides a ctkCmdLineModuleFutureInterface implementation specifically to
+ * run a function pointer asynchronousely.
+ * \ingroup CommandLineModulesBackendFunctionPointer
+ */
 class ctkCmdLineModuleFunctionPointerTask : public ctkCmdLineModuleFutureInterface, public QRunnable
 class ctkCmdLineModuleFunctionPointerTask : public ctkCmdLineModuleFutureInterface, public QRunnable
 {
 {
 public:
 public:

+ 6 - 0
Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleBackendLocalProcess.h

@@ -30,6 +30,12 @@
 
 
 struct ctkCmdLineModuleBackendLocalProcessPrivate;
 struct ctkCmdLineModuleBackendLocalProcessPrivate;
 
 
+/**
+ * \class ctkCmdLineModuleBackendLocalProcess
+ * \brief Provides an ctkCmdLineModuleBackend implementation
+ * to run a locally installed command line application.
+ * \ingroup CommandLineModulesBackendLocalProcess
+ */
 class CTK_CMDLINEMODULEBACKENDLP_EXPORT ctkCmdLineModuleBackendLocalProcess : public ctkCmdLineModuleBackend
 class CTK_CMDLINEMODULEBACKENDLP_EXPORT ctkCmdLineModuleBackendLocalProcess : public ctkCmdLineModuleBackend
 {
 {
 
 

+ 6 - 0
Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessTask.h

@@ -37,6 +37,12 @@ class QProcess;
 
 
 struct ctkCmdLineModuleProcessTaskPrivate;
 struct ctkCmdLineModuleProcessTaskPrivate;
 
 
+/**
+ * \class ctkCmdLineModuleProcessTask
+ * \brief Implements ctkCmdLineModuleFutureInterface to enabling
+ * running a command line application asynchronously.
+ * \ingroup CommandLineModulesBackendLocalProcess
+ */
 class CTK_CMDLINEMODULEBACKENDLP_EXPORT ctkCmdLineModuleProcessTask
 class CTK_CMDLINEMODULEBACKENDLP_EXPORT ctkCmdLineModuleProcessTask
     : public ctkCmdLineModuleFutureInterface, public QRunnable
     : public ctkCmdLineModuleFutureInterface, public QRunnable
 {
 {

+ 5 - 0
Libs/CommandLineModules/Backend/LocalProcess/ctkCmdLineModuleProcessWatcher_p.h

@@ -33,6 +33,11 @@ class ctkCmdLineModuleResult;
 
 
 class QProcess;
 class QProcess;
 
 
+/**
+ * \class ctkCmdLineModuleProcessWatcher
+ * \brief Provides progress updates using QFutureWatcher
+ * \ingroup CommandLineModulesBackendLocalProcess
+ */
 class ctkCmdLineModuleProcessWatcher : public QObject
 class ctkCmdLineModuleProcessWatcher : public QObject
 {
 {
   Q_OBJECT
   Q_OBJECT

+ 32 - 2
Libs/CommandLineModules/Core/ctkCmdLineModuleBackend.h

@@ -30,16 +30,44 @@ class ctkCmdLineModuleFuture;
 template<typename T> class QList;
 template<typename T> class QList;
 class QUrl;
 class QUrl;
 
 
+/**
+ * \class ctkCmdLineModuleBackend
+ * \brief Abstract base class for all back-end command line module
+ * implementations.
+ * \ingroup CommandLineModulesCore
+ * \see ctkCmdLineModuleBackendLocalProcess
+ * \see ctkCmdLineModuleBackendFunctionPointer
+ */
 struct CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleBackend
 struct CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleBackend
 {
 {
 
 
   ~ctkCmdLineModuleBackend();
   ~ctkCmdLineModuleBackend();
 
 
+  /**
+   * @brief Returns the name of the type of the backend, not the name
+   * of the thing or application that is run.
+   * @return A QString containing the name.
+   */
   virtual QString name() const = 0;
   virtual QString name() const = 0;
+
+  /**
+   * @brief Returns a brief description of the type of the backend.
+   * @return A QString containing a description.
+   */
   virtual QString description() const = 0;
   virtual QString description() const = 0;
 
 
+  /**
+   * @brief Returns a list of the capabilities or the types of things
+   * that this back-end can run.
+   * @return A list of "schemes", meaning the capabilities.
+   */
   virtual QList<QString> schemes() const = 0;
   virtual QList<QString> schemes() const = 0;
 
 
+  /**
+   * @brief Returns a timestap of the backend, which for example in the
+   * case of the LocalProcess may be the last modified time of the command line
+   * application.
+   */
   virtual qint64 timeStamp(const QUrl& location) const = 0;
   virtual qint64 timeStamp(const QUrl& location) const = 0;
 
 
   /**
   /**
@@ -57,10 +85,12 @@ protected:
 
 
   friend class ctkCmdLineModuleManager;
   friend class ctkCmdLineModuleManager;
 
 
+  /**
+   * @brief The main method to actually execute the back-end process.
+   * @param A pointer to a front end implementation.
+   */
   virtual ctkCmdLineModuleFuture run(ctkCmdLineModuleFrontend* frontend) = 0;
   virtual ctkCmdLineModuleFuture run(ctkCmdLineModuleFrontend* frontend) = 0;
 
 
-  //virtual ctkCmdLineModule* createModule(const QString& scheme) = 0;
-
 };
 };
 
 
 #endif // CTKCMDLINEMODULEBACKEND_H
 #endif // CTKCMDLINEMODULEBACKEND_H

+ 35 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleCache_p.h

@@ -28,6 +28,12 @@ struct ctkCmdLineModuleCachePrivate;
 
 
 class QUrl;
 class QUrl;
 
 
+/**
+ * \class ctkCmdLineModuleCache
+ * \brief Private non-exported class to contain a cache of
+ * XML descriptions and time-stamps.
+ * \ingroup CommandLineModulesCore
+ */
 class ctkCmdLineModuleCache
 class ctkCmdLineModuleCache
 {
 {
 
 
@@ -36,13 +42,42 @@ public:
   ctkCmdLineModuleCache(const QString& cacheDir);
   ctkCmdLineModuleCache(const QString& cacheDir);
   ~ctkCmdLineModuleCache();
   ~ctkCmdLineModuleCache();
 
 
+  /**
+   * @brief Returns the directory containing the cached information.
+   * @return a directory path
+   */
   QString cacheDir() const;
   QString cacheDir() const;
 
 
+  /**
+   * @brief Returns the cached XML associated with a module.
+   * @param moduleLocation QUrl representing the location,
+   * for example a file path for a local process.
+   * @return QByteArray the XML
+   */
   QByteArray rawXmlDescription(const QUrl& moduleLocation) const;
   QByteArray rawXmlDescription(const QUrl& moduleLocation) const;
+
+  /**
+   * @brief Returns the time stamp associated with a module.
+   * @param moduleLocation QUrl representing the location,
+   * for example a file path for a local process.
+   * @return time since epoch
+   */
   qint64 timeStamp(const QUrl& moduleLocation) const;
   qint64 timeStamp(const QUrl& moduleLocation) const;
 
 
+  /**
+   * @brief Adds a modules XML and timestamp to the cache.
+   * @param moduleLocation QUrl representing the location,
+   * for example a file path for a local process.
+   * @param timestamp the time
+   * @param xmlDescription the XML
+   */
   void cacheXmlDescription(const QUrl& moduleLocation, qint64 timestamp, const QByteArray& xmlDescription);
   void cacheXmlDescription(const QUrl& moduleLocation, qint64 timestamp, const QByteArray& xmlDescription);
 
 
+  /**
+   * @brief Removes an entry from the cache.
+   * @param moduleLocation QUrl representing the location,
+   * for example a file path for a local process.
+   */
   void removeCacheEntry(const QUrl& moduleLocation);
   void removeCacheEntry(const QUrl& moduleLocation);
 
 
 private:
 private:

+ 1 - 2
Libs/CommandLineModules/Core/ctkCmdLineModuleDefaultPathBuilder.cpp

@@ -2,8 +2,7 @@
 
 
   Library: CTK
   Library: CTK
 
 
-  Copyright (c) German Cancer Research Center,
-    Division of Medical and Biological Informatics
+  Copyright (c) University College London
 
 
   Licensed under the Apache License, Version 2.0 (the "License");
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   you may not use this file except in compliance with the License.

+ 29 - 9
Libs/CommandLineModules/Core/ctkCmdLineModuleDefaultPathBuilder.h

@@ -2,8 +2,7 @@
 
 
   Library: CTK
   Library: CTK
 
 
-  Copyright (c) German Cancer Research Center,
-    Division of Medical and Biological Informatics
+  Copyright (c) University College London
 
 
   Licensed under the Apache License, Version 2.0 (the "License");
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   you may not use this file except in compliance with the License.
@@ -30,14 +29,16 @@ class ctkCmdLineModuleDefaultPathBuilderPrivate;
 
 
 /**
 /**
  * \class ctkCmdLineModuleDefaultPathBuilder
  * \class ctkCmdLineModuleDefaultPathBuilder
- * \brief Builds up a list of directory paths to search for command line modules.
+ * \brief Builds up a list of directory paths to search for command
+ * line modules.
+ * \ingroup CommandLineModulesCore
+ * \author m.clarkson@ucl.ac.uk
  *
  *
- * Unfinished:
+ * Implements the following basic strategy, depending on which boolean
+ * flags are on: By default they are all off, as directory scanning is
+ * often time consuming.
  *
  *
  * <pre>
  * <pre>
- * Implements the following basic strategy, depending on which boolean flags are on:
- * By default they are all off, as directory scanning is often time consuming.
- *
  * 1. CTK_MODULE_LOAD_PATH environment variable
  * 1. CTK_MODULE_LOAD_PATH environment variable
  * 2. Home directory
  * 2. Home directory
  * 3. Home directory / cli-modules
  * 3. Home directory / cli-modules
@@ -46,8 +47,6 @@ class ctkCmdLineModuleDefaultPathBuilderPrivate;
  * 6. Application directory
  * 6. Application directory
  * 7. Application directory / cli-modules
  * 7. Application directory / cli-modules
  * </pre>
  * </pre>
- *
- * \author m.clarkson@ucl.ac.uk
  */
  */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleDefaultPathBuilder
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleDefaultPathBuilder
 {
 {
@@ -57,14 +56,35 @@ public:
   ctkCmdLineModuleDefaultPathBuilder();
   ctkCmdLineModuleDefaultPathBuilder();
   ~ctkCmdLineModuleDefaultPathBuilder();
   ~ctkCmdLineModuleDefaultPathBuilder();
 
 
+  /**
+   * @brief Instruct the builder to include the users
+   * home directory and sub-folder cli-modules.
+   */
   virtual void setLoadFromHomeDir(bool doLoad);
   virtual void setLoadFromHomeDir(bool doLoad);
 
 
+  /**
+   * @brief Instruct the builder to include the current
+   * running directory and sub-folder cli-modules.
+   */
   virtual void setLoadFromCurrentDir(bool doLoad);
   virtual void setLoadFromCurrentDir(bool doLoad);
 
 
+  /**
+   * @brief Instruct the builder to include the application
+   * installation directory and sub-folder cli-modules.
+   */
   virtual void setLoadFromApplicationDir(bool doLoad);
   virtual void setLoadFromApplicationDir(bool doLoad);
 
 
+  /**
+   * @brief Instruct the builder to include the path denoted
+   * by the environment variable CTK_MODULE_LOAD_PATH.
+   */
   virtual void setLoadFromCtkModuleLoadPath(bool doLoad);
   virtual void setLoadFromCtkModuleLoadPath(bool doLoad);
 
 
+  /**
+   * @brief Builds the list of paths to search and returns them
+   * as QStringList
+   * @return a QStringList of directory path names
+   */
   virtual QStringList build() const;
   virtual QStringList build() const;
 
 
 private:
 private:

+ 2 - 2
Libs/CommandLineModules/Core/ctkCmdLineModuleDescription.h

@@ -35,10 +35,10 @@ class ctkCmdLineModuleParameterGroup;
 class ctkCmdLineModuleParameter;
 class ctkCmdLineModuleParameter;
 
 
 /**
 /**
+ * \class ctkCmdLineModuleDescription
+ * \brief Description of the parameters of a command line module.
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
  *
  *
- * Description of the parameters of a command line module.
- *
  * The parameters can be used for automated GUI generation or execution
  * The parameters can be used for automated GUI generation or execution
  * of the module.
  * of the module.
  */
  */

+ 12 - 7
Libs/CommandLineModules/Core/ctkCmdLineModuleDirectoryWatcher.h

@@ -33,15 +33,18 @@ class ctkCmdLineModuleDirectoryWatcherPrivate;
 
 
 /**
 /**
  * \class ctkCmdLineModuleDirectoryWatcher
  * \class ctkCmdLineModuleDirectoryWatcher
- * \brief Provides directory scanning to load new modules into a ctkCmdLineModuleManager.
+ * \brief Provides directory scanning to automatically load new modules
+ * into a ctkCmdLineModuleManager.
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
  * \author m.clarkson@ucl.ac.uk
  * \author m.clarkson@ucl.ac.uk
  *
  *
- * This class provides directory scanning and automatic loading of command line modules.
- * The client should call setDirectories() to set the list of directories, and listen
- * to the signal modulesChanged to know when to re-build the GUI representation.
+ * This class provides directory scanning and automatic loading of command
+ * line modules. The client should call setDirectories() to set the list of
+ * directories, and listen to the signal modulesChanged to know when to
+ * re-build the GUI representation.
  */
  */
-class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleDirectoryWatcher : public QObject
+class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleDirectoryWatcher
+: public QObject
 {
 {
   Q_OBJECT
   Q_OBJECT
 
 
@@ -58,7 +61,8 @@ public:
 
 
   /**
   /**
    * \brief Set the directories to be watched.
    * \brief Set the directories to be watched.
-   * \param directories a StringList of directory names. If any of these are invalid, they will be filtered out and ignored.
+   * \param directories a StringList of directory names. If any of these are
+   * invalid, they will be filtered out and ignored.
    */
    */
   void setDirectories(const QStringList& directories);
   void setDirectories(const QStringList& directories);
 
 
@@ -68,7 +72,8 @@ public:
   QStringList directories() const;
   QStringList directories() const;
 
 
   /**
   /**
-   * \brief Returns the list of files (command line apps) currently being watched.
+   * \brief Returns the list of files (command line apps)
+   * currently being watched.
    */
    */
   QStringList files() const;
   QStringList files() const;
 
 

+ 82 - 3
Libs/CommandLineModules/Core/ctkCmdLineModuleFrontend.h

@@ -35,7 +35,12 @@ class ctkCmdLineModuleParameter;
 struct ctkCmdLineModuleFrontendPrivate;
 struct ctkCmdLineModuleFrontendPrivate;
 
 
 /**
 /**
+ * \class ctkCmdLineModuleFrontend
+ * \brief Abstract base class for all front-end command
+ * line module implementations.
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
+ * \see ctkCmdLineModuleFrontendQtGui
+ * \see ctkCmdLineModuleFrontendQtWebKit
  */
  */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleFrontend : public QObject
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleFrontend : public QObject
 {
 {
@@ -45,7 +50,7 @@ public:
 
 
   enum ParameterValueRole {
   enum ParameterValueRole {
 
 
-    /* Data returned using this role must no be of any type not supported by
+    /* Data returned using this role must not be of any type not supported by
        QVariant by default. For complex parameter types (like file, image,
        QVariant by default. For complex parameter types (like file, image,
        geometry, etc.) the data must be convertible to a QString pointing
        geometry, etc.) the data must be convertible to a QString pointing
        to a local resource.
        to a local resource.
@@ -71,37 +76,111 @@ public:
 
 
   ~ctkCmdLineModuleFrontend();
   ~ctkCmdLineModuleFrontend();
 
 
+  /**
+   * @brief Returns the GUI representation, currently supporting only
+   * QObject subclasses.
+   * @return The GUI that can then be embeded in an applicaiton
+   * window for instance.
+   */
   virtual QObject* guiHandle() const = 0;
   virtual QObject* guiHandle() const = 0;
 
 
-  virtual QVariant value(const QString& parameter, int role = LocalResourceRole) const = 0;
+  /**
+   * @brief GUIs will need to be able to read parameters,
+   * here we retrieve by role.
+   * @return QVariant
+   * @see ParameterValueRole
+   */
+  virtual QVariant value(const QString& parameter,
+      int role = LocalResourceRole) const = 0;
+
+  /**
+   * @brief Set the value of a certain parameters
+   * @param parameter The name of the parameter, as defined in the XML.
+   * @param value The value for that parameter.
+   */
   virtual void setValue(const QString& parameter, const QVariant& value) = 0;
   virtual void setValue(const QString& parameter, const QVariant& value) = 0;
 
 
+  /**
+   * @brief Return the ctkCmdLineModuleFuture, derived from QFuture to
+   * provide asynchronous processing.
+   * @see ctkCmdLineModuleFuture
+   */
   virtual ctkCmdLineModuleFuture future() const;
   virtual ctkCmdLineModuleFuture future() const;
 
 
+  /**
+   * @brief Returns a QUrl to define the location of the module that is run.
+   *
+   * For a local process this may be the file location of the command
+   * line module. For other implementations, such as a web-service,
+   * this could be a web URL.
+   *
+   * @return QUrl A resource independent URL defining where the module is.
+   */
   QUrl location() const;
   QUrl location() const;
 
 
+  /**
+   * @brief Returns a ctkCmdLineModuleReference value object that refers
+   * and provides access to the module.
+   * @return ctkCmdLineModuleReference
+   */
   ctkCmdLineModuleReference moduleReference() const;
   ctkCmdLineModuleReference moduleReference() const;
 
 
+  /**
+   * @brief Returns a list of all valid parameter names.
+   */
   virtual QList<QString> parameterNames() const;
   virtual QList<QString> parameterNames() const;
 
 
+  /**
+   * @brief Returns a map of parameter names and values.
+   */
   virtual QHash<QString,QVariant> values() const;
   virtual QHash<QString,QVariant> values() const;
+
+  /**
+   * @brief Enables the parameter values to be set.
+   */
   virtual void setValues(const QHash<QString,QVariant>& values);
   virtual void setValues(const QHash<QString,QVariant>& values);
 
 
+  /**
+   * @brief Indicates if the underlying process is currently active.
+   * @return true if running and false otherwise.
+   */
   bool isRunning() const;
   bool isRunning() const;
+
+  /**
+   * @brief Indicates if the underlying process is currently paused.
+   * @return true if paused and false otherwise.
+   */
   bool isPaused() const;
   bool isPaused() const;
 
 
   Q_SIGNAL void valueChanged(const QString& parameter, const QVariant& value);
   Q_SIGNAL void valueChanged(const QString& parameter, const QVariant& value);
 
 
   // convenience methods
   // convenience methods
 
 
-  QList<ctkCmdLineModuleParameter> parameters(const QString& type = QString(), ParameterFilters filters = All);
+  /**
+   * @brief Useful method to return subsets of parameter objects, searhing
+   * by type for example "image" and filter for example "input"/"output".
+   * @param type The type of parameter, as defined in the XML element.
+   * @param filters flag to define whether we want input/output.
+   * @return QList of ctkCmdLineModuleParameter depending on type and filters.
+   * @see ParameterFilter
+   */
+  QList<ctkCmdLineModuleParameter> parameters(
+      const QString& type = QString(),
+      ParameterFilters filters = All);
 
 
   void resetValues();
   void resetValues();
 
 
 protected:
 protected:
 
 
+  /**
+   * @brief Constructor.
+   */
   ctkCmdLineModuleFrontend(const ctkCmdLineModuleReference& moduleRef);
   ctkCmdLineModuleFrontend(const ctkCmdLineModuleReference& moduleRef);
 
 
+  /**
+   * @brief Sets the ctkCmdLineModuleFuture which effectively
+   * contains the backend that is run.
+   */
   void setFuture(const ctkCmdLineModuleFuture& future);
   void setFuture(const ctkCmdLineModuleFuture& future);
 
 
 private:
 private:

+ 3 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleFrontendFactory.h

@@ -28,7 +28,10 @@ class ctkCmdLineModuleFrontend;
 class ctkCmdLineModuleReference;
 class ctkCmdLineModuleReference;
 
 
 /**
 /**
+ * \class ctkCmdLineModuleFrontendFactory
+ * \brief Factory class to create new front-ends.
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
+ * \see ctkCmdLineModuleFrontend
  */
  */
 struct CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleFrontendFactory
 struct CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleFrontendFactory
 {
 {

+ 5 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleFuture.h

@@ -27,6 +27,11 @@
 #include <QFuture>
 #include <QFuture>
 
 
 /**
 /**
+ * \class ctkCmdLineModuleFuture
+ * \brief QFuture sub-class with in addition canCancel() and canPause().
+ * \ingroup CommandLineModulesCore
+ *
+ *
  * QFuture sub-class with two additional methods:
  * QFuture sub-class with two additional methods:
  *
  *
  *   - bool canCancel()
  *   - bool canCancel()

+ 4 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleFutureInterface.h

@@ -28,6 +28,10 @@
 
 
 class ctkCmdLineModuleFuture;
 class ctkCmdLineModuleFuture;
 
 
+/**
+ * \class ctkCmdLineModuleFutureInterface
+ * \ingroup CommandLineModulesCore
+ */
 template <>
 template <>
 class QFutureInterface<ctkCmdLineModuleResult> : public QFutureInterfaceBase
 class QFutureInterface<ctkCmdLineModuleResult> : public QFutureInterfaceBase
 {
 {

+ 2 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.h

@@ -36,6 +36,8 @@ class ctkCmdLineModuleFuture;
 struct ctkCmdLineModuleManagerPrivate;
 struct ctkCmdLineModuleManagerPrivate;
 
 
 /**
 /**
+ * \class ctkCmdLineModuleManager
+ * \brief Main manager class to handle loading and unloading of modules.
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
  */
  */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleManager : public QObject
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleManager : public QObject

+ 3 - 3
Libs/CommandLineModules/Core/ctkCmdLineModuleParameter.h

@@ -31,15 +31,15 @@ class QStringList;
 struct ctkCmdLineModuleParameterPrivate;
 struct ctkCmdLineModuleParameterPrivate;
 
 
 /** 
 /** 
- *  \ingroup CommandLineModulesCore
+ * \class ctkCmdLineModuleParameter
+ * \brief Single parameter to a module, like a threshold of a filter.
+ * \ingroup CommandLineModulesCore
  *
  *
- *  \brief Single parameter to a module, like a threshold of a filter.
  *
  *
  * ctkCmdLineModuleParameter describes a single parameters to a
  * ctkCmdLineModuleParameter describes a single parameters to a
  * module. Information on the parameter type, name, flag, label,
  * module. Information on the parameter type, name, flag, label,
  * description, channel, index, default, and constraints can be
  * description, channel, index, default, and constraints can be
  * stored.
  * stored.
- *
  */
  */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleParameter
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleParameter
 {
 {

+ 3 - 4
Libs/CommandLineModules/Core/ctkCmdLineModuleParameterGroup.h

@@ -32,10 +32,9 @@ class ctkCmdLineModuleParameter;
 struct ctkCmdLineModuleParameterGroupPrivate;
 struct ctkCmdLineModuleParameterGroupPrivate;
 
 
 /** 
 /** 
- *  \ingroup CommandLineModulesCore
- *
- *  \brief Group of parameters
- *
+ * \class ctkCmdLineModuleParameterGroup
+ * \brief Group of parameters
+ * \ingroup CommandLineModulesCore
  */
  */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleParameterGroup
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleParameterGroup
 {
 {

+ 2 - 3
Libs/CommandLineModules/Core/ctkCmdLineModulePathBuilder.h

@@ -2,8 +2,7 @@
 
 
   Library: CTK
   Library: CTK
 
 
-  Copyright (c) German Cancer Research Center,
-    Division of Medical and Biological Informatics
+  Copyright (c) University College London
 
 
   Licensed under the Apache License, Version 2.0 (the "License");
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   you may not use this file except in compliance with the License.
@@ -28,7 +27,7 @@
 
 
 /**
 /**
  * \class ctkCmdLineModulePathBuilder
  * \class ctkCmdLineModulePathBuilder
- * \brief Prototype (unfinished) interface for objects that can build
+ * \brief Prototype interface for objects that can build
  * up a list of file paths, stored in a QStringList.
  * up a list of file paths, stored in a QStringList.
  * \author m.clarkson@ucl.ac.uk
  * \author m.clarkson@ucl.ac.uk
  */
  */

+ 3 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleReference.h

@@ -32,6 +32,9 @@ class ctkCmdLineModuleDescription;
 struct ctkCmdLineModuleReferencePrivate;
 struct ctkCmdLineModuleReferencePrivate;
 
 
 /**
 /**
+ * \class ctkCmdLineModuleReference
+ * \brief Defines a reference or handle to a module, including location,
+ * XML, description and access to the backend.
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
  */
  */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleReference
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleReference

+ 5 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleResult.h

@@ -25,6 +25,11 @@
 #include <QString>
 #include <QString>
 #include <QVariant>
 #include <QVariant>
 
 
+/**
+ * \class ctkCmdLineModuleResult
+ * \brief Describes the output of a command line module.
+ * \ingroup CommandLineModulesCore
+ */
 class ctkCmdLineModuleResult
 class ctkCmdLineModuleResult
 {
 {
 public:
 public:

+ 5 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleRunException.h

@@ -28,6 +28,11 @@
 
 
 #include <QtCore>
 #include <QtCore>
 
 
+/**
+ * \class ctkCmdLineModuleRunException
+ * \brief Exception class to describe problems with running the module.
+ * \ingroup CommandLineModulesCore
+ */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleRunException
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleRunException
     : public QtConcurrent::Exception, public ctkException
     : public QtConcurrent::Exception, public ctkException
 {
 {

+ 2 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleXmlException.h

@@ -27,6 +27,8 @@
 #include "ctkCommandLineModulesCoreExport.h"
 #include "ctkCommandLineModulesCoreExport.h"
 
 
 /**
 /**
+ * \class ctkCmdLineModuleXmlException
+ * \brief Exception class to describe problems with XML processing.
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
  */
  */
 CTK_DECLARE_EXCEPTION(CTK_CMDLINEMODULECORE_EXPORT, ctkCmdLineModuleXmlException, ctkException)
 CTK_DECLARE_EXCEPTION(CTK_CMDLINEMODULECORE_EXPORT, ctkCmdLineModuleXmlException, ctkException)

+ 5 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleXmlMsgHandler_p.h

@@ -24,6 +24,11 @@
 
 
 #include <QAbstractMessageHandler>
 #include <QAbstractMessageHandler>
 
 
+/**
+ * \class QAbstractMessageHandler
+ * \brief Class to handle an XML message.
+ * \ingroup CommandLineModulesCore
+ */
 class ctkCmdLineModuleXmlMsgHandler : public QAbstractMessageHandler
 class ctkCmdLineModuleXmlMsgHandler : public QAbstractMessageHandler
 {
 {
 
 

+ 6 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleXmlParser_p.h

@@ -31,6 +31,12 @@ struct ctkCmdLineModuleParameterParser;
 
 
 class QIODevice;
 class QIODevice;
 
 
+/**
+ * \class ctkCmdLineModuleXmlParser
+ * \brief Performs XML parsing, loading data into a ctkCmdLineModuleDescription
+ * \ingroup CommandLineModulesCore
+ * \see ctkCmdLineModuleDescription
+ */
 class ctkCmdLineModuleXmlParser
 class ctkCmdLineModuleXmlParser
 {
 {
 
 

+ 5 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleXmlProgressWatcher.h

@@ -30,6 +30,11 @@ class ctkCmdLineModuleXmlProgressWatcherPrivate;
 
 
 class QIODevice;
 class QIODevice;
 
 
+/**
+ * \class ctkCmdLineModuleXmlProgressWatcher
+ * \brief Provides progress updates of a module.
+ * \ingroup CommandLineModulesCore
+ */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleXmlProgressWatcher : public QObject
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleXmlProgressWatcher : public QObject
 {
 {
   Q_OBJECT
   Q_OBJECT

+ 2 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleXmlValidator.h

@@ -31,6 +31,8 @@ class ctkCmdLineModuleXmlValidatorPrivate;
 class QIODevice;
 class QIODevice;
 
 
 /**
 /**
+ * \class ctkCmdLineModuleXmlValidator
+ * \brief Provides XML validation, comparing a modules XML to an .xsd file
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
  */
  */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleXmlValidator
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleXmlValidator

+ 2 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleXslTransform.h

@@ -31,6 +31,8 @@ class ctkCmdLineModuleXslTransformPrivate;
 class QIODevice;
 class QIODevice;
 
 
 /**
 /**
+ * \class ctkCmdLineModuleXslTransform
+ * \brief Provides a transformation from XML to the Qt ui file format.
  * \ingroup CommandLineModulesCore
  * \ingroup CommandLineModulesCore
  */
  */
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleXslTransform
 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleXslTransform

+ 18 - 2
Libs/CommandLineModules/Documentation/CTKCommandLineModules.dox

@@ -6,13 +6,29 @@
 CTK provides an API for interfacing with command line modules through a
 CTK provides an API for interfacing with command line modules through a
 self-describing XML description of the supported command line arguments.
 self-describing XML description of the supported command line arguments.
 
 
-\defgroup CommandLineModulesCore Command Line Module Support
+\defgroup CommandLineModulesCore Command Line Module Core
 \ingroup Libs
 \ingroup Libs
 \ingroup CommandLineModules
 \ingroup CommandLineModules
 
 
-\defgroup CommandLineModulesQtGui Command Line Module QtGui Support
+\defgroup CommandLineModulesBackEnd Command Line Module Back-End
 \ingroup Libs
 \ingroup Libs
 \ingroup CommandLineModules
 \ingroup CommandLineModules
 
 
+\defgroup CommandLineModulesBackendFunctionPointer Command Line Module Function Pointer
+\ingroup CommandLineModulesBackEnd
+
+\defgroup CommandLineModulesBackendLocalProcess Command Line Module Local Process
+\ingroup CommandLineModulesBackEnd
+
+\defgroup CommandLineModulesFrontEnd Command Line Module Front-End
+\ingroup Libs
+\ingroup CommandLineModules
+
+\defgroup CommandLineModulesFrontendQtGui Command Line Module QtGui
+\ingroup CommandLineModulesFrontEnd
+
+\defgroup CommandLineModulesFrontendQtWebKit Command Line Module QtWebKit
+\ingroup CommandLineModulesFrontEnd
+
 */
 */
 
 

+ 5 - 0
Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleFrontendFactoryQtGui.h

@@ -27,6 +27,11 @@
 #include "ctkCmdLineModuleFrontendFactory.h"
 #include "ctkCmdLineModuleFrontendFactory.h"
 #include "ctkCmdLineModuleFrontendQtGui.h"
 #include "ctkCmdLineModuleFrontendQtGui.h"
 
 
+/**
+ * \class ctkCmdLineModuleFrontendFactoryQtGui
+ * \brief Factory class to instantiate Qt widget based front-ends.
+ * \ingroup CommandLineModulesFrontendQtGui
+ */
 class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleFrontendFactoryQtGui : public ctkCmdLineModuleFrontendFactory
 class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleFrontendFactoryQtGui : public ctkCmdLineModuleFrontendFactory
 {
 {
 
 

+ 5 - 0
Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleFrontendQtGui.h

@@ -34,6 +34,11 @@ class QWidget;
 
 
 struct ctkCmdLineModuleFrontendQtGuiPrivate;
 struct ctkCmdLineModuleFrontendQtGuiPrivate;
 
 
+/**
+ * \class ctkCmdLineModuleFrontendQtGui
+ * \brief A Qt based implementation of the module front end.
+ * \ingroup CommandLineModulesFrontendQtGui
+ */
 class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleFrontendQtGui : public ctkCmdLineModuleFrontend
 class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleFrontendQtGui : public ctkCmdLineModuleFrontend
 {
 {
 
 

+ 1 - 0
Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleMenuFactoryQtGui.h

@@ -30,6 +30,7 @@
  * \class ctkCmdLineModuleMenuFactoryQtGui
  * \class ctkCmdLineModuleMenuFactoryQtGui
  * \brief Takes a QHash of filename and ctkCmdLineModuleReference and produces a QMenu.
  * \brief Takes a QHash of filename and ctkCmdLineModuleReference and produces a QMenu.
  * \author m.clarkson@ucl.ac.uk
  * \author m.clarkson@ucl.ac.uk
+ * \ingroup CommandLineModulesFrontendQtGui
  */
  */
 class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleMenuFactoryQtGui
 class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleMenuFactoryQtGui
 {
 {

+ 2 - 2
Libs/CommandLineModules/Frontend/QtGui/ctkCmdLineModuleObjectTreeWalker_p.h

@@ -30,8 +30,8 @@ class QVariant;
 
 
 /**
 /**
  * \class ctkCmdLineModuleObjectTreeWalker
  * \class ctkCmdLineModuleObjectTreeWalker
- *
- * Note: Deliberately not exported.
+ * \brief Non-exported helper class to iterate through GUI widgets.
+ * \ingroup CommandLineModulesFrontendQtGui
  */
  */
 class ctkCmdLineModuleObjectTreeWalker
 class ctkCmdLineModuleObjectTreeWalker
 {
 {

+ 5 - 0
Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendFactoryQtWebKit.h

@@ -26,6 +26,11 @@
 
 
 #include "ctkCmdLineModuleFrontendFactory.h"
 #include "ctkCmdLineModuleFrontendFactory.h"
 
 
+/**
+ * \class ctkCmdLineModuleFrontendFactoryQtWebKit
+ * \brief QtWebKit specific implementation of ctkCmdLineModuleFrontendFactory
+ * \ingroup CommandLineModulesFrontendQtWebKit
+ */
 class CTK_CMDLINEMODULEQTWEBKIT_EXPORT ctkCmdLineModuleFrontendFactoryQtWebKit : public ctkCmdLineModuleFrontendFactory
 class CTK_CMDLINEMODULEQTWEBKIT_EXPORT ctkCmdLineModuleFrontendFactoryQtWebKit : public ctkCmdLineModuleFrontendFactory
 {
 {
 
 

+ 5 - 0
Libs/CommandLineModules/Frontend/QtWebKit/ctkCmdLineModuleFrontendQtWebKit_p.h

@@ -26,6 +26,11 @@
 
 
 class QWebView;
 class QWebView;
 
 
+/**
+ * \class ctkCmdLineModuleFrontendQtWebKit
+ * \brief QtWebKit specific implementation of ctkCmdLineModuleFrontend
+ * \ingroup CommandLineModulesFrontendQtWebKit
+ */
 class ctkCmdLineModuleFrontendQtWebKit : public ctkCmdLineModuleFrontend
 class ctkCmdLineModuleFrontendQtWebKit : public ctkCmdLineModuleFrontend
 {
 {