32 #include <boost/container/flat_map.hpp> 36 namespace graphene {
namespace wallet {
40 using boost::container::flat_map;
51 std::string
clean_name(
const std::string& name );
59 template<
typename T >
62 FC_ASSERT( which == m.which_to_name.size(),
"This should not happen" );
64 m.name_to_which[ name ] = which;
65 m.which_to_name.push_back( name );
72 template<
typename StaticVariant >
77 template<
typename Member >
93 template<
typename T >
98 dummy.set_which( which );
100 return dummy.visit( vtor );
107 int n = dummy.count();
108 FC_ASSERT( n <= std::numeric_limits<uint16_t>::max(),
"Too many items in this static_variant" );
110 for(
int i=0; i<n; i++ )
const uint32_t _max_depth
T from_which_variant(int which, const variant &v, uint32_t max_depth)
vector< string > which_to_name
StaticVariant result_type
result_type operator()(const Member &dummy)
std::string clean_name(const std::string &name)
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Defines exception's used by fc.
static_variant_map_visitor()
void from_variant(const variant &var, flat_set< T, A... > &vo, uint32_t _max_depth)
flat_map< string, int > name_to_which
result_type operator()(const T &dummy)
from_which_visitor(const variant &_v, uint32_t max_depth)
static_variant_map create_static_variant_map()