MVault 0.0.1
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
mvlt::VaultRequest< Type > Class Template Reference

A class for requests to Vault. More...

#include <VaultRequest.h>

Public Member Functions

template<class T >
 VaultRequest (const std::string &key, const T &keyValue, std::function< bool(const VaultRecordRef &)> requestPredicat=DefaultRequestPredicat)
 Request constructor.
 
template<VaultRequestType RequestType1, VaultRequestType RequestType2>
 VaultRequest (const VaultRequest< RequestType1 > &request1, const VaultRequest< RequestType2 > &request2) noexcept
 Request constructor.
 
void Request (Vault *vlt, std::unordered_set< VaultRecord * > &vaultRecords) const
 Function for requesting data from Vault.
 
 ~VaultRequest () noexcept
 Default destructor.
 

Friends

template<VaultRequestType TType>
class VaultRequest
 Making the all VaultRequest templates friendly.
 
template<VaultRequestType TType>
VaultRequest operator&& (const VaultRequest &lhs, const VaultRequest &rhs) noexcept
 Friend operator&&.
 
template<VaultRequestType TType>
VaultRequest operator|| (const VaultRequest &lhs, const VaultRequest &rhs) noexcept
 Friend operator||.
 

Detailed Description

template<VaultRequestType Type>
class mvlt::VaultRequest< Type >

A class for requests to Vault.

Template Parameters
<VaultRequestType>type of the request

Constructor & Destructor Documentation

◆ VaultRequest() [1/2]

template<VaultRequestType Type>
template<class T >
mvlt::VaultRequest< Type >::VaultRequest ( const std::string &  key,
const T keyValue,
std::function< bool(const VaultRecordRef &)>  requestPredicat = DefaultRequestPredicat 
)

Request constructor.

Template Parameters
<T>Any type of data except c-arrays
Parameters
[in]keyrequested key
[in]keyValuerequested data
[in]requestPredicatA function that accepts VaultRecordRef and decides whether to add an record to the request. When the function returns true, the record is added, and when false is not added.

◆ VaultRequest() [2/2]

template<VaultRequestType Type>
template<VaultRequestType RequestType1, VaultRequestType RequestType2>
mvlt::VaultRequest< Type >::VaultRequest ( const VaultRequest< RequestType1 > &  request1,
const VaultRequest< RequestType2 > &  request2 
)
noexcept

Request constructor.

Template Parameters
<RequestType1>First request type
<RequestType2>Second request type
Parameters
[in]request1first request
[in]request2second request
[in]requestPredicatA function that accepts VaultRecordRef and decides whether to add an record to the request. When the function returns true, the record is added, and when false is not added.

Member Function Documentation

◆ Request()

template<VaultRequestType Type>
void mvlt::VaultRequest< Type >::Request ( Vault vlt,
std::unordered_set< VaultRecord * > &  vaultRecords 
) const

Function for requesting data from Vault.

Parameters
[in]vltA pointer to the Vault from which to request data
[in]vaultRecordsA reference to the std::unordered_set<VaultRecord*> where the recordings will be saved

The documentation for this class was generated from the following files: