HoverRace  2.0
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
HoverRace::Player::ProfileGallery Class Reference

The collection of player profiles on this system. More...

#include <ProfileGallery.h>

Public Types

using const_iterator = profiles_t::const_iterator
 
using iterator = profiles_t::iterator
 
using value_type = profiles_t::value_type
 

Public Member Functions

 ProfileGallery (std::shared_ptr< AvatarGallery > avatarGallery, const Util::OS::path_t &path={})
 Constructor. More...
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
std::shared_ptr< ProfileFindName (const std::string &name) const
 Find a profile by name. More...
 
std::shared_ptr< ProfileFindUid (const std::string &uid) const
 Find a profile by UID. More...
 
std::shared_ptr< ProfileFindUid (const boost::uuids::uuid &uid) const
 Find a profile by UID. More...
 
bool IsEmpty () const
 
void Reload ()
 Reload all profiles. More...
 

Private Types

using profiles_t = std::vector< std::shared_ptr< Profile >>
 

Private Attributes

std::shared_ptr< AvatarGalleryavatarGallery
 
Util::OS::path_t path
 
profiles_t profiles
 

Detailed Description

The collection of player profiles on this system.

Author
Michael Imamura

Member Typedef Documentation

using HoverRace::Player::ProfileGallery::const_iterator = profiles_t::const_iterator
using HoverRace::Player::ProfileGallery::iterator = profiles_t::iterator
using HoverRace::Player::ProfileGallery::profiles_t = std::vector<std::shared_ptr<Profile>>
private
using HoverRace::Player::ProfileGallery::value_type = profiles_t::value_type

Constructor & Destructor Documentation

HoverRace::Player::ProfileGallery::ProfileGallery ( std::shared_ptr< AvatarGallery avatarGallery,
const Util::OS::path_t path = {} 
)

Constructor.

Parameters
avatarGalleryThe avatar gallery.
pathThe base profile directory (may be empty to use default).
Exceptions
ProfileExnThe full list of profiles could not be loaded.

Member Function Documentation

const_iterator HoverRace::Player::ProfileGallery::begin ( ) const
inline
iterator HoverRace::Player::ProfileGallery::begin ( )
inline
const_iterator HoverRace::Player::ProfileGallery::end ( ) const
inline
iterator HoverRace::Player::ProfileGallery::end ( )
inline
std::shared_ptr< Profile > HoverRace::Player::ProfileGallery::FindName ( const std::string &  name) const

Find a profile by name.

Parameters
nameThe name.
Returns
The profile or nullptr if the profile does not exist.
std::shared_ptr< Profile > HoverRace::Player::ProfileGallery::FindUid ( const std::string &  uid) const

Find a profile by UID.

Parameters
uidThe UID as a string (may be empty).
Returns
The profile or nullptr if the profile does not exist.
std::shared_ptr< Profile > HoverRace::Player::ProfileGallery::FindUid ( const boost::uuids::uuid &  uid) const

Find a profile by UID.

Parameters
uidThe UID.
Returns
The profile or nullptr if the profile does not exist.
bool HoverRace::Player::ProfileGallery::IsEmpty ( ) const
inline
void HoverRace::Player::ProfileGallery::Reload ( )

Reload all profiles.

Exceptions
ProfileExnThe full list of profiles could not be loaded.

Member Data Documentation

std::shared_ptr<AvatarGallery> HoverRace::Player::ProfileGallery::avatarGallery
private
Util::OS::path_t HoverRace::Player::ProfileGallery::path
private
profiles_t HoverRace::Player::ProfileGallery::profiles
private

The documentation for this class was generated from the following files: