|
HoverRace
2.0
|
A profile that is stored on the local filesystem. More...
#include <LocalProfile.h>
Inheritance diagram for HoverRace::Player::LocalProfile:Public Member Functions | |
| LocalProfile ()=delete | |
| LocalProfile (std::shared_ptr< AvatarGallery > avatarGallery) | |
| Constructor for a new local profile. More... | |
| LocalProfile (std::shared_ptr< AvatarGallery > avatarGallery, const boost::uuids::uuid &uid) | |
| Load a profile from the local filesystem. More... | |
| virtual | ~LocalProfile () |
| EditableProfile * | Edit () override |
| Retrieve an editable view of this profile. More... | |
| RenamableProfile * | EditName () override |
| Retrieve an renamable view of this profile. More... | |
| std::shared_ptr< Display::Res< Display::Texture > > | GetAvatar () const override |
| Retrieve the user's avatar, if available. More... | |
| bool | isLoaded () const |
Public Member Functions inherited from HoverRace::Player::Profile | |
| Profile (std::shared_ptr< AvatarGallery > avatarGallery={}) | |
| Profile (std::shared_ptr< AvatarGallery > avatarGallery, const boost::uuids::uuid &uid) | |
| Profile (std::shared_ptr< AvatarGallery > avatarGallery, const boost::uuids::uuid &uid, const std::string &name, const std::string &avatarName, Display::Color primaryColor, Display::Color secondaryColor) | |
| virtual | ~Profile () |
| const std::string & | GetAvatarName () const |
| Display::Color | GetColor (size_t i) const |
| Retrieve the color by index. More... | |
| const std::string & | GetName () const |
| Retrieve the name of the player. More... | |
| Display::Color | GetPrimaryColor () const |
| Display::Color | GetSecondaryColor () const |
| const boost::uuids::uuid & | GetUid () const |
| Retrieve the globally unique identifier for this profile. More... | |
| const std::string | GetUidStr () const |
| Retrieve the UID as a string. More... | |
| void | SetColor (size_t i, Display::Color color) override |
| Set the color by index. More... | |
Protected Member Functions | |
| void | Save () override |
Protected Member Functions inherited from HoverRace::Player::Profile | |
| AvatarGallery * | GetAvatarGallery () const |
| void | Rename (const std::string &name) override |
| Attempt to rename the profile. More... | |
| void | SetAvatarName (const std::string &avatarName) override |
| virtual void | SetName (const std::string &name) |
| void | SetPrimaryColor (Display::Color color) override |
| void | SetSecondaryColor (Display::Color color) override |
Private Types | |
| using | SUPER = Profile |
Private Member Functions | |
| void | Load (Util::yaml::MapNode *root, const std::string &filename) |
Private Attributes | |
| bool | loaded |
Additional Inherited Members | |
Static Public Attributes inherited from HoverRace::Player::Profile | |
| static const size_t | MAX_AVATAR_NAME_LENGTH = 16 |
| static const size_t | MAX_NAME_LENGTH = 30 |
| Maximum length for the name. More... | |
A profile that is stored on the local filesystem.
|
private |
|
delete |
| HoverRace::Player::LocalProfile::LocalProfile | ( | std::shared_ptr< AvatarGallery > | avatarGallery | ) |
Constructor for a new local profile.
The new profile will be assigned a new unique UID.
| avatarGallery | The source for built-in avatars (may be nullptr). |
| HoverRace::Player::LocalProfile::LocalProfile | ( | std::shared_ptr< AvatarGallery > | avatarGallery, |
| const boost::uuids::uuid & | uid | ||
| ) |
Load a profile from the local filesystem.
| avatarGallery | The source for built-in avatars (may be nullptr). |
| uid | The player UID. |
| ProfileExn | The profile could not be loaded. |
|
inlinevirtual |
|
inlineoverridevirtual |
Retrieve an editable view of this profile.
nullptr if this profile cannot be edited. Reimplemented from HoverRace::Player::Profile.
|
inlineoverridevirtual |
Retrieve an renamable view of this profile.
nullptr if this profile cannot change the name. Reimplemented from HoverRace::Player::Profile.
|
overridevirtual |
Retrieve the user's avatar, if available.
nullptr). Reimplemented from HoverRace::Player::Profile.
|
inline |
|
private |
|
overrideprotectedvirtual |
Implements HoverRace::Player::Profile.
|
private |
1.8.11