Scorum
Namespaces | Macros
data_service_factory_def.hpp File Reference
#include <boost/preprocessor/seq/for_each.hpp>

Go to the source code of this file.

Namespaces

 scorum
 
 scorum::chain
 
 scorum::chain::dba
 

Macros

#define DECLARE_SERVICE_FUNCT_NAME(service)   BOOST_PP_CAT(service, _service)
 
#define DECLARE_SERVICE_INTERFACE_NAME(service)   BOOST_PP_CAT(DECLARE_SERVICE_FUNCT_NAME(service), _i)
 
#define DECLARE_DBS_IMPL_NAME(service)   BOOST_PP_CAT(dbs_, service)
 
#define DECLARE_SERVICE_INTERFACE(_1, _2, service)
 
#define DECLARE_FACTORY_INTERFACE_METHOD(_1, _2, service)
 
#define DECLARE_FACTORY_METHOD(_1, _2, service)
 
#define DATA_SERVICE_FACTORY_DECLARE(SERVICES)
 
#define DECLARE_FACTORY_METHOD_IMPL(_1, _2, service)
 
#define DATA_SERVICE_FACTORY_IMPL(SERVICES)
 

Macro Definition Documentation

◆ DATA_SERVICE_FACTORY_DECLARE

#define DATA_SERVICE_FACTORY_DECLARE (   SERVICES)

Definition at line 33 of file data_service_factory_def.hpp.

◆ DATA_SERVICE_FACTORY_IMPL

#define DATA_SERVICE_FACTORY_IMPL (   SERVICES)
Value:
namespace scorum { \
namespace chain { \
data_service_factory::data_service_factory(scorum::chain::database& db) \
: factory(db) \
, dba_factory(db) \
{ \
} \
\
data_service_factory::~data_service_factory() \
{ \
} \
BOOST_PP_SEQ_FOR_EACH(DECLARE_FACTORY_METHOD_IMPL, _, SERVICES) \
account_service_i& data_service_factory::account_service() const \
{ \
return factory.obtain_service_explicit<dbs_account>(dynamic_global_property_service(), witness_service()); \
} \
witness_service_i& data_service_factory::witness_service() const \
{ \
return factory.obtain_service_explicit<dbs_witness>(witness_schedule_service(), \
dynamic_global_property_service(), \
dba_factory.get_dba<chain_property_object>()); \
} \
} \
}
tracks the blockchain state in an extensible manner
Definition: database.hpp:52
#define DECLARE_FACTORY_METHOD_IMPL(_1, _2, service)
Definition: asset.cpp:15

Definition at line 73 of file data_service_factory_def.hpp.

◆ DECLARE_DBS_IMPL_NAME

#define DECLARE_DBS_IMPL_NAME (   service)    BOOST_PP_CAT(dbs_, service)

Definition at line 17 of file data_service_factory_def.hpp.

◆ DECLARE_FACTORY_INTERFACE_METHOD

#define DECLARE_FACTORY_INTERFACE_METHOD (   _1,
  _2,
  service 
)
Value:
virtual DECLARE_SERVICE_INTERFACE_NAME(service) \
& BOOST_PP_CAT(DECLARE_SERVICE_FUNCT_NAME(service), BOOST_PP_EMPTY())() const \
= 0;
#define DECLARE_SERVICE_FUNCT_NAME(service)
#define DECLARE_SERVICE_INTERFACE_NAME(service)

Definition at line 24 of file data_service_factory_def.hpp.

◆ DECLARE_FACTORY_METHOD

#define DECLARE_FACTORY_METHOD (   _1,
  _2,
  service 
)
Value:
virtual DECLARE_SERVICE_INTERFACE_NAME(service) \
& BOOST_PP_CAT(DECLARE_SERVICE_FUNCT_NAME(service), BOOST_PP_EMPTY())() const;

Definition at line 29 of file data_service_factory_def.hpp.

◆ DECLARE_FACTORY_METHOD_IMPL

#define DECLARE_FACTORY_METHOD_IMPL (   _1,
  _2,
  service 
)
Value:
&data_service_factory::BOOST_PP_CAT(DECLARE_SERVICE_FUNCT_NAME(service), BOOST_PP_EMPTY())() const \
{ \
return factory.obtain_service<DECLARE_DBS_IMPL_NAME(service)>(); \
}
#define DECLARE_DBS_IMPL_NAME(service)

Definition at line 66 of file data_service_factory_def.hpp.

◆ DECLARE_SERVICE_FUNCT_NAME

#define DECLARE_SERVICE_FUNCT_NAME (   service)    BOOST_PP_CAT(service, _service)

Definition at line 13 of file data_service_factory_def.hpp.

◆ DECLARE_SERVICE_INTERFACE

#define DECLARE_SERVICE_INTERFACE (   _1,
  _2,
  service 
)
Value:
struct DECLARE_SERVICE_INTERFACE_NAME(service); \
struct account_service_i; \
struct witness_service_i;

Definition at line 19 of file data_service_factory_def.hpp.

◆ DECLARE_SERVICE_INTERFACE_NAME

#define DECLARE_SERVICE_INTERFACE_NAME (   service)    BOOST_PP_CAT(DECLARE_SERVICE_FUNCT_NAME(service), _i)

Definition at line 15 of file data_service_factory_def.hpp.