MVault 0.0.1
Loading...
Searching...
No Matches
VaultRecordRef.h
1#pragma once
2
3#include "Vault.h"
4#include "VaultRecord.h"
5#include "VaultClasses.h"
6#include "VaultParamInput.h"
7#include "VaultOperationResult.h"
8
9namespace mvlt
10{
21 {
22 private:
23 // Pointer to Vault
24 Vault* Vlt = nullptr;
25
26 // Pointer to VaultRecord inside Vault
27 VaultRecord* VaultRecordPtr = nullptr;
28
35 void SetRecord(VaultRecord* vaultRecord, Vault* vlt) noexcept;
36
37 public:
38
40 friend Vault;
41
44
46 friend std::hash<VaultRecordRef>;
47
50
59
66
73
82
91
106
118
131
145
153 bool IsValid() const noexcept;
154
162 bool IsKeyExist(const std::string& key) const noexcept;
163
171 std::vector<std::string> GetKeys() const noexcept;
172
175
177 void Reset() noexcept;
178
181 };
182}
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 transferring data to the Vault.
Definition VaultParamInput.h:18
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 Vault
Making the Vault class friendly so that it has access to the internal members of the VaultRecordRef c...
Definition VaultRecordRef.h:40
std::string GetRecordUniqueId() const noexcept
A method for obtaining a unique record identifier.
Definition VaultRecordRef.cpp:72
VaultRecordRef() noexcept
Default constructor.
Definition VaultRecordRef.cpp:20
VaultOperationResult SetData(const std::string &key, const T &data) noexcept
Method for updating data inside Vault.
Definition VaultRecordRef.hpp:10
bool IsValid() const noexcept
A function to check the validity of a class object.
Definition VaultRecordRef.cpp:140
VaultOperationResult GetData(const std::string &key, T &data) const noexcept
A method for getting data using a key.
Definition VaultRecordRef.hpp:43
std::vector< std::string > GetKeys() const noexcept
The method for getting all the keys.
Definition VaultRecordRef.cpp:158
void Reset() noexcept
A method for decoupling a class object from record. Reset class object to default state.
Definition VaultRecordRef.cpp:202
void PrintRecord() const noexcept
A method for displaying VaultRecordRef content on the screen.
Definition VaultRecordRef.cpp:172
VaultOperationResult GetDataAsString(const std::string &key, std::string &str) const noexcept
Method for getting data converted to string from a container using a key.
Definition VaultRecordRef.cpp:100
bool IsKeyExist(const std::string &key) const noexcept
The method for getting a default key value.
Definition VaultRecordRef.cpp:149
friend VaultRecordSet
Making the VaultRecordSet class friendly so that it has access to the internal members of the VaultRe...
Definition VaultRecordRef.h:43
Structure for storing the results of MVault operations.
Definition VaultOperationResult.h:40