Scorum
libraries
chain
include
scorum
chain
evaluators
vote_evaluator.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
scorum/protocol/scorum_operations.hpp
>
4
#include <
scorum/chain/evaluators/evaluator.hpp
>
5
6
namespace
scorum
{
7
namespace
chain {
8
9
struct
data_service_factory_i;
10
struct
account_service_i;
11
struct
comment_service_i;
12
struct
dynamic_global_property_service_i;
13
struct
comment_vote_service_i;
14
struct
hardfork_property_service_i;
15
16
class
vote_evaluator
:
public
evaluator_impl
<data_service_factory_i, vote_evaluator>
17
{
18
public
:
19
using
operation_type
=
scorum::protocol::vote_operation
;
20
21
vote_evaluator
(data_service_factory_i& services);
22
23
void
do_apply
(
const
operation_type
& op);
24
25
protocol::vote_weight_type
get_weigth
(
const
operation_type
& o)
const
;
26
27
private
:
28
account_service_i
& _account_service;
29
comment_service_i
& _comment_service;
30
comment_vote_service_i
& _comment_vote_service;
31
dynamic_global_property_service_i
& _dgp_service;
32
hardfork_property_service_i
& _hardfork_service;
33
};
34
35
}
// namespace chain
36
}
// namespace scorum
scorum::chain::evaluator_impl
Definition:
evaluator.hpp:20
scorum::chain::vote_evaluator
Definition:
vote_evaluator.hpp:17
scorum::chain::vote_evaluator::vote_evaluator
vote_evaluator(data_service_factory_i &services)
Definition:
vote_evaluator.cpp:18
scorum::chain::vote_evaluator::do_apply
void do_apply(const operation_type &op)
Definition:
vote_evaluator.cpp:42
scorum::chain::vote_evaluator::get_weigth
protocol::vote_weight_type get_weigth(const operation_type &o) const
Definition:
vote_evaluator.cpp:28
evaluator.hpp
scorum::protocol::vote_weight_type
int16_t vote_weight_type
Definition:
types.hpp:70
scorum
Definition:
asset.cpp:15
scorum_operations.hpp
scorum::chain::account_service_i
Definition:
account.hpp:28
scorum::chain::comment_service_i
Definition:
comment.hpp:10
scorum::chain::comment_vote_service_i
Definition:
comment_vote.hpp:10
scorum::chain::dynamic_global_property_service_i
Definition:
dynamic_global_property.hpp:9
scorum::chain::hardfork_property_service_i
Definition:
hardfork_property.hpp:10
scorum::protocol::vote_operation
Votes for content.
Definition:
scorum_operations.hpp:228
Generated on Thu Jun 9 2022 13:04:25 for Scorum by
1.9.1