7#define __XTD_CORE_INTERNAL__
9#undef __XTD_CORE_INTERNAL__
46 template<
typename key_t,
typename value_t>
47 class idictionary :
public xtd::collections::generic::icollection<xtd::collections::generic::key_value_pair<key_t, value_t>> {
57 using value_type =
typename xtd::collections::generic::icollection<xtd::collections::generic::key_value_pair<key_t, value_t>>
::value_type;
59 using iterator =
typename xtd::collections::generic::icollection<value_type>::iterator;
61 using const_iterator =
typename xtd::collections::generic::icollection<value_type>::const_iterator;
79 [[nodiscard]] virtual auto
is_read_only() const noexcept ->
bool = 0;
123 [[nodiscard]] virtual auto
sync_root() const noexcept -> const
xtd::
object& = 0;
146 virtual auto
add(const key_t& key, const value_t& value) ->
void = 0;
163 [[nodiscard]] virtual auto
contains_key(const key_t& key) const noexcept ->
bool = 0;
187 virtual auto
remove(const key_t& key) noexcept ->
bool = 0;
195 [[nodiscard]] virtual auto
try_get_value(const key_t& key, value_t& value) const ->
bool = 0;
209 [[nodiscard]] virtual auto operator [](const key_t& key) const -> const value_t& = 0;
218 [[nodiscard]] virtual auto operator [](const key_t& key) -> value_t& = 0;
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Represents a generic collection of key/value pairs.
Definition idictionary.hpp:47
xtd::collections::generic::list< mapped_type > value_collection
Represents the idictionary value collection type.
Definition idictionary.hpp:65
virtual auto contains(const xtd::collections::generic::key_value_pair< xtd::any_object, xtd::any_object > &item) const noexcept -> bool=0
virtual auto try_get_value(const xtd::any_object &key, xtd::any_object &value) const -> bool=0
virtual auto add(const xtd::collections::generic::key_value_pair< xtd::any_object, xtd::any_object > &item) -> void=0
xtd::collections::generic::list< key_type > key_collection
Represents the idictionary key collection type.
Definition idictionary.hpp:63
virtual auto keys() const noexcept -> key_collection=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:61
virtual auto clear() -> void=0
virtual auto sync_root() const noexcept -> const xtd::object &=0
virtual auto count() const noexcept -> xtd::usize=0
Gets the number of elements contained in the xtd::collections::generic::icollection <type_t>.
virtual auto remove(const xtd::collections::generic::key_value_pair< xtd::any_object, xtd::any_object > &item) -> bool=0
key_t key_type
Represents the dictionary key type.
Definition idictionary.hpp:53
virtual auto get_enumerator() const -> xtd::collections::generic::enumerator< xtd::collections::generic::key_value_pair< xtd::any_object, xtd::any_object > >=0
typename xtd::collections::generic::icollection< value_type >::iterator iterator
Represents the iterator of xtd::collections::generic::ienumerable value type.
Definition idictionary.hpp:59
virtual auto is_read_only() const noexcept -> bool=0
value_t mapped_type
Represents the dictionary mapped type.
Definition idictionary.hpp:55
virtual auto copy_to(xtd::array< xtd::collections::generic::key_value_pair< xtd::any_object, xtd::any_object > > &array, xtd::usize array_index) const -> void=0
virtual auto is_synchronized() const noexcept -> bool=0
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:57
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.
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
Contains xtd::collections::generic::key_value_pair <key_t, value_t> struct.
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
Supports a simple iteration over a generic collection.
Definition enumerator.hpp:39
Defines a key/value pair that can be set or retrieved.
Definition key_value_pair.hpp:37