Added default diagram generation error for empty diagrams (#246)
This commit is contained in:
@@ -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_;
|
||||
|
||||
@@ -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_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user