Player12
An open source football management simulator
Loading...
Searching...
No Matches
match_commentary.h
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------
2
// Football Management Project
3
// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4
//
5
// This file is part of the Football Management Project.
6
// See the LICENSE file in the project root.
7
// -----------------------------------------------------------------------------
8
9
#pragma once
10
11
#include <functional>
12
#include <string>
13
#include <string_view>
14
15
#include "
global/types.h
"
16
#include "
model/match_events.h
"
17
19
struct
MatchCommentaryNames
20
{
22
std::string
homeTeam
;
23
std::string
awayTeam
;
25
std::function<std::string(
PlayerID
)>
player
;
26
};
27
35
namespace
MatchCommentary
36
{
38
const
char
*
key
(
const
MatchEvent
& event);
39
44
std::string
fill
(std::string_view
pattern
,
const
MatchEvent
& event,
45
const
MatchCommentaryNames
& names);
46
48
std::string
describe
(
const
MatchEvent
& event,
49
const
MatchCommentaryNames
& names);
50
}
// namespace MatchCommentary
key
ImGuiKey key
Definition
input_actions.cpp:25
match_events.h
MatchCommentary
Definition
match_commentary.h:36
MatchCommentary::describe
std::string describe(const MatchEvent &event, const MatchCommentaryNames &names)
Definition
match_commentary.cpp:122
MatchCommentary::fill
std::string fill(std::string_view pattern, const MatchEvent &event, const MatchCommentaryNames &names)
Definition
match_commentary.cpp:128
MatchCommentaryNames
Definition
match_commentary.h:20
MatchCommentaryNames::awayTeam
std::string awayTeam
Definition
match_commentary.h:23
MatchCommentaryNames::homeTeam
std::string homeTeam
Definition
match_commentary.h:22
MatchCommentaryNames::player
std::function< std::string(PlayerID)> player
Definition
match_commentary.h:25
MatchEvent
Definition
match_events.h:93
pattern
std::string pattern
Definition
transfer_terms_editor.cpp:75
types.h
PlayerID
uint32_t PlayerID
Type alias for Player identifiers.
Definition
types.h:21
src
model
match_commentary.h
Generated by
1.9.8