21 std::ostringstream os;
37 for (
size_t i = 0; i <
n; i++) {
38 std::ostringstream ostr;
39 ostr << name <<
'_' << i;
93 throw std::runtime_error(
"This type of ITableWorkspace (" + this->
id() +
94 ") has not implemented sort() yet customSort() "
95 "returns true. Please contact the developers.");
104IPropertyManager::getValue<API::ITableWorkspace_sptr>(
const std::string &name)
const {
109 std::string message =
110 "Attempt to assign property " + name +
" to incorrect type. Expected shared_ptr<ITableWorkspace>";
111 throw std::runtime_error(message);
117IPropertyManager::getValue<API::ITableWorkspace_const_sptr>(
const std::string &name)
const {
118 auto *prop =
dynamic_cast<PropertyWithValue<API::ITableWorkspace_sptr> *
>(getPointerToProperty(name));
120 return prop->operator()();
122 std::string message =
123 "Attempt to assign property " + name +
" to incorrect type. Expected const shared_ptr<ITableWorkspace>";
124 throw std::runtime_error(message);
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
virtual ITableWorkspace * doCloneColumns(const std::vector< std::string > &colNames) const =0
const std::string id() const override
Return the workspace typeID.
virtual bool addColumns(const std::string &type, const std::string &name, size_t n)
Creates n new columns of the same type.
void modified()
If the workspace is the AnalysisDataService sends AfterReplaceNotification.
ITableWorkspace_uptr cloneColumns(const std::vector< std::string > &colNames) const
Returns a clone of the workspace.
TableRowHelper appendRow()
Appends a row.
virtual void sort(std::vector< std::pair< std::string, bool > > &criteria)
Overridable method to custom-sort the workspace.
virtual size_t insertRow(size_t index)=0
Inserts a row before row pointed to by index and fills it with default vales.
virtual Column_sptr addColumn(const std::string &type, const std::string &name)=0
Creates a new column.
const std::string toString() const override
Serializes the object to a string.
TableRowHelper getRow(size_t row)
Creates a TableRow object for row row.
virtual size_t columnCount() const =0
Number of columns in the workspace.
virtual size_t rowCount() const =0
Number of rows in the workspace.
TableColumnHelper getVector(const std::string &name)
Access the column with name name trough a ColumnVector object.
Helper class used to create ColumnVector.
Helper class used to create ConstColumnVector.
Helper class used to create TableRow.
const std::string & getName() const override
Get the workspace name.
std::string getMemorySizeAsStr() const
Returns the memory footprint in sensible units.
AfterReplaceNotification is sent after an object is replaced in the addOrReplace() function.
The concrete, templated class for properties.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::unique_ptr< ITableWorkspace > ITableWorkspace_uptr
unique pointer to Mantid::API::ITableWorkspace
std::shared_ptr< const ITableWorkspace > ITableWorkspace_const_sptr
shared pointer to Mantid::API::ITableWorkspace (const version)
std::string to_string(const wide_integer< Bits, Signed > &n)