MVault 1.0.0
Simple c++ database
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:
19 VaultRequestType RequestType = Type;
20
22 void (*DataRequestFunc)(const std::string&, Vault*, std::unordered_set<VaultRecord*>&, void*, void*, bool, bool, const std::function<bool(const VaultRecordRef& ref)>&);
23
25 std::function<void(Vault* vlt, std::unordered_set<VaultRecord*>& setWithRecords)> LogicalRequestFunction;
26
28 void (*DeleteFunc)(void*) = nullptr;
29
31 std::string Key;
32
34 void* DataPtr = nullptr;
35
37 std::function<bool(const VaultRecordRef& ref)> RequestPredicat;
38
39 public:
41 template <VaultRequestType TType>
42 friend class VaultRequest;
43
46
53
60
73
85 VaultRequest(const std::string& key, const T& keyValue, const std::function<bool(const VaultRecordRef& ref)>& requestPredicat = DefaultRequestPredicat) noexcept;
86
96 template <VaultRequestType RequestType1, VaultRequestType RequestType2>
98
106
109
111 template <VaultRequestType TType>
113
115 template <VaultRequestType TType>
117 };
118
144 template <VaultRequestType LType, VaultRequestType RType>
146
172 template <VaultRequestType LType, VaultRequestType RType>
174}
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:35
A class for storing data inside Vault.
Definition VaultRecord.h:18
A class that provides access to data inside Vault.
Definition VaultRecordRef.h:21
A class for requests to Vault.
Definition VaultRequest.h:16
void Request(Vault *vlt, std::unordered_set< VaultRecord * > &vaultRecords) const
Function for requesting data from Vault.
Definition VaultRequest.hpp:113
VaultRequest() noexcept=default
Default construcor.