43 template<
class key_t,
class value_t>
44 class idictionary :
public xtd::collections::generic::icollection<xtd::collections::generic::key_value_pair<key_t, value_t>> {
54 using value_type =
typename xtd::collections::generic::icollection<xtd::collections::generic::key_value_pair<key_t, value_t>>
::value_type;
56 using iterator =
typename xtd::collections::generic::icollection<value_type>::iterator;
58 using const_iterator =
typename xtd::collections::generic::icollection<value_type>::const_iterator;
90 virtual auto
add(const key_t& key, const value_t& value) ->
void = 0;
96 virtual auto
contains_key(const key_t& key) const noexcept ->
bool = 0;
103 virtual auto
remove(const key_t& key) noexcept ->
bool = 0;
111 virtual auto
try_get_value(const key_t& key, value_t& value) const ->
bool = 0;
125 virtual auto operator [](const key_t& key) const -> const value_t& = 0;
134 virtual auto operator [](const key_t& key) -> value_t& = 0;
Represents a generic collection of key/value pairs.
Definition idictionary.hpp:44
xtd::collections::generic::list< mapped_type > value_collection
Represents the idictionary value collection type.
Definition idictionary.hpp:62
virtual auto try_get_value(const xtd::any_object &key, xtd::any_object &value) const -> bool=0
xtd::collections::generic::list< key_type > key_collection
Represents the idictionary key collection type.
Definition idictionary.hpp:60
virtual auto keys() const noexcept -> key_collection=0
Gets an xtd::collections::generic::icollection <type_t> containing the keys of the xtd::collections::...
virtual auto remove(const xtd::any_object &key) noexcept -> bool=0
typename xtd::collections::generic::icollection< value_type >::const_iterator const_iterator
Represents the const iterator of xtd::collections::generic::ienumerable value type.
Definition idictionary.hpp:58
key_t key_type
Represents the dictionary key type.
Definition idictionary.hpp:50
typename xtd::collections::generic::icollection< value_type >::iterator iterator
Represents the iterator of xtd::collections::generic::ienumerable value type.
Definition idictionary.hpp:56
virtual auto add(const xtd::any_object &key, const xtd::any_object &value) -> void=0
value_t mapped_type
Represents the dictionary mapped type.
Definition idictionary.hpp:52
typename xtd::collections::generic::icollection< xtd::collections::generic::key_value_pair< key_t, value_t > >::value_type value_type
Represents the xtd::collections::generic::idictionary value type.
Definition idictionary.hpp:54
virtual auto contains_key(const xtd::any_object &key) const noexcept -> bool=0
virtual auto values() const noexcept -> value_collection=0
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
Contains xtd::collections::generic::icollection <type_t> interface.
Contains xtd::collections::generic::key_value_pair <key_t, value_t> struct.
Contains xtd::collections::generic::list <type_t> class.
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Defines a key/value pair that can be set or retrieved.
Definition key_value_pair.hpp:37