Scorum
withdraw_scorumpower_route.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace scorum {
7 namespace chain {
8 
9 class account_object;
10 class dev_committee_object;
11 
12 struct withdraw_scorumpower_route_service_i : public base_service_i<withdraw_scorumpower_route_object>
13 {
16 
17  virtual bool is_exists(const account_id_type& from, const account_id_type& to) const = 0;
18 
19  virtual bool is_exists(const account_id_type& from, const dev_committee_id_type& to) const = 0;
20 
21  virtual bool is_exists(const dev_committee_id_type& from, const dev_committee_id_type& to) const = 0;
22 
23  virtual bool is_exists(const dev_committee_id_type& from, const account_id_type& to) const = 0;
24 
26  const account_id_type& to) const = 0;
27 
29  const dev_committee_id_type& to) const = 0;
30 
32  const dev_committee_id_type& to) const = 0;
33 
35  const account_id_type& to) const = 0;
36 
38  = std::vector<std::reference_wrapper<const withdraw_scorumpower_route_object>>;
39 
41 
42  virtual uint16_t total_percent(const account_id_type& from) const = 0;
43 
44  virtual uint16_t total_percent(const dev_committee_id_type& from) const = 0;
45 };
46 
48 
49 class dbs_withdraw_scorumpower_route : public dbs_service_base<withdraw_scorumpower_route_service_i>
50 {
51  friend class dbservice_dbs_factory;
52 
53 protected:
55 
56 public:
59 
61 
62  virtual bool is_exists(const account_id_type& from, const account_id_type& to) const override;
63 
64  virtual bool is_exists(const account_id_type& from, const dev_committee_id_type& to) const override;
65 
66  virtual bool is_exists(const dev_committee_id_type& from, const dev_committee_id_type& to) const override;
67 
68  virtual bool is_exists(const dev_committee_id_type& from, const account_id_type& to) const override;
69 
70  virtual const withdraw_scorumpower_route_object& get(const account_id_type& from,
71  const account_id_type& to) const override;
72 
73  virtual const withdraw_scorumpower_route_object& get(const account_id_type& from,
74  const dev_committee_id_type& to) const override;
75 
77  const dev_committee_id_type& to) const override;
78 
80  const account_id_type& to) const override;
81 
82  virtual withdraw_scorumpower_route_refs_type get_all(const withdrawable_id_type& from) const override;
83 
84  virtual uint16_t total_percent(const account_id_type& from) const override;
85 
86  virtual uint16_t total_percent(const dev_committee_id_type& from) const override;
87 
88 private:
89  std::unique_ptr<dbs_withdraw_scorumpower_route_impl> _impl;
90 };
91 } // namespace chain
92 } // namespace scorum
tracks the blockchain state in an extensible manner
Definition: database.hpp:52
virtual uint16_t total_percent(const account_id_type &from) const override
virtual withdraw_scorumpower_route_refs_type get_all(const withdrawable_id_type &from) const override
fc::static_variant< account_id_type, dev_committee_id_type > withdrawable_id_type
Definition: asset.cpp:15
virtual bool is_exists(const dev_committee_id_type &from, const account_id_type &to) const =0
virtual const withdraw_scorumpower_route_object & get(const account_id_type &from, const account_id_type &to) const =0
virtual bool is_exists(const account_id_type &from, const account_id_type &to) const =0
virtual const withdraw_scorumpower_route_object & get(const account_id_type &from, const dev_committee_id_type &to) const =0
virtual uint16_t total_percent(const account_id_type &from) const =0
virtual const withdraw_scorumpower_route_object & get(const dev_committee_id_type &from, const account_id_type &to) const =0
virtual const withdraw_scorumpower_route_object & get(const dev_committee_id_type &from, const dev_committee_id_type &to) const =0
virtual withdraw_scorumpower_route_refs_type get_all(const withdrawable_id_type &from) const =0
virtual uint16_t total_percent(const dev_committee_id_type &from) const =0
virtual bool is_exists(const account_id_type &from, const dev_committee_id_type &to) const =0
virtual bool is_exists(const dev_committee_id_type &from, const dev_committee_id_type &to) const =0
std::vector< std::reference_wrapper< const withdraw_scorumpower_route_object > > withdraw_scorumpower_route_refs_type