CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
iread_only_dictionary.h
1
2#pragma once
3
4#include <system/collections/keyvalue_pair.h>
5#include <system/collections/iread_only_collection.h>
6
7namespace System {
8namespace Collections {
9namespace Generic {
10
17template<typename TKey, typename TValue>
18class ASPOSECPP_SHARED_CLASS IReadOnlyDictionary : public IReadOnlyCollection<KeyValuePair<TKey, TValue>>
19{
23 using BaseTypesInfo = System::BaseTypesInfo<IReadOnlyCollection<KeyValuePair<TKey, TValue>>>;
25 RTTI_INFO_TEMPLATE_CLASS(ThisType, BaseTypesInfo);
26
27public:
31 virtual bool ContainsKey(const TKey& key) const = 0;
36 virtual bool TryGetValue(const TKey& key, TValue& value) const = 0;
37
41 virtual TValue idx_get(const TKey& key) const = 0;
42};
43
44} // namespace Generic
45} // namespace Collections
46} // namespace System
Interface of read-only collection of elements. Objects of this class should only be allocated using S...
Definition: iread_only_collection.h:19
Interface for read-only dictionary-alike containers. Objects of this class should only be allocated u...
Definition: iread_only_dictionary.h:19
virtual bool ContainsKey(const TKey &key) const =0
Checks if container contains key.
virtual bool TryGetValue(const TKey &key, TValue &value) const =0
Looks for value and retreives it if found.
virtual TValue idx_get(const TKey &key) const =0
Getter function.
Definition: db_command.h:9