MVault 0.0.1
Loading...
Searching...
No Matches
VaultParamInput.h
1#pragma once
2
3#include <string>
4#include <typeindex>
5#include <functional>
6
7#include "VaultClasses.h"
8#include "VaultRecordRef.h"
9
10namespace mvlt
11{
18 {
19 private:
20
21 // Pointer to data type saver
22 std::type_index DataType;
23
24 // Function for setting data to VaultRecordRef
25 std::function<VaultOperationResult(const std::string&, VaultRecordRef&)> SetDataToRefFunc;
26
27 // Function for settind data to VaultRecord
28 std::function<void(const std::string&, VaultRecord*)> SetDataToRecordFunc;
29
38 VaultOperationResult SetDataToRef(const std::string& key, VaultRecordRef& refToSetData) const noexcept;
39
45 void SetDataToRecord(const std::string& key, VaultRecord* recordToSetData) const noexcept;
46
47 public:
48
50 friend Vault;
51
54
62 template <class T>
63 VaultParamInput(const T& data) noexcept;
64
70 std::type_index GetDataType() const noexcept;
71 };
72}
Iterator class for all library maps.
Definition Map.h:18
A class for transferring data to the Vault.
Definition VaultParamInput.h:18
std::type_index GetDataType() const noexcept
A method for getting the type of saved data.
Definition VaultParamInput.cpp:15
friend Vault
Making the Vault class friendly so that it has access to the internal members of the VaultParamInput ...
Definition VaultParamInput.h:50
friend VaultRecordRef
Making the VaultRecordRef class friendly so that it has access to the internal members of the VaultPa...
Definition VaultParamInput.h:53
A class for storing data inside Vault.
Definition VaultRecord.h:18
A class that provides access to data inside Vault.
Definition VaultRecordRef.h:21
Structure for storing the results of MVault operations.
Definition VaultOperationResult.h:40