stmm-games-doc  0.32.0
Public Member Functions | List of all members
stmg::AppPreferences::PrefTeam Class Referenceabstract
Inheritance diagram for stmg::AppPreferences::PrefTeam:
Inheritance graph
[legend]

Public Member Functions

virtual ~PrefTeam () noexcept=default
 
virtual const std::string & getName () const noexcept=0
 The team's name. More...
 
virtual bool isAI () const noexcept=0
 Whether the team is AI. More...
 
virtual int32_t getTotMates () const noexcept=0
 The number of mates in the team. More...
 
virtual const shared_ptr< PrefPlayergetMate (int32_t nMate) const noexcept=0
 Get a mate of the team. More...
 
virtual Variant getOptionValue (const std::string &sOptionName) const noexcept=0
 Returns value of a team specific option. More...
 
virtual int32_t get () const noexcept=0
 The team number within the game. More...
 

Constructor & Destructor Documentation

◆ ~PrefTeam()

virtual stmg::AppPreferences::PrefTeam::~PrefTeam ( )
virtualdefaultnoexcept

Member Function Documentation

◆ get()

virtual int32_t stmg::AppPreferences::PrefTeam::get ( ) const
pure virtualnoexcept

The team number within the game.

Returns
The team number. Is >= 0 and < AppPreferences::getTotTeams().

Implemented in stmg::StdPreferences::Team.

◆ getMate()

virtual const shared_ptr<PrefPlayer> stmg::AppPreferences::PrefTeam::getMate ( int32_t  nMate) const
pure virtualnoexcept

Get a mate of the team.

Parameters
nMateThe mate number. Must be >=0 and < getTotMates().
Returns
The player. Is not null.

Implemented in stmg::StdPreferences::Team.

◆ getName()

virtual const std::string& stmg::AppPreferences::PrefTeam::getName ( ) const
pure virtualnoexcept

The team's name.

The name is unique among all teams.

Returns
The name. Is not empty.

Implemented in stmg::StdPreferences::Team.

◆ getOptionValue()

virtual Variant stmg::AppPreferences::PrefTeam::getOptionValue ( const std::string &  sOptionName) const
pure virtualnoexcept

Returns value of a team specific option.

Parameters
sOptionNameThe option name.
Returns
The value. Null if option name not defined.

Implemented in stmg::StdPreferences::Team.

◆ getTotMates()

virtual int32_t stmg::AppPreferences::PrefTeam::getTotMates ( ) const
pure virtualnoexcept

The number of mates in the team.

Returns
The number of players that belong to the team.

Implemented in stmg::StdPreferences::Team.

◆ isAI()

virtual bool stmg::AppPreferences::PrefTeam::isAI ( ) const
pure virtualnoexcept

Whether the team is AI.

The team is AI if all its mates are AI.

Returns
Whether AI.

Implemented in stmg::StdPreferences::Team.