Profile: provide shorthand getters.

This commit is contained in:
Guillaume Jacquemin 2022-03-09 13:25:26 +01:00
parent b859bf7ab5
commit 8f4708f518
2 changed files with 10 additions and 0 deletions

View File

@ -83,10 +83,18 @@ auto Profile::type() const -> ProfileType {
return _type;
}
auto Profile::isDemo() const -> bool {
return _type == ProfileType::Demo;
}
auto Profile::version() const -> ProfileVersion {
return _version;
}
auto Profile::isLegacy() const -> bool {
return _version == ProfileVersion::Legacy;
}
auto Profile::account() const -> Containers::StringView {
return _account;
}

View File

@ -49,8 +49,10 @@ class Profile {
auto filename() const -> Containers::StringView;
auto type() const -> ProfileType;
auto isDemo() const -> bool;
auto version() const -> ProfileVersion;
auto isLegacy() const -> bool;
auto account() const -> Containers::StringView;