Scorum
libraries
protocol
include
scorum
protocol
betting
market_comparison.hpp
Go to the documentation of this file.
1
#include <scorum/utils/static_variant_comparison.hpp>
2
3
namespace
scorum
{
4
namespace
protocol {
5
6
template
<market_kind kind,
typename
tag>
7
bool
operator<
(
const
over_under_market<kind, tag>
& lhs,
const
over_under_market<kind, tag>
& rhs)
8
{
9
return
lhs.
threshold
< rhs.
threshold
;
10
}
11
12
template
<market_kind kind,
typename
tag>
13
bool
operator<
(
const
yes_no_market<kind, tag>
& lhs,
const
yes_no_market<kind, tag>
& rhs)
14
{
15
return
false
;
16
}
17
18
template
<market_kind kind,
typename
tag>
19
bool
operator<
(
const
score_yes_no_market<kind, tag>
& lhs,
const
score_yes_no_market<kind, tag>
& rhs)
20
{
21
return
std::tie(lhs.
home
, lhs.
away
) < std::tie(rhs.
home
, rhs.
away
);
22
}
23
}
24
}
25
26
namespace
fc
{
27
using
scorum::protocol::market_type
;
28
29
template
<>
inline
bool
market_type::less_than(
const
market_type
& that)
const
30
{
31
return
scorum::utils::variant_less(*
this
, that);
32
}
33
34
template
<>
inline
bool
market_type::equal_to(
const
market_type
& that)
const
35
{
36
return
scorum::utils::variant_eq(*
this
, that);
37
}
38
}
fc
Definition:
game.cpp:4
scorum::protocol::operator<
bool operator<(const over_under_market< kind, tag > &lhs, const over_under_market< kind, tag > &rhs)
Definition:
market_comparison.hpp:7
scorum::protocol::market_type
fc::static_variant< result_home, result_draw, result_away, round_home, handicap, correct_score_home, correct_score_draw, correct_score_away, correct_score, goal_home, goal_both, goal_away, total, total_goals_home, total_goals_away > market_type
Definition:
market.hpp:97
scorum
Definition:
asset.cpp:15
scorum::protocol::over_under_market
Definition:
market.hpp:13
scorum::protocol::over_under_market::threshold
int16_t threshold
Definition:
market.hpp:14
scorum::protocol::score_yes_no_market
Definition:
market.hpp:28
scorum::protocol::score_yes_no_market::away
uint16_t away
Definition:
market.hpp:30
scorum::protocol::score_yes_no_market::home
uint16_t home
Definition:
market.hpp:29
scorum::protocol::yes_no_market
Definition:
market.hpp:44
Generated on Thu Jun 9 2022 13:04:26 for Scorum by
1.9.1