Commit 6229c8c7 authored by Timo Koch's avatar Timo Koch
Browse files

[gridmanager] Add interface to query for existence of grid data

parent c7192d51
...@@ -118,6 +118,10 @@ public: ...@@ -118,6 +118,10 @@ public:
} }
} }
/*!
* \brief Get an owning pointer to grid data associated with the grid
* \note Throws if no grid data is available
*/
std::shared_ptr<GridData> getGridData() const std::shared_ptr<GridData> getGridData() const
{ {
if (!gridData_) if (!gridData_)
...@@ -125,7 +129,12 @@ public: ...@@ -125,7 +129,12 @@ public:
return gridData_; return gridData_;
} }
/*!
* \brief Check whether there is data associated with the grid
*/
bool hasGridData() const
{ return static_cast<bool>(gridData_); }
protected: protected:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment