Refactored decorated_element

This commit is contained in:
Bartek Kryza
2021-09-27 00:05:47 +02:00
parent d6b88e68ec
commit e615f3b869
4 changed files with 45 additions and 23 deletions

View File

@@ -63,9 +63,8 @@ private:
std::string style_;
};
struct decorated_element {
std::vector<std::shared_ptr<decorators::decorator>> decorators;
class decorated_element {
public:
bool skip() const;
bool skip_relationship() const;
@@ -73,6 +72,15 @@ struct decorated_element {
std::pair<relationship_t, std::string> relationship() const;
std::string style_spec();
const std::vector<std::shared_ptr<decorators::decorator>> &
decorators() const;
void add_decorators(
const std::vector<std::shared_ptr<decorators::decorator>> &decorators);
private:
std::vector<std::shared_ptr<decorators::decorator>> decorators_;
};
struct class_element : public decorated_element {