MVault 0.0.1
Loading...
Searching...
No Matches
VaultRequest.h
1#pragma once
2
3#include <functional>
4
5#include "VaultClasses.h"
6
7namespace mvlt
8{
14 template <VaultRequestType Type>
16 {
17 private:
18
20 VaultRequestType RequestType = Type;
21
23 void (*DataRequestFunc)(const std::string&, Vault*, std::unordered_set<VaultRecord*>&, void*, void*, bool, bool, std::function<bool(const VaultRecordRef&)>);
24
26 std::function<void (Vault*, std::unordered_set<VaultRecord*>&)> LogicalRequestFunction;
27
29 void (*DeleteFunc)(void*) = nullptr;
30
32 std::string Key;
33
35 void* DataPtr = nullptr;
36
38 std::function<bool(const VaultRecordRef&)> RequestPredicat;
39
40 public:
41
43 template <VaultRequestType TType>
44 friend class VaultRequest;
45
56 template <class T>
57 VaultRequest(const std::string& key, const T& keyValue, std::function<bool(const VaultRecordRef&)> requestPredicat = DefaultRequestPredicat);
58
70 template <VaultRequestType RequestType1, VaultRequestType RequestType2>
72
79 void Request(Vault* vlt, std::unordered_set<VaultRecord*>& vaultRecords) const;
80
83
85 template <VaultRequestType TType>
87
89 template <VaultRequestType TType>
91 };
92
118 template <VaultRequestType LType, VaultRequestType RType>
120
146 template <VaultRequestType LType, VaultRequestType RType>
148}
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 that provides access to data inside Vault.
Definition VaultRecordRef.h:21
A class for requests to Vault.
Definition VaultRequest.h:16
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