Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
api.hpp File Reference
#include <fc/thread/future.hpp>
#include <fc/any.hpp>
#include <functional>
#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>
Include dependency graph for api.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fc::identity_member
 
struct  fc::vtable< Interface, Transform >
 
struct  fc::vtable_copy_visitor< OtherType >
 
class  fc::api_base
 
class  fc::api< Interface, Transform >
 

Namespaces

namespace  fc
 namespace sysio::chain
 

Macros

#define FC_CALL_MEMBER_TEMPLATE_KEYWORD   template
 
#define FC_API_VTABLE_DEFINE_MEMBER(r, data, elem)
 
#define FC_API_VTABLE_DEFINE_VISIT_OTHER(r, data, elem)
 
#define FC_API_VTABLE_DEFINE_VISIT(r, data, elem)
 
#define FC_API(CLASS, METHODS)
 

Typedefs

typedef uint32_t fc::api_id_type
 
typedef std::shared_ptr< api_basefc::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 ) \
} \
}; \
}
#define FC_API_VTABLE_DEFINE_VISIT(r, data, elem)
Definition api.hpp:116
#define FC_API_VTABLE_DEFINE_MEMBER(r, data, elem)
Definition api.hpp:111
#define FC_API_VTABLE_DEFINE_VISIT_OTHER(r, data, elem)
Definition api.hpp:113
namespace sysio::chain
Definition authority.cpp:3

Definition at line 119 of file api.hpp.

119#define FC_API( CLASS, METHODS ) \
120namespace fc { \
121 template<typename Transform> \
122 struct vtable<CLASS,Transform> : public std::enable_shared_from_this<vtable<CLASS,Transform>> { \
123 BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_MEMBER, CLASS, METHODS ) \
124 template<typename Visitor> \
125 void visit_other( Visitor&& v ){ \
126 BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_VISIT_OTHER, CLASS, METHODS ) \
127 } \
128 template<typename Visitor> \
129 void visit( Visitor&& v ){ \
130 BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_VISIT, CLASS, METHODS ) \
131 } \
132 }; \
133}

◆ FC_API_VTABLE_DEFINE_MEMBER

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

Definition at line 111 of file api.hpp.

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

◆ FC_API_VTABLE_DEFINE_VISIT

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

Definition at line 116 of file api.hpp.

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

◆ 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 113 of file api.hpp.

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

◆ FC_CALL_MEMBER_TEMPLATE_KEYWORD

#define FC_CALL_MEMBER_TEMPLATE_KEYWORD   template

Definition at line 12 of file api.hpp.