Classes
Type | Name |
---|---|
struct | eosio::reflector |
Defines
Type | Name |
---|---|
define | EOSLIB_REFLECT_VISIT_BASE eosio |
define | EOSLIB_REFLECT_VISIT2_BASE |
define | EOSLIB_REFLECT_VISIT_MEMBER |
define | EOSLIB_REFLECT_VISIT2_MEMBER |
define | EOSLIB_REFLECT_BASE_MEMBER_COUNT |
define | EOSLIB_REFLECT_MEMBER_COUNT |
define | EOSLIB_REFLECT_DERIVED_IMPL_INLINE |
define | EOSLIB_REFLECT_DERIVED_IMPL_EXT |
define | EOSLIB_REFLECT Specializes eosio::reflector for TYPE. |
define | EOSLIB_REFLECT_TEMPLATE Perform class template reflection. |
define | EOSLIB_REFLECT_EMPTY Perform class reflection on empty class. |
define | EOSLIB_REFLECT_FWD Perform forward declaration of class reflection. |
define | EOSLIB_REFLECT_DERIVED_IMPL |
define | EOSLIB_REFLECT_IMPL |
define | EOSLIB_REFLECT_DERIVED Specializes eosio::reflector for TYPE where type inherits other reflected classes. |
define | EOSLIB_REFLECT_DERIVED_TEMPLATE Perform class template reflection where TYPE inherits other reflected classes. |
Defines Documentation
define EOSLIB_REFLECT_VISIT_BASE
#define EOSLIB_REFLECT_VISIT_BASE(r, visitor, base) eosio::reflector<base>::visit( visitor );
eosio
define EOSLIB_REFLECT_VISIT2_BASE
#define EOSLIB_REFLECT_VISIT2_BASE(r, visitor, base) eosio::reflector<base>::visit( t, forward<Visitor>(visitor) );
define EOSLIB_REFLECT_VISIT_MEMBER
#define EOSLIB_REFLECT_VISIT_MEMBER(r, visitor, elem)\
{ typedef decltype((static_cast<type*>(nullptr))->elem) member_type; \
visitor( &type::elem ); \
}
define EOSLIB_REFLECT_VISIT2_MEMBER
#define EOSLIB_REFLECT_VISIT2_MEMBER(r, visitor, elem)\
{ typedef decltype((static_cast<type*>(nullptr))->elem) member_type; \
visitor( t.elem ); \
}
define EOSLIB_REFLECT_BASE_MEMBER_COUNT
#define EOSLIB_REFLECT_BASE_MEMBER_COUNT(r, OP, elem) OP eosio::reflector<elem>::total_member_count
define EOSLIB_REFLECT_MEMBER_COUNT
#define EOSLIB_REFLECT_MEMBER_COUNT(r, OP, elem) OP 1
define EOSLIB_REFLECT_DERIVED_IMPL_INLINE
#define EOSLIB_REFLECT_DERIVED_IMPL_INLINE(TYPE, INHERITS, MEMBERS)\
template<typename Visitor>\
static inline void visit( Visitor&& v ) { \
BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT_BASE, v, INHERITS ) \
BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT_MEMBER, v, MEMBERS ) \
} \
template<typename Visitor>\
static inline void visit( const type& t, Visitor&& v ) { \
BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT2_BASE, v, INHERITS ) \
BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT2_MEMBER, v, MEMBERS ) \
} \
template<typename Visitor>\
static inline void visit( type& t, Visitor&& v ) { \
BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT2_BASE, v, INHERITS ) \
BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT2_MEMBER, v, MEMBERS ) \
}
define EOSLIB_REFLECT_DERIVED_IMPL_EXT
#define EOSLIB_REFLECT_DERIVED_IMPL_EXT(TYPE, INHERITS, MEMBERS)\
template<typename Visitor>\
void eosio::reflector<TYPE>::visit( Visitor&& v ) { \
BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT_BASE, v, INHERITS ) \
BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT_MEMBER, v, MEMBERS ) \
}
define EOSLIB_REFLECT
#define EOSLIB_REFLECT(TYPE, MEMBERS) EOSLIB_REFLECT_DERIVED( TYPE, BOOST_PP_SEQ_NIL, MEMBERS )
Specializes eosio::reflector for TYPE.
Perform class reflection
Parameters:
- TYPE - the class template to be reflected
- MEMBERS - a sequence of member names. (field1)(field2)(field3)
See also: EOSLIB_REFLECT_DERIVED
define EOSLIB_REFLECT_TEMPLATE
#define EOSLIB_REFLECT_TEMPLATE(TEMPLATE_ARGS, TYPE, MEMBERS) EOSLIB_REFLECT_DERIVED_TEMPLATE( TEMPLATE_ARGS, TYPE, BOOST_PP_SEQ_NIL, MEMBERS )
Perform class template reflection.
Perform class template reflection
Parameters:
- TEMPLATE_ARGS - a sequence of template args. (args1)(args2)(args3)
- TYPE - the class template to be reflected
- MEMBERS - a sequence of member names. (field1)(field2)(field3)
define EOSLIB_REFLECT_EMPTY
#define EOSLIB_REFLECT_EMPTY(TYPE) EOSLIB_REFLECT_DERIVED( TYPE, BOOST_PP_SEQ_NIL, BOOST_PP_SEQ_NIL )
Perform class reflection on empty class.
Perform class reflection on empty class
Parameters:
- TYPE - the class to be reflected
define EOSLIB_REFLECT_FWD
#define EOSLIB_REFLECT_FWD(TYPE)\
namespace eosio { \
template<> struct reflector<TYPE> {\
typedef TYPE type; \
typedef eosio::true_type is_reflected; \
enum member_count_enum { \
local_member_count = BOOST_PP_SEQ_SIZE(MEMBERS), \
total_member_count = local_member_count BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_BASE_MEMBER_COUNT, +, INHERITS )\
}; \
template<typename Visitor> static void visit( Visitor&& v ); \
template<typename Visitor> static void visit( const type& t, Visitor&& v ); \
template<typename Visitor> static void visit( type& t, Visitor&& v ); \
}; }
Perform forward declaration of class reflection.
Perform forward declaration of class reflection
Parameters:
- TYPE - the class to be reflected
define EOSLIB_REFLECT_DERIVED_IMPL
#define EOSLIB_REFLECT_DERIVED_IMPL(TYPE, MEMBERS) EOSLIB_REFLECT_IMPL_DERIVED_EXT( TYPE, BOOST_PP_SEQ_NIL, MEMBERS )
define EOSLIB_REFLECT_IMPL
#define EOSLIB_REFLECT_IMPL(TYPE, MEMBERS) EOSLIB_REFLECT_DERIVED_IMPL_EXT( TYPE, BOOST_PP_SEQ_NIL, MEMBERS )
define EOSLIB_REFLECT_DERIVED
#define EOSLIB_REFLECT_DERIVED(TYPE, INHERITS, MEMBERS)\
namespace eosio { \
template<> struct reflector<TYPE> {\
typedef TYPE type; \
typedef eosio::true_type is_reflected; \
typedef eosio::false_type is_enum; \
enum member_count_enum { \
local_member_count = 0 BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_MEMBER_COUNT, +, MEMBERS ),\
total_member_count = local_member_count BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_BASE_MEMBER_COUNT, +, INHERITS )\
}; \
EOSLIB_REFLECT_DERIVED_IMPL_INLINE( TYPE, INHERITS, MEMBERS ) \
}; }
Specializes eosio::reflector for TYPE where type inherits other reflected classes.
Perform class reflection where TYPE inherits other reflected classes
Parameters:
- TYPE - the class to be reflected
- INHERITS - a sequence of base class names (basea)(baseb)(basec)
- MEMBERS - a sequence of member names. (field1)(field2)(field3)
define EOSLIB_REFLECT_DERIVED_TEMPLATE
#define EOSLIB_REFLECT_DERIVED_TEMPLATE(TEMPLATE_ARGS, TYPE, INHERITS, MEMBERS)\
namespace eosio { \
template<BOOST_PP_SEQ_ENUM(TEMPLATE_ARGS)> struct reflector<TYPE> {\
typedef TYPE type; \
typedef eosio::true_type is_defined; \
typedef eosio::false_type is_enum; \
enum member_count_enum { \
local_member_count = 0 BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_MEMBER_COUNT, +, MEMBERS ),\
total_member_count = local_member_count BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_BASE_MEMBER_COUNT, +, INHERITS )\
}; \
EOSLIB_REFLECT_DERIVED_IMPL_INLINE( TYPE, INHERITS, MEMBERS ) \
}; }
Perform class template reflection where TYPE inherits other reflected classes.
Perform class template reflection where TYPE inherits other reflected classes
Parameters:
- TEMPLATE_ARGS - a sequence of template args. (args1)(args2)(args3)
- TYPE - the class to be reflected
- INHERITS - a sequence of base class names (basea)(baseb)(basec)
- MEMBERS - a sequence of member names. (field1)(field2)(field3)
The documentation for this class was generated from the following file: libraries/eosiolib/reflect.hpp