Scorum
comment_statistic.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace scorum {
7 namespace chain {
8 
9 template <class T> struct comment_statistic_base_service_i : public base_service_i<T>
10 {
12 
13  virtual const T& get(const comment_id_type& comment_id) const = 0;
14 };
15 
16 template <class service_interface> class dbs_comment_statistic_base : public dbs_service_base<service_interface>
17 {
18  friend class dbservice_dbs_factory;
19 
20  using comment_statisticobject_type = typename service_interface::object_type;
21 
23 
24 protected:
26  : base_service_type(db)
27  {
28  }
29 
30 public:
32 
33  const comment_statisticobject_type& get(const comment_id_type& comment_id) const override
34  {
35  try
36  {
37  return base_service_type::template get_by<by_comment_id>(comment_id);
38  }
39  FC_CAPTURE_AND_RETHROW((comment_id))
40  }
41 };
42 
43 struct comment_statistic_scr_service_i : public comment_statistic_base_service_i<comment_statistic_scr_object>
44 {
45 };
46 
48 
49 struct comment_statistic_sp_service_i : public comment_statistic_base_service_i<comment_statistic_sp_object>
50 {
51 };
52 
54 
55 } // namespace chain
56 } // namespace scorum
tracks the blockchain state in an extensible manner
Definition: database.hpp:52
const comment_statisticobject_type & get(const comment_id_type &comment_id) const override
Definition: asset.cpp:15
virtual const T & get(const comment_id_type &comment_id) const =0