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; return _type;
} }
auto Profile::isDemo() const -> bool {
return _type == ProfileType::Demo;
}
auto Profile::version() const -> ProfileVersion { auto Profile::version() const -> ProfileVersion {
return _version; return _version;
} }
auto Profile::isLegacy() const -> bool {
return _version == ProfileVersion::Legacy;
}
auto Profile::account() const -> Containers::StringView { auto Profile::account() const -> Containers::StringView {
return _account; return _account;
} }

View file

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