

Returns the items stored in the OrderedDict. const std :: vector & items ( ) const noexcept ¶ Removes the item that has key from this OrderedDict if exists and if it doesn’t an exception is thrown. If any key from other is already present in this OrderedDict, an exception is thrown.
Popkey ordereddict update#
void update ( const OrderedDict & other ) ¶ Inserts all items from other into this OrderedDict. If insertion is successful, immediately returns a reference to the inserted value. Throws an exception if the key is already present. Value & insert ( Key key, Value & & value ) ¶ Inserts a new (key, value) pair into the OrderedDict. Value & insert ( K & & key, V & & value ) ¶ Resizes internal storage to fit at least requested_capacity items without requiring reallocation. void reserve ( size_t requested_capacity ) ¶ Returns true if the OrderedDict contains no elements. Returns the number of items currently stored in the OrderedDict. Returns an iterator one past the last item in the OrderedDict. Returns an iterator to the first item in the OrderedDict. Returns true if the key is present in the OrderedDict. bool contains ( const Key & key ) const noexcept ¶ Returns a pointer to the value associated with the given key, or a nullptr if no such key is stored in the OrderedDict. const Value * find ( const Key & key ) const noexcept ¶ Value * find ( const Key & key ) noexcept ¶ Use find() for a non-throwing way of accessing a value if it is present. Throws an exception if no such key is stored in the OrderedDict.

const Value & operator ( const Key & key ) const ¶ Returns the value associated with the given key. Throws an exception if the index is out of bounds. const Item & operator ( size_t index ) const ¶ Returns the item at the index-th position in the OrderedDict. Returns the very last item in the OrderedDict and throws an exception if it is empty. Returns the very first item in the OrderedDict and throws an exception if it is empty. Returns the key description string the OrderedDict was constructed with.

const std :: string & key_description ( ) const noexcept ¶ OrderedDict ( std :: initializer_list initializer_list ) ¶Ĭonstructs a new OrderedDict and pre-populates it with the given Items. OrderedDict & operator = ( OrderedDict & & other ) = default ¶ OrderedDict ( OrderedDict & & other ) = default ¶ OrderedDict & operator = ( const OrderedDict & other ) ¶Īssigns items from other to this OrderedDict. OrderedDict ( const OrderedDict & other ) ¶Ĭopy constructs this OrderedDict from other. This description is used in error messages thrown by the OrderedDict. Public Functions explicit OrderedDict ( std :: string key_description = "Key" ) ¶Ĭonstructs the OrderedDict with a short description of the kinds of keys stored in the OrderedDict.
