Player12
An open source football management simulator
Loading...
Searching...
No Matches
career_timeline.h File Reference
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <vector>
#include "global/types.h"
#include "model/awards.h"
#include "model/gamedate.h"
#include "model/manager_career.h"
#include "model/records.h"
#include "model/season_history.h"
#include "model/transfer_market.h"

Go to the source code of this file.

Classes

struct  TimelineEntry
 One dated entry of the career timeline. More...
 
struct  TimelineSources
 The saved career facts the timeline is built from. More...
 

Namespaces

namespace  CareerTimeline
 The manager's career across every club: spells, trophies, honours, promotions and relegations, season finishes, club records and key signings, oldest first. Pure and deterministic (identical after a reload); also exported as a Markdown journal.
 

Enumerations

enum class  TimelineKind : std::uint8_t {
  Appointed = 0 , Departed , Trophy , Award ,
  Promotion , Relegation , Season , Record ,
  Signing , COUNT
}
 What happened at a point of the manager's career. More...
 

Functions

const char * timelineKindKey (TimelineKind kind)
 
std::vector< TimelineEntry > CareerTimeline::build (const TimelineSources &sources)
 
TimelineSources CareerTimeline::sourcesFor (const Game &game, const GameData &gamedata, std::vector< RecordEntry > &records)
 
std::string CareerTimeline::toMarkdown (const TimelineSources &sources, std::span< const TimelineEntry > entries, const GameDateValue &today)
 
std::string CareerTimeline::journalFileName (std::string_view manager_name, const GameDateValue &today)
 
std::optional< std::filesystem::path > CareerTimeline::writeJournal (const std::string &markdown, const std::filesystem::path &folder, const std::string &file_name)
 

Variables

constexpr std::size_t CareerTimeline::KEY_SIGNINGS_PER_STINT = 3
 

Enumeration Type Documentation

◆ TimelineKind

enum class TimelineKind : std::uint8_t
strong

What happened at a point of the manager's career.

Enumerator
Appointed 

Took charge of a club.

Departed 

Sacked, resigned, moved on or out of contract.

Trophy 

League title or cup won.

Award 

Manager of the Month / Season.

Promotion 
Relegation 
Season 

League finish against the board's expectation.

Record 

A club record set on his watch.

Signing 

One of the biggest signings of a spell.

COUNT 

Function Documentation

◆ timelineKindKey()

const char * timelineKindKey ( TimelineKind  kind)

Language key naming kind (e.g. "TIMELINE_KIND_TROPHY").