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