Scorum
Public Types | Public Member Functions | List of all members
scorum::chain::vote_evaluator Class Reference

#include <vote_evaluator.hpp>

Inheritance diagram for scorum::chain::vote_evaluator:
scorum::chain::evaluator_impl< data_service_factory_i, vote_evaluator > scorum::chain::evaluator< scorum::protocol::operation >

Public Types

using operation_type = scorum::protocol::vote_operation
 

Public Member Functions

 vote_evaluator (data_service_factory_i &services)
 
void do_apply (const operation_type &op)
 
protocol::vote_weight_type get_weigth (const operation_type &o) const
 
- Public Member Functions inherited from scorum::chain::evaluator_impl< data_service_factory_i, vote_evaluator >
 evaluator_impl (data_service_factory_i &d)
 
virtual void apply (const scorum::protocol::operation &o) final override
 
data_service_factory_i & db () const
 
- Public Member Functions inherited from scorum::chain::evaluator< scorum::protocol::operation >
virtual ~evaluator ()=default
 

Detailed Description

Definition at line 16 of file vote_evaluator.hpp.

Member Typedef Documentation

◆ operation_type

Definition at line 19 of file vote_evaluator.hpp.

Constructor & Destructor Documentation

◆ vote_evaluator()

scorum::chain::vote_evaluator::vote_evaluator ( data_service_factory_i &  services)

Definition at line 18 of file vote_evaluator.cpp.

Member Function Documentation

◆ do_apply()

void scorum::chain::vote_evaluator::do_apply ( const operation_type op)

this is the rshares voting for or against the post

TODO: figure out how to handle remove a vote (rshares == 0 )

Definition at line 42 of file vote_evaluator.cpp.

◆ get_weigth()

vote_weight_type scorum::chain::vote_evaluator::get_weigth ( const operation_type o) const

Definition at line 28 of file vote_evaluator.cpp.


The documentation for this class was generated from the following files: