BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Classes | Namespaces | Macros | Typedefs
api.hpp File Reference
#include <fc/thread/future.hpp>
#include <functional>
#include <boost/any.hpp>
#include <boost/config.hpp>
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/stringize.hpp>

Go to the source code of this file.

Classes

struct  fc::detail::is_optional< T >
 This metafunction determines whether its template argument is an instantiation of fc::optional. More...
 
struct  fc::detail::is_optional< fc::optional< T > >
 
struct  fc::detail::all_optionals< Ts >
 This metafunction determines whether all of its template arguments are instantiations of fc::optional. More...
 
struct  fc::detail::all_optionals<>
 
struct  fc::detail::all_optionals< T, Ts... >
 
struct  fc::detail::all_optionals< fc::optional< T >, Ts... >
 
struct  fc::detail::optionals_callable< R, Parameters >
 
struct  fc::detail::optionals_callable< R, Parameters >::short_pack< CutList >
 
struct  fc::detail::optionals_callable< R, Parameters >::pack_cutter< RemoveCount, Types >
 
struct  fc::detail::optionals_callable< R, Parameters >::pack_cutter_impl< RemoveCount, typename, Types >
 
struct  fc::detail::optionals_callable< R, Parameters >::pack_cutter_impl< 0, void, Types... >
 
struct  fc::detail::optionals_callable< R, Parameters >::pack_cutter_impl< RemoveCount, std::enable_if_t< RemoveCount !=0 >, T, Types... >
 
struct  fc::detail::optionals_callable< R, Parameters >::pack_cutter< RemoveCount, Types >
 
struct  fc::identity_member_with_optionals
 
struct  fc::vtable< Interface, Transform >
 
struct  fc::vtable_copy_visitor< OtherType >
 
class  fc::api< Interface, Transform >
 
class  fc::api_base
 
class  fc::api< Interface, Transform >
 

Namespaces

 fc
 
 fc::detail
 

Macros

#define FC_CALL_MEMBER_TEMPLATE_KEYWORD   template
 
#define FC_API_VTABLE_DEFINE_MEMBER(r, data, elem)   decltype(Transform::functor( (data*)nullptr, &data::elem)) elem;
 
#define FC_API_VTABLE_DEFINE_VISIT_OTHER(r, data, elem)
 
#define FC_API_VTABLE_DEFINE_VISIT(r, data, elem)   v( BOOST_PP_STRINGIZE(elem), elem );
 
#define FC_API(CLASS, METHODS)
 

Typedefs

typedef uint32_t fc::api_id_type
 
typedef std::shared_ptr< api_base > fc::api_ptr
 

Macro Definition Documentation

◆ FC_API

#define FC_API (   CLASS,
  METHODS 
)
Value:
namespace fc { \
template<typename Transform> \
struct vtable<CLASS,Transform> : public std::enable_shared_from_this<vtable<CLASS,Transform>> { \
BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_MEMBER, CLASS, METHODS ) \
template<typename Visitor> \
void visit_other( Visitor&& v ){ \
BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_VISIT_OTHER, CLASS, METHODS ) \
} \
template<typename Visitor> \
void visit( Visitor&& v ){ \
BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_VISIT, CLASS, METHODS ) \
} \
}; \
}

Definition at line 197 of file api.hpp.

◆ FC_API_VTABLE_DEFINE_MEMBER

#define FC_API_VTABLE_DEFINE_MEMBER (   r,
  data,
  elem 
)    decltype(Transform::functor( (data*)nullptr, &data::elem)) elem;

Definition at line 189 of file api.hpp.

◆ FC_API_VTABLE_DEFINE_VISIT

#define FC_API_VTABLE_DEFINE_VISIT (   r,
  data,
  elem 
)    v( BOOST_PP_STRINGIZE(elem), elem );

Definition at line 194 of file api.hpp.

◆ FC_API_VTABLE_DEFINE_VISIT_OTHER

#define FC_API_VTABLE_DEFINE_VISIT_OTHER (   r,
  data,
  elem 
)
Value:
{ typedef typename Visitor::other_type OtherType; \
v( BOOST_PP_STRINGIZE(elem), elem, &OtherType::elem ); }

Definition at line 191 of file api.hpp.

◆ FC_CALL_MEMBER_TEMPLATE_KEYWORD

#define FC_CALL_MEMBER_TEMPLATE_KEYWORD   template

Definition at line 12 of file api.hpp.

FC_API_VTABLE_DEFINE_VISIT
#define FC_API_VTABLE_DEFINE_VISIT(r, data, elem)
Definition: api.hpp:194
fc
Definition: api.hpp:15
FC_API_VTABLE_DEFINE_VISIT_OTHER
#define FC_API_VTABLE_DEFINE_VISIT_OTHER(r, data, elem)
Definition: api.hpp:191
FC_API_VTABLE_DEFINE_MEMBER
#define FC_API_VTABLE_DEFINE_MEMBER(r, data, elem)
Definition: api.hpp:189