Scorum
libraries
chain
include
scorum
chain
services
comment_statistic.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
scorum/chain/services/service_base.hpp
>
4
#include <
scorum/chain/schema/comment_objects.hpp
>
5
6
namespace
scorum
{
7
namespace
chain {
8
9
template
<
class
T>
struct
comment_statistic_base_service_i
:
public
base_service_i
<T>
10
{
11
using
base_service_i<T>::get
;
12
13
virtual
const
T&
get
(
const
comment_id_type
& comment_id)
const
= 0;
14
};
15
16
template
<
class
service_
int
erface>
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
22
using
base_service_type
=
dbs_service_base<service_interface>
;
23
24
protected
:
25
explicit
dbs_comment_statistic_base
(
database
& db)
26
:
base_service_type
(db)
27
{
28
}
29
30
public
:
31
using
base_service_i<comment_statisticobject_type>::get
;
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
47
using
dbs_comment_statistic_scr
=
dbs_comment_statistic_base<comment_statistic_scr_service_i>
;
48
49
struct
comment_statistic_sp_service_i
:
public
comment_statistic_base_service_i
<comment_statistic_sp_object>
50
{
51
};
52
53
using
dbs_comment_statistic_sp
=
dbs_comment_statistic_base<comment_statistic_sp_service_i>
;
54
55
}
// namespace chain
56
}
// namespace scorum
chainbase::oid
Definition:
betting_resolver.hpp:7
scorum::chain::database
tracks the blockchain state in an extensible manner
Definition:
database.hpp:52
scorum::chain::dbs_comment_statistic_base
Definition:
comment_statistic.hpp:17
scorum::chain::dbs_comment_statistic_base::get
const comment_statisticobject_type & get(const comment_id_type &comment_id) const override
Definition:
comment_statistic.hpp:33
scorum::chain::dbs_comment_statistic_base::dbs_comment_statistic_base
dbs_comment_statistic_base(database &db)
Definition:
comment_statistic.hpp:25
scorum::chain::dbs_service_base
Definition:
service_base.hpp:42
scorum::chain::dbservice_dbs_factory
Definition:
dbservice_dbs_factory.hpp:18
comment_objects.hpp
scorum::chain::object_type
object_type
Definition:
scorum_object_types.hpp:37
scorum
Definition:
asset.cpp:15
service_base.hpp
scorum::chain::base_service_i
Definition:
service_base.hpp:14
scorum::chain::comment_statistic_base_service_i
Definition:
comment_statistic.hpp:10
scorum::chain::comment_statistic_base_service_i::get
virtual const T & get(const comment_id_type &comment_id) const =0
scorum::chain::comment_statistic_scr_service_i
Definition:
comment_statistic.hpp:44
scorum::chain::comment_statistic_sp_service_i
Definition:
comment_statistic.hpp:50
Generated on Thu Jun 9 2022 13:04:25 for Scorum by
1.9.1