#ifndef DOMAIN_ATTRIBUTE_H #define DOMAIN_ATTRIBUTE_H #include #include #include "rule.h" #include "value.h" namespace domain { class Enumeration { std::string name; Value value; public: Enumeration(std::string name, Value value); std::string& getName(); Value getValue(); }; class Popup { public: enum PopupType { AUTOMATIC, ON_DEMAND }; private: std::string title; std::string text; PopupType type; bool enumerated; std::vector enumeration; std::vector rules; public: Popup(std::string title, std::string text, PopupType type, std::vector rules, std::vector enumeration); std::string getTitle(); std::string getText(); PopupType getType(); std::vector getRules(); bool isEnumerated(); std::vector &getEnumeration(); void setEnumeration(std::vector enums) { enumerated = true; enumeration = std::move(enums); } }; class Attribute { std::string name; Value defaultValue; std::optional popup; public: Attribute(std::string name, Value defaultValue, std::optional popup = std::nullopt); std::string getName(); Value getDefault(); std::optional getPopup(); }; } // namespace domain #endif // DOMAIN_ATTRIBUTE_H