3 template <
typename TFacade,
typename TDecorated>
7 using base = DecoratorBase<TFacade, TDecorated>;
9 using typename base::LinkAddressType;
10 using typename base::LinkType;
11 using typename base::ReadHandlerType;
12 using typename base::WriteHandlerType;
18 LinkAddressType
Update(
const LinkType& restriction,
const LinkType& substitution,
19 const WriteHandlerType& handler)
21 auto newLinkAddress =
SearchOrDefault(this->decorated(), substitution[Constants.SourcePart],
22 substitution[Constants.TargetPart]);
23 if (newLinkAddress == LinkAddressType{})
25 return this->decorated().TDecorated::Update(restriction, substitution, handler);
32 const WriteHandlerType& handler)
34 if (oldLinkAddress != newLinkAddress && Exists(this->decorated(), oldLinkAddress))
36 this->facade().Delete(LinkType{oldLinkAddress}, handler);
38 return Constants.Continue;