Scorum
witness_vote.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace scorum {
7 namespace chain {
8 
9 struct witness_vote_service_i : public base_service_i<witness_vote_object>
10 {
13 
14  virtual bool is_exists(witness_id_type witness_id, account_id_type voter_id) const = 0;
15  virtual const witness_vote_object& get(witness_id_type witness_id, account_id_type voter_id) = 0;
16 };
17 
18 class dbs_witness_vote : public dbs_service_base<witness_vote_service_i>
19 {
20  friend class dbservice_dbs_factory;
21 
22 protected:
23  explicit dbs_witness_vote(database& db);
24 
25 public:
28 
29  virtual bool is_exists(witness_id_type witness_id, account_id_type voter_id) const override;
30  virtual const witness_vote_object& get(witness_id_type witness_id, account_id_type voter_id) override;
31 };
32 
33 } // namespace chain
34 } // namespace scorum
tracks the blockchain state in an extensible manner
Definition: database.hpp:52
virtual const object_type & get() const override
Definition: asset.cpp:15
virtual const witness_vote_object & get(witness_id_type witness_id, account_id_type voter_id)=0
virtual bool is_exists(witness_id_type witness_id, account_id_type voter_id) const =0