diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/ITableWorkspace.h b/Code/Mantid/Framework/API/inc/MantidAPI/ITableWorkspace.h index 3610818272772776efb65d28eae9db1cf006ba55..922b1ed1402539fe3b439a9927d93e31524013b1 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/ITableWorkspace.h +++ b/Code/Mantid/Framework/API/inc/MantidAPI/ITableWorkspace.h @@ -8,7 +8,7 @@ #include "MantidAPI/Workspace.h" #include "MantidAPI/Column.h" #include "MantidKernel/V3D.h" - +#include "MantidKernel/PropertyManager.h" #include <boost/shared_ptr.hpp> #include <boost/lexical_cast.hpp> @@ -125,7 +125,7 @@ public: // ===================================================================================== -class ITableWorkspace_DllExport ITableWorkspace: public API::Workspace +class ITableWorkspace_DllExport ITableWorkspace: public API::Workspace, virtual public PropertyManager { public: /// Virtual destructor. diff --git a/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/TableWorkspace.h b/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/TableWorkspace.h index 7cf22965acd178f769dc30e55df1569e234937e8..4d16509e79d01ed6c1c2ec8f7883c7752706a47c 100644 --- a/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/TableWorkspace.h +++ b/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/TableWorkspace.h @@ -6,6 +6,7 @@ //---------------------------------------------------------------------- #include "MantidKernel/System.h" +#include "MantidKernel/PropertyManager.h" #include "MantidAPI/ITableWorkspace.h" #include "MantidDataObjects/TableColumn.h" #include <boost/shared_ptr.hpp> @@ -406,6 +407,8 @@ private: /// Logger static Kernel::Logger& g_log; + Kernel::PropertyManager_sptr m_TableProperties; + }; /// Typedef for a shared pointer to \c TableWorkspace diff --git a/Code/Mantid/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h b/Code/Mantid/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h index 363b8719b5eb106dcbe82e0a825e87b7d37b76ca..1686ac33581ebed13669bec10dcbbe183c904000 100644 --- a/Code/Mantid/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h +++ b/Code/Mantid/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h @@ -224,7 +224,8 @@ namespace Mantid TYPE getSingleValue(const DateAndTime& t, int& index) const; /// Returns total value, added up for all times regardless of filter TYPE getTotalValue() const; - //template<typename U,typename TYPE> U getTotalValue() const; + //template<> int TimeSeriesProperty<bool>::getTotalValue() const; + /// Returns n-th valid time interval, in a very inefficient way. TimeInterval nthInterval(int n) const; diff --git a/Code/Mantid/Framework/Kernel/src/TimeSeriesProperty.cpp b/Code/Mantid/Framework/Kernel/src/TimeSeriesProperty.cpp index 0f41a9658919472daeb7c70cbde29ebb927c71b1..ea82849fcc1a40a5e458e1df571f69e33c5ef6e2 100644 --- a/Code/Mantid/Framework/Kernel/src/TimeSeriesProperty.cpp +++ b/Code/Mantid/Framework/Kernel/src/TimeSeriesProperty.cpp @@ -961,7 +961,7 @@ namespace Mantid * Returns total value, added up for all times regardless of filter * @return Total value from all times */ - template<typename TYPE> + template<typename TYPE> TYPE TimeSeriesProperty<TYPE>::getTotalValue() const { TYPE total = 0; @@ -973,18 +973,18 @@ namespace Mantid return total; } - /* template<> - int TimeSeriesProperty<bool>::getTotalValue() const + template<> + bool TimeSeriesProperty<bool>::getTotalValue() const { - int total = 0; + if(m_values.size()==0)return false; + bool total = m_values[0].value(); - for (size_t i = 0; i < m_values.size(); ++i) + for (size_t i = 1; i < m_values.size(); ++i) { - if(m_values[i].value())total++; + total&=m_values[i].value(); } return total; - }*/ - + } /** Returns n-th valid time interval, in a very inefficient way.