Commit 126c3892 authored by Janik Zikovsky's avatar Janik Zikovsky
Browse files

Refs #2572: Added an initDocs() for all algorithms that sets the summary...

Refs #2572: Added an initDocs() for all algorithms that sets the summary string to display in the dialog, as well as the wiki summary for possible later auto-wiki-fication of documentation.
parent 0dce5f15
...@@ -232,6 +232,9 @@ public: ...@@ -232,6 +232,9 @@ public:
/// Returns the cancellation state /// Returns the cancellation state
bool getCancel() const { return m_cancel; } bool getCancel() const { return m_cancel; }
/// Sets documentation strings for this algorithm
virtual void initDocs() {};
/// function returns an optional message that will be displayed in the default GUI, at the top. /// function returns an optional message that will be displayed in the default GUI, at the top.
const std::string getOptionalMessage() const { return m_OptionalMessage;} const std::string getOptionalMessage() const { return m_OptionalMessage;}
......
...@@ -50,6 +50,9 @@ namespace Mantid ...@@ -50,6 +50,9 @@ namespace Mantid
// Bypass the initialization if the algorithm has already been initialized. // Bypass the initialization if the algorithm has already been initialized.
if (m_isInitialized) return; if (m_isInitialized) return;
// Set the documentation. This virtual method is overridden by (nearly) all algorithms and gives documentation summary.
initDocs();
g_log.setName(this->name()); g_log.setName(this->name());
try try
{ {
......
...@@ -60,6 +60,8 @@ public: ...@@ -60,6 +60,8 @@ public:
virtual const std::string category() const { return "DataHandling\\Logs"; } virtual const std::string category() const { return "DataHandling\\Logs"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
/// Execution code /// Execution code
......
...@@ -89,6 +89,8 @@ public: ...@@ -89,6 +89,8 @@ public:
static bool readCalFile(const std::string& groupingFileName, std::map<int,double>& offsets, std::map<int,int>& group); static bool readCalFile(const std::string& groupingFileName, std::map<int,double>& offsets, std::map<int,int>& group);
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
// Implement abstract Algorithm methods // Implement abstract Algorithm methods
void init(); void init();
void exec(); void exec();
......
...@@ -77,6 +77,8 @@ public: ...@@ -77,6 +77,8 @@ public:
virtual int version() const { return (1); } virtual int version() const { return (1); }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
void defineProperties(); void defineProperties();
void retrieveProperties(); void retrieveProperties();
std::string sampleXML(); std::string sampleXML();
......
...@@ -50,6 +50,8 @@ public: ...@@ -50,6 +50,8 @@ public:
virtual const std::string category() const { return "SANS"; } virtual const std::string category() const { return "SANS"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
/// Execution code /// Execution code
......
...@@ -52,6 +52,8 @@ public: ...@@ -52,6 +52,8 @@ public:
virtual const std::string category() const { return "SANS";} virtual const std::string category() const { return "SANS";}
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
// Overridden Algorithm methods // Overridden Algorithm methods
void init(); void init();
void exec(); void exec();
......
...@@ -71,6 +71,8 @@ public: ...@@ -71,6 +71,8 @@ public:
virtual const std::string category() const { return "SANS"; } virtual const std::string category() const { return "SANS"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
/// Execution code /// Execution code
......
...@@ -73,6 +73,8 @@ public: ...@@ -73,6 +73,8 @@ public:
virtual const std::string category() const { return "SANS"; } virtual const std::string category() const { return "SANS"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
/// Execution code /// Execution code
......
...@@ -58,6 +58,8 @@ namespace Mantid ...@@ -58,6 +58,8 @@ namespace Mantid
virtual const std::string category() const { return "General";} virtual const std::string category() const { return "General";}
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
// Overridden Algorithm methods // Overridden Algorithm methods
void init(); void init();
void exec(); void exec();
......
...@@ -83,6 +83,8 @@ public: ...@@ -83,6 +83,8 @@ public:
} }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
/// Execution code /// Execution code
......
...@@ -57,6 +57,8 @@ public: ...@@ -57,6 +57,8 @@ public:
virtual const std::string category() const { return "General"; } virtual const std::string category() const { return "General"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
/// Execution code /// Execution code
......
...@@ -63,6 +63,8 @@ public: ...@@ -63,6 +63,8 @@ public:
virtual const std::string category() const { return "General";} virtual const std::string category() const { return "General";}
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
// Overridden Algorithm methods // Overridden Algorithm methods
void init(); void init();
void exec(); void exec();
......
...@@ -55,6 +55,8 @@ public: ...@@ -55,6 +55,8 @@ public:
virtual const std::string category() const { return "General"; } virtual const std::string category() const { return "General"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
///Execution code ///Execution code
......
...@@ -61,6 +61,8 @@ public: ...@@ -61,6 +61,8 @@ public:
virtual const std::string category() const { return "Units"; } virtual const std::string category() const { return "Units"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
///Execution code ///Execution code
......
...@@ -55,6 +55,8 @@ public: ...@@ -55,6 +55,8 @@ public:
virtual const std::string category() const { return "General"; } virtual const std::string category() const { return "General"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
///Execution code ///Execution code
......
...@@ -44,6 +44,8 @@ namespace Mantid ...@@ -44,6 +44,8 @@ namespace Mantid
virtual const std::string name() const { return "ConvertToHistogram"; } virtual const std::string name() const { return "ConvertToHistogram"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Returns true if the algorithm needs to be run. /// Returns true if the algorithm needs to be run.
bool isProcessingRequired(const API::MatrixWorkspace_sptr inputWS) const; bool isProcessingRequired(const API::MatrixWorkspace_sptr inputWS) const;
/// Checks the input workspace is consistent, throwing if not /// Checks the input workspace is consistent, throwing if not
......
...@@ -62,6 +62,8 @@ public: ...@@ -62,6 +62,8 @@ public:
{ return "General";} { return "General";}
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Initialisation code /// Initialisation code
void init(); void init();
/// Execution code /// Execution code
......
...@@ -44,6 +44,8 @@ namespace Mantid ...@@ -44,6 +44,8 @@ namespace Mantid
virtual const std::string name() const { return "ConvertToPointData"; } virtual const std::string name() const { return "ConvertToPointData"; }
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
/// Returns true if the algorithm needs to be run. /// Returns true if the algorithm needs to be run.
bool isProcessingRequired(const API::MatrixWorkspace_sptr inputWS) const; bool isProcessingRequired(const API::MatrixWorkspace_sptr inputWS) const;
/// Checks the input workspace is consistent, throwing if not /// Checks the input workspace is consistent, throwing if not
......
...@@ -73,6 +73,8 @@ public: ...@@ -73,6 +73,8 @@ public:
virtual const std::string category() const { return "Units";} virtual const std::string category() const { return "Units";}
private: private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
// Overridden Algorithm methods // Overridden Algorithm methods
void init(); void init();
void exec(); void exec();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment