Player12
An open source football management simulator
Loading...
Searching...
No Matches
NavEntry Struct Reference

A screen of the career as the recipe to open it again (which section, player, club or fixture), never the screen object itself. More...

#include <nav_history.h>

Public Types

enum class  Kind : uint8_t {
  SECTION , PLAYER , CLUB , MATCH_REPORT ,
  COMPARE
}
 

Public Member Functions

bool isDetail () const
 True for screens opened on top of another one (a profile, a report, a comparison of chosen players) rather than from the sidebar.
 
bool operator== (const NavEntry &other) const =default
 

Static Public Member Functions

static NavEntry ofSection (NavSection section)
 
static NavEntry ofPlayer (PlayerID player)
 
static NavEntry ofClub (TeamID team)
 
static NavEntry ofMatchReport (GameDateValue date, TeamID home, TeamID away)
 
static NavEntry ofCompare (PlayerID first, PlayerID second)
 

Public Attributes

Kind kind = Kind::SECTION
 
NavSection section = NavSection::HOME
 
PlayerID player = 0
 
PlayerID second_player = 0
 
TeamID team = 0
 
TeamID away_team = 0
 
GameDateValue date {}
 

Detailed Description

A screen of the career as the recipe to open it again (which section, player, club or fixture), never the screen object itself.

Member Enumeration Documentation

◆ Kind

enum class NavEntry::Kind : uint8_t
strong
Enumerator
SECTION 

A sidebar screen.

PLAYER 

A player's profile.

CLUB 

Another club's squad list.

MATCH_REPORT 

The report of a played fixture.

COMPARE 

The comparison, with the players it opened with.

Member Function Documentation

◆ isDetail()

bool NavEntry::isDetail ( ) const

True for screens opened on top of another one (a profile, a report, a comparison of chosen players) rather than from the sidebar.

◆ ofClub()

NavEntry NavEntry::ofClub ( TeamID  team)
static

◆ ofCompare()

NavEntry NavEntry::ofCompare ( PlayerID  first,
PlayerID  second 
)
static

◆ ofMatchReport()

NavEntry NavEntry::ofMatchReport ( GameDateValue  date,
TeamID  home,
TeamID  away 
)
static

◆ ofPlayer()

NavEntry NavEntry::ofPlayer ( PlayerID  player)
static

◆ ofSection()

NavEntry NavEntry::ofSection ( NavSection  section)
static

◆ operator==()

bool NavEntry::operator== ( const NavEntry &  other) const
default

Member Data Documentation

◆ away_team

TeamID NavEntry::away_team = 0

MATCH_REPORT: the away side.

◆ date

GameDateValue NavEntry::date {}

MATCH_REPORT: the day it was played.

◆ kind

Kind NavEntry::kind = Kind::SECTION

◆ player

PlayerID NavEntry::player = 0

PLAYER, or the first compared player.

◆ second_player

PlayerID NavEntry::second_player = 0

COMPARE: the second compared player.

◆ section

NavSection NavEntry::section = NavSection::HOME

SECTION only.

◆ team

TeamID NavEntry::team = 0

CLUB, or the home side of a report.


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