Player12
An open source football management simulator
Loading...
Searching...
No Matches
finances.h File Reference
#include <array>
#include <cstddef>
#include <cstdint>
#include <span>
#include <utility>
#include <vector>
#include "model/gamedate.h"

Go to the source code of this file.

Classes

struct  FinanceTransaction
 One dated ledger entry; positive amounts are income. More...
 
struct  FinanceSummary
 Per-category totals of a ledger range. More...
 
class  Finances
 A club's balance, budgets and dated transaction ledger. More...
 

Enumerations

enum class  FinanceCategory : std::uint8_t {
  OpeningBalance = 0 , Investment , Wages , TransferFeeIn ,
  TransferFeeOut , Matchday , Broadcasting , Sponsorship ,
  PrizeMoney , Facilities , Staff , Adjustment ,
  COUNT
}
 Ledger categories (values are persisted). More...
 

Functions

const char * financeCategoryKey (FinanceCategory category)
 

Variables

constexpr std::size_t FINANCE_CATEGORY_COUNT
 

Enumeration Type Documentation

◆ FinanceCategory

enum class FinanceCategory : std::uint8_t
strong

Ledger categories (values are persisted).

Enumerator
OpeningBalance 
Investment 

Owner funds injected into the club.

Wages 

Weekly player payroll.

TransferFeeIn 

Fees received for sold players.

TransferFeeOut 
Matchday 

Gate receipts of home matches.

Broadcasting 

Monthly equal share of TV money.

Sponsorship 

Monthly commercial income.

PrizeMoney 

Continental and international prize money.

Facilities 

Stadium, training ground and operations.

Staff 

Non-player wages.

Adjustment 

Reconciliation of legacy saves.

COUNT 

Function Documentation

◆ financeCategoryKey()

const char * financeCategoryKey ( FinanceCategory  category)

Language key naming category (e.g. "FIN_CAT_WAGES").

Variable Documentation

◆ FINANCE_CATEGORY_COUNT

constexpr std::size_t FINANCE_CATEGORY_COUNT
inlineconstexpr
Initial value:
=
static_cast<std::size_t>(std::to_underlying(FinanceCategory::COUNT))

Number of ledger categories.