Player12
An open source football management simulator
Loading...
Searching...
No Matches
player_view.h File Reference
#include <array>
#include <cstdint>
#include <string>
#include <string_view>
#include <vector>
#include "global/stats_config.h"
#include "global/types.h"

Go to the source code of this file.

Classes

struct  PlayerView::PlayerRow
 One table row. More...
 
struct  PlayerView::RoleFit
 Suitability of a player for one broad position group. More...
 
struct  PlayerView::AttributeGroup
 Stats shown together on the profile. More...
 

Namespaces

namespace  PlayerView
 Cached, display-ready player data for tables and profiles.
 

Enumerations

enum class  PlayerView::PositionGroup : uint8_t { PlayerView::GOALKEEPER , PlayerView::DEFENDER , PlayerView::MIDFIELDER , PlayerView::FORWARD }
 Broad positional group used for filters and colouring. More...
 

Functions

PlayerRow PlayerView::makeRow (const GameController &controller, const Player &player)
 Builds a display row for a player.
 
PositionGroup PlayerView::groupOf (PlayerRole role)
 Broad group of a role.
 
const char * PlayerView::groupKey (PositionGroup group)
 Localisation key for a position group (short label).
 
std::vector< RoleFit > PlayerView::roleFits (const Player &player, const StatsConfig &config)
 Rates the player in every broad position group with the same role-focus weights used for the overall rating, best first.
 
std::string PlayerView::statLabel (std::string_view statName)
 Localised name of a player attribute (falls back to the raw name).
 
std::string PlayerView::toLower (std::string_view text)
 Lower-cases ASCII text for case-insensitive search.
 

Variables

constexpr std::array< AttributeGroup, 3 > PlayerView::ATTRIBUTE_GROUPS
 Attribute grouping for the profile screen.