Skip to content
Snippets Groups Projects
Commit 52059ff4 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Refs #2897. Actually give toString a default so that it makes sense in most...

Refs #2897. Actually give toString a default so that it makes sense in most situations. This will fix the Python test failure.
parent f98bdc4a
No related branches found
No related tags found
No related merge requests found
...@@ -266,7 +266,7 @@ public: ...@@ -266,7 +266,7 @@ public:
/** @name Serialization functions */ /** @name Serialization functions */
//@{ //@{
/// Serialize an object to a string /// Serialize an object to a string
virtual std::string toString(bool withDefaultValues) const; virtual std::string toString(bool withDefaultValues = false) const;
/// De-serialize an object from a string /// De-serialize an object from a string
static IAlgorithm_sptr fromString(const std::string & input); static IAlgorithm_sptr fromString(const std::string & input);
/// Construct an object from a history entry /// Construct an object from a history entry
......
...@@ -123,7 +123,7 @@ namespace Mantid ...@@ -123,7 +123,7 @@ namespace Mantid
/** @name String serialization */ /** @name String serialization */
//@{ //@{
/// Serialize an object to a string /// Serialize an object to a string
virtual std::string toString(bool withDefaultValues) const; virtual std::string toString(bool withDefaultValues = false) const;
//@} //@}
private: private:
......
...@@ -112,7 +112,7 @@ public: ...@@ -112,7 +112,7 @@ public:
return this; return this;
} }
/// Return the property manager serialized as a string. /// Return the property manager serialized as a string.
virtual std::string toString(bool withDefaultValues) const = 0; virtual std::string toString(bool withDefaultValues = false) const = 0;
protected: protected:
......
...@@ -87,7 +87,7 @@ public: ...@@ -87,7 +87,7 @@ public:
/// Get the value of a property /// Get the value of a property
TypedValue getProperty(const std::string &name) const; TypedValue getProperty(const std::string &name) const;
/// Return the property manager serialized as a string. /// Return the property manager serialized as a string.
virtual std::string toString(bool includeDefaults = false) const; virtual std::string toString(bool withDefaultValues = false) const;
protected: protected:
using IPropertyManager::declareProperty; using IPropertyManager::declareProperty;
......
...@@ -81,7 +81,7 @@ public: ...@@ -81,7 +81,7 @@ public:
/// Get the value of a property /// Get the value of a property
TypedValue getProperty(const std::string &name) const; TypedValue getProperty(const std::string &name) const;
/// Return the property manager serialized as a string. /// Return the property manager serialized as a string.
virtual std::string toString(bool withDefaultValues) const; virtual std::string toString(bool withDefaultValues = false) const;
/// Removes the property from management /// Removes the property from management
void removeProperty(const std::string &name); void removeProperty(const std::string &name);
......
...@@ -146,7 +146,7 @@ using namespace boost::python; ...@@ -146,7 +146,7 @@ using namespace boost::python;
.def("_setWorkspaceProperty", &_setMatrixWorkspaceProperty) .def("_setWorkspaceProperty", &_setMatrixWorkspaceProperty)
.def("_getWorkspaceProperty", &_getMatrixWorkspaceProperty) .def("_getWorkspaceProperty", &_getMatrixWorkspaceProperty)
// Special methods // Special methods
.def("__str__", &IAlgorithm::toString) .def("__str__", (std::string (IAlgorithm::*)() const)&IAlgorithm::toString)
; ;
class_< API::Algorithm, bases<API::IAlgorithm>, boost::noncopyable>("IAlgorithm", no_init) class_< API::Algorithm, bases<API::IAlgorithm>, boost::noncopyable>("IAlgorithm", no_init)
; ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment