示例#1
0
 static inline void from_variant( const fc::variant& v, T& o, uint32_t max_depth = 1 )
 { 
     if( v.is_string() )
        o = fc::reflector<T>::from_string( v.get_string().c_str() );
     else
        o = fc::reflector<T>::from_int( v.as_int64() );
 }
示例#2
0
文件: variant.hpp 项目: BitMoneta/fc
 static inline void from_variant( const fc::variant& v, T& o ) 
 { 
     if( v.is_string() )
        o = fc::reflector<T>::from_string( v.get_string().c_str() );
     else 
        o = static_cast<T>(v.as_int64());
 }
示例#3
0
文件: asset.hpp 项目: milk57618/eos
inline void from_variant(const fc::variant& var, eosio::chain::asset& vo) {
   vo = eosio::chain::asset::from_string(var.get_string());
}
示例#4
0
文件: name.cpp 项目: 108518/eos
 void from_variant(const fc::variant& v, eosio::chain::name& check) { check = v.get_string(); }