7 class mutable_variant_object;
34 const string&
key()
const;
41 return a._key == b._key &&
a._value == b._value;
52 typedef std::vector< entry >::const_iterator
iterator;
97 std::shared_ptr< std::vector< entry > > _key_value;
154 void erase(
const string& key );
187 set(std::move(key),
variant( fc::forward<T>(var) ) );
193 set(std::move(key),
variant( fc::forward<T>(var) ) );
194 return std::move(*
this);
226 set( std::move(key),
variant(forward<T>(val)) );
237 std::unique_ptr< std::vector< entry > > _key_value;
An order-preserving dictionary of variants.
std::vector< entry >::iterator iterator
mutable_variant_object(string key, T &&val)
mutable_variant_object & operator=(mutable_variant_object &&)
variant_object::entry entry
a key/value pair
mutable_variant_object & operator()(string key, T &&var) &
mutable_variant_object & operator()(string key, variant var) &
const variant & operator[](const string &key) const
mutable_variant_object operator()(string key, T &&var) &&
void erase(const string &key)
iterator find(const string &key) const
std::vector< entry >::const_iterator const_iterator
mutable_variant_object(T &&v)
const string & key() const
friend bool operator!=(const entry &a, const entry &b)
friend bool operator==(const entry &a, const entry &b)
const variant & value() const
entry & operator=(const entry &)
An order-preserving dictionary of variants.
const variant & operator[](const string &key) const
size_t estimated_size() const
std::vector< entry >::const_iterator iterator
variant_object(string key, T &&val)
variant_object & operator=(variant_object &&)
iterator find(const string &key) const
bool contains(const char *key) const
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
variant_object & get_object()
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define T(meth, val, expected)