Added default diagram generation error for empty diagrams (#246)

This commit is contained in:
Bartek Kryza
2024-03-04 19:55:55 +01:00
parent cb44c3ded4
commit baef768f6c
27 changed files with 315 additions and 10 deletions

View File

@@ -164,6 +164,13 @@ public:
*/
virtual inja::json context() const = 0;
/**
* @brief Check whether the diagram is empty
*
* @return True, if diagram is empty
*/
virtual bool is_empty() const = 0;
private:
std::string name_;
std::unique_ptr<diagram_filter> filter_;

View File

@@ -69,6 +69,13 @@ public:
return {};
}
/**
* @brief Check whether the element view is empty
*
* @return True, if the view does not contain any elements
*/
bool is_empty() const { return elements_.empty(); }
private:
reference_vector<T> elements_;
};