Skip to content
Snippets Groups Projects
Commit 888702f9 authored by Samuel Jones's avatar Samuel Jones
Browse files

Re #23280 Initial Commit

parent bed0955f
No related branches found
No related tags found
No related merge requests found
......@@ -89,6 +89,7 @@ public:
const std::string &getComment() const;
const std::string &getName() const override;
bool isDirty(const int n = 1) const;
virtual bool isGroup() const { return false; }
/// Get the footprint in memory in bytes.
virtual size_t getMemorySize() const = 0;
/// Returns the memory footprint in sensible units
......
......@@ -82,6 +82,7 @@ public:
void removeItem(const size_t index);
/// Remove all names from the group but do not touch the ADS
void removeAll();
bool isGroup() const override { return true; }
/// This method returns true if the group is empty (no member workspace)
bool isEmpty() const;
bool areNamesSimilar() const;
......
......@@ -2036,6 +2036,11 @@ public:
ws->hasOrientedLattice(), false);
}
void test_isGroup() {
boost::shared_ptr<MatrixWorkspace> ws(makeWorkspaceWithDetectors(3, 1));
TS_ASSERT_EQUALS(ws->isGroup(), false);
}
private:
WorkspaceTester m_workspace;
WorkspaceTester m_workspaceSans;
......
......@@ -347,6 +347,11 @@ public:
TS_ASSERT(group->isMultiperiod());
}
void test_isGroup() {
WorkspaceGroup_sptr group = makeGroup();
TS_ASSERT_EQUALS(group->isGroup(), true);
}
void test_isInGroup() {
WorkspaceGroup_sptr group = makeGroup();
auto ws1 = group->getItem(1);
......
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