CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
24 namespace catapult {
namespace deltaset {
33 template<
typename TSet>
35 using KeyType =
typename TSet::value_type;
46 template<
typename TMap>
59 template<
typename TSet,
typename TMemorySetType = TSet>
83 template<
typename TIterator>
95 template<
typename TMap,
typename TElementToKeyConverter,
typename TMemoryMapType = TMap>
115 return TElementToKeyConverter::ToKey(value);
120 return std::make_pair(
ToKey(value), value);
124 template<
typename TIterator>
131 return element.second;
136 return element.second;
151 template<
typename TElement>
156 static constexpr TElement
Copy(
const TElement* pElement) {
165 template<
typename TElement>
179 template<
typename T,
bool AllowsNativeValueModification>
195 template<
typename TValue>
typename TSet::value_type StorageType
Definition: BaseSetDefaultTraits.h:37
static constexpr const ValueType & ToValue(const StorageType &element)
Converts a storage type (element) to a value type.
Definition: BaseSetDefaultTraits.h:89
TSet SetType
Definition: BaseSetDefaultTraits.h:61
Base set compatible traits for stl set types.
Definition: BaseSetDefaultTraits.h:60
TMap SetType
Definition: BaseSetDefaultTraits.h:97
TElement ElementType
Definition: BaseSetDefaultTraits.h:153
static const StorageType & ToStorage(const KeyType &key, TIterator &&)
Converts key to a storage type.
Definition: BaseSetDefaultTraits.h:84
typename KeyTraits::ValueType ValueType
Definition: BaseSetDefaultTraits.h:102
typename KeyTraits::KeyType KeyType
Definition: BaseSetDefaultTraits.h:65
static constexpr const StorageType & ToStorage(const ValueType &value)
Converts a value type (value) to a storage type.
Definition: BaseSetDefaultTraits.h:78
Traits used for describing an immutable type.
Definition: BaseSetDefaultTraits.h:166
static constexpr StorageType ToStorage(const ValueType &value)
Converts a value type (value) to a storage type.
Definition: BaseSetDefaultTraits.h:119
static constexpr bool AllowsNativeValueModification
Set values cannot be modified because they are hashed in native container.
Definition: BaseSetDefaultTraits.h:70
typename TMap::mapped_type ValueType
Definition: BaseSetDefaultTraits.h:49
TMemoryMapType MemorySetType
Definition: BaseSetDefaultTraits.h:98
Traits used for describing a mutable type.
Definition: BaseSetDefaultTraits.h:152
static constexpr KeyType ToKey(const ValueType &value)
Converts a value type (value) to a key.
Definition: BaseSetDefaultTraits.h:114
Base set compatible traits for stl map types.
Definition: BaseSetDefaultTraits.h:96
TMemorySetType MemorySetType
Definition: BaseSetDefaultTraits.h:62
static constexpr auto ToResult(TValue &value)
Definition: BaseSetDefaultTraits.h:196
typename TMap::value_type StorageType
Definition: BaseSetDefaultTraits.h:50
Tag that indicates a type is immutable.
Definition: BaseSetDefaultTraits.h:162
typename TSet::value_type KeyType
Definition: BaseSetDefaultTraits.h:35
typename KeyTraits::StorageType StorageType
Definition: BaseSetDefaultTraits.h:67
const T * ResultType
Definition: BaseSetDefaultTraits.h:182
static constexpr const KeyType & ToKey(const StorageType &element)
Converts a storage type (element) to a key.
Definition: BaseSetDefaultTraits.h:109
Traits for customizing the behavior of find depending on element type.
Definition: BaseSetDefaultTraits.h:180
static const StorageType & ToStorage(const KeyType &, TIterator &&iter)
Converts iter to a storage type.
Definition: BaseSetDefaultTraits.h:125
const T * ConstResultType
Definition: BaseSetDefaultTraits.h:191
typename KeyTraits::ValueType ValueType
Definition: BaseSetDefaultTraits.h:66
typename TMap::key_type KeyType
Definition: BaseSetDefaultTraits.h:48
typename KeyTraits::StorageType StorageType
Definition: BaseSetDefaultTraits.h:103
static constexpr ResultType ToResult(const T &value)
Definition: BaseSetDefaultTraits.h:184
Key-related traits for stl set types.
Definition: BaseSetDefaultTraits.h:34
typename KeyTraits::KeyType KeyType
Definition: BaseSetDefaultTraits.h:101
static constexpr bool AllowsNativeValueModification
Map values can be modified because they are not hashed in native container.
Definition: BaseSetDefaultTraits.h:106
static constexpr const ValueType & ToValue(const StorageType &element)
Converts a storage type (element) to a value type.
Definition: BaseSetDefaultTraits.h:130
const T * ConstResultType
Definition: BaseSetDefaultTraits.h:181
static constexpr const KeyType & ToKey(const StorageType &element)
Converts a storage type (element) to a key.
Definition: BaseSetDefaultTraits.h:40
Definition: AddressExtractionExtension.cpp:28
static constexpr ValueType & ToValue(StorageType &element)
Converts a storage type (element) to a value type.
Definition: BaseSetDefaultTraits.h:135
const TElement ElementType
Definition: BaseSetDefaultTraits.h:167
Key-related traits for stl map types.
Definition: BaseSetDefaultTraits.h:47
static constexpr const KeyType & ToKey(const StorageType &element)
Converts a storage type (element) to a key.
Definition: BaseSetDefaultTraits.h:53
static constexpr const KeyType & ToKey(const StorageType &element)
Converts a storage type (element) to a key.
Definition: BaseSetDefaultTraits.h:73
T * ResultType
Definition: BaseSetDefaultTraits.h:192
typename TSet::value_type ValueType
Definition: BaseSetDefaultTraits.h:36
static constexpr TElement Copy(const TElement *pElement)
Definition: BaseSetDefaultTraits.h:156
Tag that indicates a type is mutable.
Definition: BaseSetDefaultTraits.h:148