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

One story of the world news feed. More...

#include <news_feed.h>

Public Member Functions

std::string headline () const
 

Public Attributes

GameDateValue date
 
NewsKind kind = NewsKind::Transfer
 
LeagueID country = 0
 
NewsCompetition competition
 
std::string headline_key
 
std::vector< std::string > args
 
PlayerID player_id = 0
 
TeamID team_id = 0
 
TeamID other_team_id = 0
 
bool has_match = false
 
GameDateValue match_date
 
TeamID home_id = 0
 
TeamID away_id = 0
 
std::uint32_t weight = 0
 

Detailed Description

One story of the world news feed.

Every story is built from saved facts and cites the entities it talks about (a player, one or two clubs, a match). The headline is a language key plus arguments (formatLocalized()), so it follows the UI language.

Member Function Documentation

◆ headline()

std::string NewsItem::headline ( ) const

Headline in the current language.

Member Data Documentation

◆ args

std::vector<std::string> NewsItem::args

◆ away_id

TeamID NewsItem::away_id = 0

◆ competition

NewsCompetition NewsItem::competition

◆ country

LeagueID NewsItem::country = 0

Top league of the country; 0 = continental.

◆ date

GameDateValue NewsItem::date

◆ has_match

bool NewsItem::has_match = false

The story is a result: the report of this fixture.

◆ headline_key

std::string NewsItem::headline_key

◆ home_id

TeamID NewsItem::home_id = 0

◆ kind

NewsKind NewsItem::kind = NewsKind::Transfer

◆ match_date

GameDateValue NewsItem::match_date

◆ other_team_id

TeamID NewsItem::other_team_id = 0

The other club (seller, opponent).

◆ player_id

PlayerID NewsItem::player_id = 0

◆ team_id

TeamID NewsItem::team_id = 0

The club the story is about.

◆ weight

std::uint32_t NewsItem::weight = 0

Bigger stories first within a day.


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