Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::impl::abi_from_variant_visitor< T, Resolver > Class Template Reference

#include <abi_serializer.hpp>

Inheritance diagram for sysio::chain::impl::abi_from_variant_visitor< T, Resolver >:
Collaboration diagram for sysio::chain::impl::abi_from_variant_visitor< T, Resolver >:

Public Member Functions

 abi_from_variant_visitor (const variant_object &_vo, T &v, Resolver _resolver, abi_traverse_context &_ctx)
 
template<typename Member , class Class , Member Class::* member>
void operator() (const char *name) const
 
- Public Member Functions inherited from fc::reflector_init_visitor< T >
 reflector_init_visitor (T &c)
 
void reflector_init () const
 
void reflector_init ()
 

Additional Inherited Members

- Protected Attributes inherited from fc::reflector_init_visitor< T >
Tobj
 

Detailed Description

template<typename T, typename Resolver>
class sysio::chain::impl::abi_from_variant_visitor< T, Resolver >

Reflection visitor that uses a resolver to resolve ABIs for nested types this will degrade to the common fc::from_variant as soon as the type no longer contains ABI related info

Template Parameters
Reslover- callable with the signature (const name& code_account) -> std::optional<abi_def>

Definition at line 854 of file abi_serializer.hpp.

Constructor & Destructor Documentation

◆ abi_from_variant_visitor()

template<typename T , typename Resolver >
sysio::chain::impl::abi_from_variant_visitor< T, Resolver >::abi_from_variant_visitor ( const variant_object & _vo,
T & v,
Resolver _resolver,
abi_traverse_context & _ctx )
inline

Definition at line 857 of file abi_serializer.hpp.

858 : reflector_init_visitor<T>(v)
859 ,_vo(_vo)
860 ,_resolver(_resolver)
861 ,_ctx(_ctx)
862 {}

Member Function Documentation

◆ operator()()

template<typename T , typename Resolver >
template<typename Member , class Class , Member Class::* member>
void sysio::chain::impl::abi_from_variant_visitor< T, Resolver >::operator() ( const char * name) const
inline

Visit a single member and extract it from the variant object

Template Parameters
Member- the member to visit
Class- the class we are traversing
member- pointer to the member
Parameters
name- the name of the member

Definition at line 872 of file abi_serializer.hpp.

873 {
874 auto itr = _vo.find(name);
875 if( itr != _vo.end() )
876 abi_from_variant::extract( itr->value(), this->obj.*member, _resolver, _ctx );
877 }
std::string name
iterator end() const
iterator find(const string &key) const
static void extract(const fc::variant &v, M &o, Resolver, abi_traverse_context &ctx)
Here is the call graph for this function:

The documentation for this class was generated from the following file: