From 33d1100a4ec9bafba72d2c671cb15d216474c831 Mon Sep 17 00:00:00 2001
From: Nick Draper <nick.draper@stfc.ac.uk>
Date: Fri, 9 Jul 2010 14:25:28 +0000
Subject: [PATCH] re #100

more doxygen warning hunting
---
 Code/Mantid/Build/DoxyWrapper.py              |  2 +-
 Code/Mantid/Geometry/src/Math/PolyVar.cpp     | 17 +++++++++--------
 Code/Mantid/Geometry/src/Math/PolyVarOne.cpp  | 16 ++++++++--------
 .../Kernel/inc/MantidKernel/IValidator.h      |  1 +
 .../Kernel/inc/MantidKernel/LogFilter.h       |  1 +
 .../inc/MantidKernel/PropertyWithValue.h      |  2 ++
 .../inc/MantidKernel/TimeSeriesProperty.h     |  1 +
 Code/Mantid/Kernel/inc/MantidKernel/Unit.h    |  3 +++
 Code/Mantid/Kernel/src/Exception.cpp          |  6 +++---
 Code/Mantid/Kernel/src/Logger.cpp             |  2 ++
 Code/Mantid/Kernel/src/Property.cpp           |  2 ++
 Code/Mantid/Kernel/src/PropertyHistory.cpp    |  1 +
 Code/Mantid/Kernel/src/PropertyManager.cpp    |  1 +
 .../MantidNexus/LoadInstrumentFromSNSNexus.h  |  1 +
 .../Nexus/inc/MantidNexus/LoadSNSNexus.h      |  1 +
 .../Nexus/inc/MantidNexus/NexusClasses.h      | 19 +++++++++++++++++++
 Code/Mantid/Nexus/src/LoadNexusProcessed.cpp  |  2 +-
 Code/Mantid/Nexus/src/NexusClasses.cpp        |  1 +
 Code/Mantid/Nexus/src/NexusFileIO.cpp         |  1 +
 19 files changed, 59 insertions(+), 21 deletions(-)

diff --git a/Code/Mantid/Build/DoxyWrapper.py b/Code/Mantid/Build/DoxyWrapper.py
index 4ad863275c1..912f5968fe4 100644
--- a/Code/Mantid/Build/DoxyWrapper.py
+++ b/Code/Mantid/Build/DoxyWrapper.py
@@ -5,7 +5,7 @@ import subprocess as sp
 
 process = sp.Popen("doxygen "+sys.argv[1],stderr=sp.PIPE,shell=True)
 
-regExStrings = ['return type of member.*(m_|g_).*is not documented', #remove warnings about return type of member and global variables
+regExStrings = ['return type of member.*(c_|m_|g_).*is not documented', #remove warnings about return type of member and global variables
 'return type of member.*Mantid::PhysicalConstants::.*is not documented',#not return type moans about our constants file please
 'Problems running dvips', #moans about dvips not being installed
 'Problems running latex'] #moans about latex not being installed
diff --git a/Code/Mantid/Geometry/src/Math/PolyVar.cpp b/Code/Mantid/Geometry/src/Math/PolyVar.cpp
index 5283500d3e1..9387ac30617 100644
--- a/Code/Mantid/Geometry/src/Math/PolyVar.cpp
+++ b/Code/Mantid/Geometry/src/Math/PolyVar.cpp
@@ -222,13 +222,13 @@ namespace Mantid
       return;
     }
 
-    template<int VCount>
-    double 
-      PolyVar<VCount>::operator()(const double* DArray) const
-      /*!
+          /*!
       Calculate the value of the polynomial at a point
       \param DArray :: Values [x,y,z]
+      \return the value
       */
+    template<int VCount>
+    double PolyVar<VCount>::operator()(const double* DArray) const
     {
       double X(1.0);
       double sum(0.0);
@@ -731,15 +731,16 @@ namespace Mantid
       return Out;
     }
 
-    template<int VCount>
-    int
-      PolyVar<VCount>::read(const std::string& Line)
-      /*!
+          /*!
       Given a line of type 
       y^2+xy+3.0x 
       convert into a function:
       Variables in list are x,y,z,a,b,c,....
+      \param Line the inpout values in the format x,y,z,a,b,c,....
+      \return 0 on success
       */
+    template<int VCount>
+    int PolyVar<VCount>::read(const std::string& Line)
     {
       const char Variable("xyzabc"[VCount-1]);
       std::string CLine=StrFunc::removeSpace(Line);
diff --git a/Code/Mantid/Geometry/src/Math/PolyVarOne.cpp b/Code/Mantid/Geometry/src/Math/PolyVarOne.cpp
index 155a8a9251e..5e14f5db2e7 100644
--- a/Code/Mantid/Geometry/src/Math/PolyVarOne.cpp
+++ b/Code/Mantid/Geometry/src/Math/PolyVarOne.cpp
@@ -196,12 +196,12 @@ namespace Mantid
       return Result;
     }
 
-    double 
-      PolyVar<1>::operator()(const double* DArray) const
       /*!
       Calculate the value of the polynomial at a point
       \param DArray :: Values [x,y,z]
+      \return the value at that point
       */
+    double PolyVar<1>::operator()(const double* DArray) const
     {
       double X(1.0);
       double sum(0.0);
@@ -794,12 +794,12 @@ namespace Mantid
       return 2;
     }
 
-    int 
-      PolyVar<1>::getCount(const double eps) const
-      /*!
+          /*!
       Get the count
       \param eps :: Value to used
+      \return The count
       */
+    int PolyVar<1>::getCount(const double eps) const
     {
       int cnt(0);
       for(int i=0;i<=iDegree;i++)
@@ -808,12 +808,12 @@ namespace Mantid
       return cnt++;
     }
 
-    int 
-      PolyVar<1>::isZero(const double eps) const
-      /*!
+          /*!
       Determine if is zero
       \param eps :: Value to used
+      \return 0 if the value is 0, otherwise 1
       */
+    int PolyVar<1>::isZero(const double eps) const
     {
       int i;
       for(i=0;i<=iDegree && fabs(PCoeff[i])<eps;i++);
diff --git a/Code/Mantid/Kernel/inc/MantidKernel/IValidator.h b/Code/Mantid/Kernel/inc/MantidKernel/IValidator.h
index f991534491a..bdd5c1e8306 100644
--- a/Code/Mantid/Kernel/inc/MantidKernel/IValidator.h
+++ b/Code/Mantid/Kernel/inc/MantidKernel/IValidator.h
@@ -57,6 +57,7 @@ public:
 
   /** The set of allowed values that this validator may have, if a discrete set exists.
    *  Overridden in applicable concrete validators; the base class just returns an empty set.
+   *  @return The set of allowed values that this validator may have or an empty set
    */
   virtual std::set<std::string> allowedValues() const { return std::set<std::string>(); }
   
diff --git a/Code/Mantid/Kernel/inc/MantidKernel/LogFilter.h b/Code/Mantid/Kernel/inc/MantidKernel/LogFilter.h
index fef8de54366..815eb6335bc 100644
--- a/Code/Mantid/Kernel/inc/MantidKernel/LogFilter.h
+++ b/Code/Mantid/Kernel/inc/MantidKernel/LogFilter.h
@@ -58,6 +58,7 @@ public:
 
     /** Returns reference to the filtered property. Use its nthValue and nthInterval
         to iterate through the allowed values and time intervals.
+        @return A reference to the filtered property
      */
     const TimeSeriesProperty<double>* data()const{return m_prop.get();}
 
diff --git a/Code/Mantid/Kernel/inc/MantidKernel/PropertyWithValue.h b/Code/Mantid/Kernel/inc/MantidKernel/PropertyWithValue.h
index 9afd047f198..a4fd1eb47a5 100644
--- a/Code/Mantid/Kernel/inc/MantidKernel/PropertyWithValue.h
+++ b/Code/Mantid/Kernel/inc/MantidKernel/PropertyWithValue.h
@@ -282,6 +282,7 @@ public:
    *  Allows assignment of a new value to the property by writing,
    *  e.g., myProperty = 3;
    *  @param value The new value to assign to the property
+   *  @param the reference to itself
    */
   virtual TYPE& operator=( const TYPE& value )
   {
@@ -309,6 +310,7 @@ public:
 
   /** Allows you to get the value of the property simply by typing its name.
    *  Means you can use an expression like: int i = myProperty;
+   * @return the value
    */
   virtual operator const TYPE& () const
   {
diff --git a/Code/Mantid/Kernel/inc/MantidKernel/TimeSeriesProperty.h b/Code/Mantid/Kernel/inc/MantidKernel/TimeSeriesProperty.h
index 2eae33c5e90..65fed927b29 100644
--- a/Code/Mantid/Kernel/inc/MantidKernel/TimeSeriesProperty.h
+++ b/Code/Mantid/Kernel/inc/MantidKernel/TimeSeriesProperty.h
@@ -143,6 +143,7 @@ public:
 
   /** Not implemented in this class
    *  @throws Exception::NotImplementedError Not yet implemented
+   * @return Nothing in this case
    */
   std::string setValue(const std::string&)
   {
diff --git a/Code/Mantid/Kernel/inc/MantidKernel/Unit.h b/Code/Mantid/Kernel/inc/MantidKernel/Unit.h
index 098aae00f19..010a13f7554 100644
--- a/Code/Mantid/Kernel/inc/MantidKernel/Unit.h
+++ b/Code/Mantid/Kernel/inc/MantidKernel/Unit.h
@@ -48,10 +48,13 @@ public:
   /// The name of the unit. For a concrete unit, this method's definition is in the DECLARE_UNIT
   /// macro and it will return the argument passed to that macro (which is the unit's key in the
   /// factory).
+  /// @return The unit ID
   virtual const std::string unitID() const = 0;
   /// The full name of the unit
+  /// @return The unit caption
   virtual const std::string caption() const = 0;
   /// A label for the unit to be printed on axes
+  /// @return The unit label
   virtual const std::string label() const = 0;
 
   // Check whether the unit can be converted to another via a simple factor
diff --git a/Code/Mantid/Kernel/src/Exception.cpp b/Code/Mantid/Kernel/src/Exception.cpp
index 5c65fa03b4f..445bba8a6c2 100644
--- a/Code/Mantid/Kernel/src/Exception.cpp
+++ b/Code/Mantid/Kernel/src/Exception.cpp
@@ -286,11 +286,11 @@ IndexError::IndexError(const IndexError& A) :
   std::runtime_error(A),Val(A.Val),maxVal(A.maxVal)
 {}
 
-const char*
-IndexError::what() const throw()
-  /*!
+    /*!
     Writes out the range and limits
+    @return the error string
   */
+const char* IndexError::what() const throw()
 {
   std::stringstream cx;
   cx<<"IndexError:"<<std::runtime_error::what()<<" "<<Val<<" :: 0 <==> "<<maxVal;
diff --git a/Code/Mantid/Kernel/src/Logger.cpp b/Code/Mantid/Kernel/src/Logger.cpp
index 289253a74be..acaf9a22806 100755
--- a/Code/Mantid/Kernel/src/Logger.cpp
+++ b/Code/Mantid/Kernel/src/Logger.cpp
@@ -152,6 +152,7 @@ namespace Mantid
 
     /** Returns true if at least the given log level is set.
      *  @param level The logging level it is best to use the Logger::Priority enum (7=debug, 6=information, 4=warning, 3=error, 2=critical, 1=fatal)
+     *  @return true if at least the given log level is set.
      */
     bool Logger::is(int level) const
     {
@@ -377,6 +378,7 @@ namespace Mantid
      *  This logger is stored until in a static list until it is destroyed, released or Logger::shutdown is called.
      * 
      *  @param name The name of the logger to use - this is usually the class name. 
+     *  @return a reference to the Logger with the given name.
      */
     Logger& Logger::get(const std::string& name)
     {
diff --git a/Code/Mantid/Kernel/src/Property.cpp b/Code/Mantid/Kernel/src/Property.cpp
index 722302a36f4..bf86cf08b43 100644
--- a/Code/Mantid/Kernel/src/Property.cpp
+++ b/Code/Mantid/Kernel/src/Property.cpp
@@ -38,6 +38,7 @@ Property::~Property()
 
 /** Copy assignment operator. Does nothing.
 * @param right The right hand side value
+* @return pointer to this
 */
 Property& Property::operator=( const Property& right )
 {
@@ -97,6 +98,7 @@ void Property::setDocumentation( const std::string& documentation )
 
 /** Returns the set of valid values for this property, if such a set exists.
  *  If not, it returns an empty set.
+ * @return the set of valid values for this property or an empty set
  */
 std::set<std::string> Property::allowedValues() const
 {
diff --git a/Code/Mantid/Kernel/src/PropertyHistory.cpp b/Code/Mantid/Kernel/src/PropertyHistory.cpp
index 531a31f2775..b77cd268d2f 100644
--- a/Code/Mantid/Kernel/src/PropertyHistory.cpp
+++ b/Code/Mantid/Kernel/src/PropertyHistory.cpp
@@ -31,6 +31,7 @@ PropertyHistory::PropertyHistory(const PropertyHistory& A) :
 /**
  * Standard Assignment operator
  * \param A :: PropertyHistory Item to assign to 'this'
+ * \return pointer to this
  */
 PropertyHistory& PropertyHistory::operator=(const PropertyHistory& A)
 {
diff --git a/Code/Mantid/Kernel/src/PropertyManager.cpp b/Code/Mantid/Kernel/src/PropertyManager.cpp
index 32cc7dbe39c..df374d5c24c 100644
--- a/Code/Mantid/Kernel/src/PropertyManager.cpp
+++ b/Code/Mantid/Kernel/src/PropertyManager.cpp
@@ -38,6 +38,7 @@ namespace Mantid
 
     /// Assignment operator - performs a deep copy
     /// @param other the PropertyManager to copy
+    /// @return pointer to this
     PropertyManager& PropertyManager::operator=(const PropertyManager& other)
     {
       // We need to do a deep copy here
diff --git a/Code/Mantid/Nexus/inc/MantidNexus/LoadInstrumentFromSNSNexus.h b/Code/Mantid/Nexus/inc/MantidNexus/LoadInstrumentFromSNSNexus.h
index 4964a21a98e..0859c75f0d5 100644
--- a/Code/Mantid/Nexus/inc/MantidNexus/LoadInstrumentFromSNSNexus.h
+++ b/Code/Mantid/Nexus/inc/MantidNexus/LoadInstrumentFromSNSNexus.h
@@ -105,6 +105,7 @@ namespace API
           /** Compare operator
           *  @param s1 First argument
           *  @param s2 Second argument
+          *  @return true if s1<s2
           */
           bool operator()(const std::string& s1, const std::string& s2)
           {
diff --git a/Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h b/Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h
index 4f642b0dba9..0ec5d032e04 100644
--- a/Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h
+++ b/Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h
@@ -97,6 +97,7 @@ namespace NeXus
             /** Compare operator
             *  @param s1 First argument
             *  @param s2 Second argument
+            *  @return true if i1<i2
             */
             bool operator()(const std::string& s1, const std::string& s2)
             {
diff --git a/Code/Mantid/Nexus/inc/MantidNexus/NexusClasses.h b/Code/Mantid/Nexus/inc/MantidNexus/NexusClasses.h
index 3c8b5f2bf12..10528060416 100644
--- a/Code/Mantid/Nexus/inc/MantidNexus/NexusClasses.h
+++ b/Code/Mantid/Nexus/inc/MantidNexus/NexusClasses.h
@@ -200,6 +200,7 @@ namespace Mantid
       NXDataSetTyped(const NXClass& parent,const std::string& name):NXDataSet(parent,name),m_n(0){}
       /** Returns a pointer to the internal data buffer.
       *  @throw runtime_error exception if the data have not been loaded / initialized.
+      *  @return a pointer to the array of items
       */
       T* operator()()const
       {
@@ -210,6 +211,7 @@ namespace Mantid
       *  @param i The linear index of the data element
       *  @throw runtime_error if the data have not been loaded / initialized.
       *  @throw range_error if the index is greater than the buffer size.
+      *  @return A reference to the value
       */
       T& operator[](int i)const
       {
@@ -222,6 +224,7 @@ namespace Mantid
       *  @param j The index along dim1()
       *  @throw runtime_error if the data have not been loaded / initialized.
       *  @throw range_error if the indeces point outside the buffer.
+      *  @return A reference to the value
       */
       T& operator()(int i, int j)const
       {
@@ -233,6 +236,7 @@ namespace Mantid
       *  @param k The index along dim2()
       *  @throw runtime_error if the data have not been loaded / initialized.
       *  @throw range_error if the indeces point outside the buffer.
+      *  @return A reference to the value
       */
       T& operator()(int i, int j, int k)const
       {
@@ -456,6 +460,7 @@ namespace Mantid
       /**
       * Check if a path exists relative to the current class path
       * @param path A string representing the path to test
+      * @return True if it is valid
       */
       bool isValid(const std::string & path) const;
       /**  Templated method for creating derived NX classes. It also opens the created class.
@@ -491,34 +496,42 @@ namespace Mantid
 
       /**  Creates and opens an integer dataset
       *   @param name The name of the dataset
+      *   @return The int
       */
       NXInt openNXInt(const std::string& name)const{return openNXDataSet<int>(name);}
       /**  Creates and opens a float dataset
       *   @param name The name of the dataset
+      *   @return The float
       */
       NXFloat openNXFloat(const std::string& name)const{return openNXDataSet<float>(name);}
       /**  Creates and opens a double dataset
       *   @param name The name of the dataset
+      *   @return The double
       */
       NXDouble openNXDouble(const std::string& name)const{return openNXDataSet<double>(name);}
       /**  Creates and opens a char dataset
       *   @param name The name of the dataset
+      *   @return The char
       */
       NXChar openNXChar(const std::string& name)const{return openNXDataSet<char>(name);}
       /**  Returns a string 
       *   @param name The name of the NXChar dataset
+      *   @return The string
       */
       std::string getString(const std::string& name)const;
       /**  Returns a double 
       *   @param name The name of the NXDouble dataset
+      *   @return The double
       */
       double getDouble(const std::string& name)const;
       /**  Returns a float 
       *   @param name The name of the NXFloat dataset
+      *   @return The float
       */
       float getFloat(const std::string& name)const;
       /**  Returns a int 
       *   @param name The name of the NXInt dataset
+      *   @return The int
       */
       int getInt(const std::string& name)const;
 
@@ -702,10 +715,12 @@ namespace Mantid
       NXMainClass(const NXClass& parent,const std::string& name):NXClass(parent,name){}
       /**  Opens a NXLog class
       *   @param name The name of the NXLog
+      *   @return The log
       */
       NXLog openNXLog(const std::string& name){return openNXClass<NXLog>(name);}
       /**  Opens a NXNote class
       *   @param name The name of the NXNote
+      *   @return The note
       */
       NXNote openNXNote(const std::string& name){return openNXClass<NXNote>(name);}
     };
@@ -787,6 +802,7 @@ namespace Mantid
       std::string NX_class()const{return "NXinstrument";}
       /**  Opens a NXDetector
       *   @param name The name of the class
+      *   @return The detector
       */
       NXDetector openNXDetector(const std::string& name){return openNXClass<NXDetector>(name);}
     };
@@ -805,10 +821,12 @@ namespace Mantid
       std::string NX_class()const{return "NXentry";}
       /**  Opens a NXData
       *   @param name The name of the class
+      *   @return the nxdata entry
       */
       NXData openNXData(const std::string& name){return openNXClass<NXData>(name);}
       /**  Opens a NXInstrument
       *   @param name The name of the class
+      *   @return the instrument
       */
       NXInstrument openNXInstrument(const std::string& name){return openNXClass<NXInstrument>(name);}
     };
@@ -830,6 +848,7 @@ namespace Mantid
       bool isStandard()const;
       /**  Opens an entry -- a topmost Nexus class
       *   @param name The name of the entry
+      *   @return the entry
       */
       NXEntry openEntry(const std::string& name){return openNXClass<NXEntry>(name);}
     private:
diff --git a/Code/Mantid/Nexus/src/LoadNexusProcessed.cpp b/Code/Mantid/Nexus/src/LoadNexusProcessed.cpp
index a1a258b7e74..c0512fff8c6 100644
--- a/Code/Mantid/Nexus/src/LoadNexusProcessed.cpp
+++ b/Code/Mantid/Nexus/src/LoadNexusProcessed.cpp
@@ -957,8 +957,8 @@ namespace Mantid
 	/**
 	* Calculate the size of a workspace
 	* @param numberofspectra number of spectrums 
+  * @return the size of a workspace
 	*/
-
 	int LoadNexusProcessed::calculateWorkspacesize(const int numberofspectra)
 	{
 		// Calculate the size of a workspace, given its number of spectra to read
diff --git a/Code/Mantid/Nexus/src/NexusClasses.cpp b/Code/Mantid/Nexus/src/NexusClasses.cpp
index dbc14032d8f..25299cc36de 100644
--- a/Code/Mantid/Nexus/src/NexusClasses.cpp
+++ b/Code/Mantid/Nexus/src/NexusClasses.cpp
@@ -507,6 +507,7 @@ NXData::NXData(const NXClass& parent,const std::string& name):NXMainClass(parent
  * @param start_time If the "time" dataset does not have the "start" attribute sets the
  *   start time for the series.
  * @param new_name If not empty it is used as the TimeSeries property name
+ *   @return The property or NULL
  */
 Kernel::Property* NXLog::createTimeSeries(const std::string& start_time,const std::string& new_name)
 {
diff --git a/Code/Mantid/Nexus/src/NexusFileIO.cpp b/Code/Mantid/Nexus/src/NexusFileIO.cpp
index c37dd39a5a8..6a026ccd841 100644
--- a/Code/Mantid/Nexus/src/NexusFileIO.cpp
+++ b/Code/Mantid/Nexus/src/NexusFileIO.cpp
@@ -1144,6 +1144,7 @@ namespace Mantid
 
     /** Write the algorithm and environment information.
     *  @param localworkspace The workspace
+    *  @return 0 on success
     */
     int NexusFileIO::writeNexusProcessedProcess(const API::MatrixWorkspace_const_sptr& localworkspace)
     {
-- 
GitLab