MVault 0.0.1
Loading...
Searching...
No Matches
VaultParamInput.hpp
1#pragma once
2
3#include "VaultParamInput.h"
4
5#include "VaultRecordRef.hpp"
6
7namespace mvlt
8{
9 template <class T>
10 VaultParamInput::VaultParamInput(const T& data) noexcept : DataType(typeid(T))
11 {
12 static_assert(!std::is_array<T>::value, "It is not possible to use a c array as a key value. \n\
13 If you want to use a string as a key, you must specialize the function with a string. Like this: \n\
14 CreateRecord({{\"Key\", std::string(\"Value\")}});");
15
16 SetDataToRefFunc = [=](const std::string& key, VaultRecordRef& refToSetData)
17 {
18 return refToSetData.SetData(key, data);
19 };
20
21 SetDataToRecordFunc = [=](const std::string& key, VaultRecord* recordToSetData)
22 {
23 recordToSetData->SetData(key, data);
24 };
25 }
26}
Iterator class for all library maps.
Definition Map.h:18
VaultParamInput(const T &data) noexcept
A template constructor that accepts a variable to store inside VaultParamInput.
Definition VaultParamInput.hpp:10
A class for storing data inside Vault.
Definition VaultRecord.h:18
A class that provides access to data inside Vault.
Definition VaultRecordRef.h:21