14#include <boost/python/class.hpp>
15#include <boost/python/copy_const_reference.hpp>
16#include <boost/python/overloads.hpp>
45 PyErr_Warn(PyExc_DeprecationWarning,
".getName() is deprecated. Use .name() instead.");
46 return self.getName();
50 class_<Workspace, bases<DataItem>, boost::noncopyable>(
"Workspace", no_init)
51 .def(
"getName", &
getName, arg(
"self"),
"Returns the name of the workspace. This could be an empty string")
53 .def(
"isGroup", &
Workspace::isGroup, arg(
"self"),
"Returns if it is a group workspace")
54 .def(
"setTitle", &
Workspace::setTitle, (arg(
"self"), arg(
"title")),
"Set the title of the workspace")
56 "Returns the comment field on the workspace")
58 "Set the comment field of the workspace")
60 Workspace_isDirtyOverloads((arg(
"self"), arg(
"n")),
"True if the workspace has run "
61 "more than n algorithms "
64 "Returns the memory footprint of the workspace in KB")
66 return_value_policy<reference_existing_object>(),
67 "Return read-only access to the "
68 ":class:`~mantid.api.WorkspaceHistory`");
#define GET_POINTER_SPECIALIZATION(TYPE)
std::string getName(const Workspace &self)
DEPRECATED.
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(valueAsPrettyStrOverloader, valueAsPrettyStr, 0, 2) void export_Property()
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
This class stores information about the Workspace History used by algorithms on a workspace and the e...
Base Workspace Abstract Class.
const WorkspaceHistory & getHistory() const
Returns a reference to the WorkspaceHistory const.
virtual void setTitle(const std::string &)
Set the title of the workspace.
const std::string & getComment() const
Get the workspace comment.
virtual size_t getMemorySize() const =0
Get the footprint in memory in bytes.
virtual bool isGroup() const
bool isDirty(const int n=1) const
Check whether other algorithms have been applied to the workspace by checking the history length.
virtual const std::string getTitle() const
Get the workspace title.
void setComment(const std::string &)
Set the comment field of the workspace.
Encapsulates the registration required for an interface type T that sits on top of a Kernel::DataItem...