63 lines
1.4 KiB
C++
63 lines
1.4 KiB
C++
#include "attribute.h"
|
|
|
|
namespace domain {
|
|
|
|
Enumeration::Enumeration(std::string name, Value value)
|
|
: name(name), value(value) {}
|
|
|
|
std::string &Enumeration::getName() {
|
|
return name;
|
|
}
|
|
|
|
Value Enumeration::getValue() {
|
|
return value;
|
|
}
|
|
|
|
|
|
Popup::Popup(std::string title, std::string text, PopupType type, std::vector<Rule> rules,
|
|
std::vector<Enumeration> enumeration)
|
|
: title(title), text(text), type(type), rules(rules), enumerated(enumeration.size() > 0),
|
|
enumeration(enumeration) {}
|
|
|
|
std::string Popup::getTitle() {
|
|
return title;
|
|
}
|
|
|
|
std::string Popup::getText() {
|
|
return text;
|
|
}
|
|
|
|
Popup::PopupType Popup::getType() {
|
|
return type;
|
|
}
|
|
|
|
std::vector<Rule> Popup::getRules() {
|
|
return rules;
|
|
}
|
|
|
|
bool Popup::isEnumerated() {
|
|
return enumerated;
|
|
}
|
|
|
|
std::vector<Enumeration> &Popup::getEnumeration() {
|
|
return enumeration;
|
|
}
|
|
|
|
|
|
Attribute::Attribute(std::string name, Value defaultValue, std::optional<Popup> popup)
|
|
: name(name), defaultValue(defaultValue), popup(popup) {}
|
|
|
|
std::string Attribute::getName() {
|
|
return name;
|
|
}
|
|
|
|
Value Attribute::getDefault() {
|
|
return defaultValue;
|
|
}
|
|
|
|
std::optional<Popup> Attribute::getPopup() {
|
|
return popup;
|
|
}
|
|
|
|
} // namespace domain
|