3#include "VaultRequest.h"
9 template <VaultRequestType Type>
13 static_assert(!std::is_array<T>::value,
"It is not possible to use a c array as a key value. \n\
14 If you want to use a string as a key, you must specialize the function with a string. Like this: \n\
15 Less<std::string>(\"Key\", \"Value\") or Greater(\"Key\", std::string(\"Value\")). \n\
16 This works with the following classes: Less, LessOrEqual, Equal, GreaterOrEqual, Greater.");
18 DataPtr =
static_cast<void*
>(
new T(
keyValue));
41 template <VaultRequestType Type>
42 template <VaultRequestType RequestType1, VaultRequestType RequestType2>
48 case VaultRequestType::Or:
66 case VaultRequestType::And:
72 (
request1.RequestType == VaultRequestType::Greater ||
request1.RequestType == VaultRequestType::GreaterOrEqual) &&
73 (
request2.RequestType == VaultRequestType::Less ||
request1.RequestType == VaultRequestType::LessOrEqual))
76 (
request1.RequestType == VaultRequestType::GreaterOrEqual),
107 template <VaultRequestType Type>
112 case VaultRequestType::Less:
113 case VaultRequestType::LessOrEqual:
114 case VaultRequestType::Equal:
115 case VaultRequestType::GreaterOrEqual:
116 case VaultRequestType::Greater:
117 DataRequestFunc(Key,
vlt,
vaultRecords, DataPtr,
nullptr,
false,
false, RequestPredicat);
119 case VaultRequestType::Or:
120 case VaultRequestType::And:
126 template <VaultRequestType Type>
129 if (DeleteFunc !=
nullptr && DataPtr !=
nullptr)
133 template <VaultRequestType LType, VaultRequestType RType>
139 template <VaultRequestType LType, VaultRequestType RType>
140 VaultRequest<VaultRequestType::Or> operator|| (
const VaultRequest<LType>& lhs,
const VaultRequest<RType>& rhs)
noexcept
142 return VaultRequest<VaultRequestType::Or>(lhs, rhs);
Iterator class for all library maps.
Definition Map.h:18
A class for storing data with the ability to quickly search for a variety of different keys of any ty...
Definition Vault.h:33
A class for storing data inside Vault.
Definition VaultRecord.h:18
A class that provides access to data inside Vault.
Definition VaultRecordRef.h:21
friend class VaultRequest
Making the all VaultRequest templates friendly.
Definition VaultRequest.h:44
~VaultRequest() noexcept
Default destructor.
Definition VaultRequest.hpp:127
void Request(Vault *vlt, std::unordered_set< VaultRecord * > &vaultRecords) const
Function for requesting data from Vault.
Definition VaultRequest.hpp:108
Structure for storing the results of MVault operations.
Definition VaultOperationResult.h:40