Platform.Data.Doublets C++
Toggle main menu visibility
Loading...
Searching...
No Matches
LinksUsagesValidator.h
Go to the documentation of this file.
1
namespace
Platform::Data::Doublets::Decorators
2
{
3
template
<
typename
...>
4
class
LinksUsagesValidator
;
5
template
<std::
int
egral TLinkAddress>
6
class
LinksUsagesValidator<TLinkAddress>
:
public
DecoratorBase<TFacade, TDecorated>
7
{
8
public
:
9
LinksUsagesValidator
(ILinks<TLinkAddress>& storage) : DecoratorBase(storage) {}
10
11
public
:
12
TLinkAddress
Update
(
const
LinkType& restriction,
const
LinkType& substitution)
13
{
14
storage.EnsureNoUsages(restriction[_constants.IndexPart]);
15
return
storage.Update(restriction, substitution);
16
}
17
18
public
:
19
void
Delete
(
const
LinkType& restriction)
20
{
21
auto
link = restriction[_constants.IndexPart];
22
storage.EnsureNoUsages(link);
23
storage.Delete(link);
24
}
25
};
26
}
// namespace Platform::Data::Doublets::Decorators
TLinkAddress
std::uint32_t TLinkAddress
Definition
UInt32Links.h:3
Platform::Data::Doublets::Decorators::LinksUsagesValidator< TLinkAddress >::Delete
void Delete(const LinkType &restriction)
Definition
LinksUsagesValidator.h:19
Platform::Data::Doublets::Decorators::LinksUsagesValidator< TLinkAddress >::Update
TLinkAddress Update(const LinkType &restriction, const LinkType &substitution)
Definition
LinksUsagesValidator.h:12
Platform::Data::Doublets::Decorators::LinksUsagesValidator< TLinkAddress >::LinksUsagesValidator
LinksUsagesValidator(ILinks< TLinkAddress > &storage)
Definition
LinksUsagesValidator.h:9
Platform::Data::Doublets::Decorators::LinksUsagesValidator
Definition
LinksUsagesValidator.h:4
Platform::Data::Doublets::Decorators
Definition
Decorators.h:4
cpp
Platform.Data.Doublets
Decorators
LinksUsagesValidator.h
Generated by
1.18.0