Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions cpp/Platform.Interfaces/CLinks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ο»Ώ#pragma once

#include <concepts>

namespace Platform::Interfaces {
template <typename TSelf>
concept CLinks = requires {
typename TSelf::OptionsType;
typename TSelf::LinkAddressType;
typename TSelf::LinkType;
typename TSelf::WriteHandlerType;
typename TSelf::ReadHandlerType;
} && requires(TSelf self, const typename TSelf::LinkType& restriction, const typename TSelf::LinkType& substitution, const typename TSelf::ReadHandlerType& readHandler, const typename TSelf::WriteHandlerType& writeHandler) {
{ self.Constants } -> std::convertible_to<const auto&>;
{ self.Count(restriction) } -> std::same_as<typename TSelf::LinkAddressType>;
{ self.Each(restriction, readHandler) } -> std::same_as<typename TSelf::LinkAddressType>;
{ self.Create(restriction, writeHandler) } -> std::same_as<typename TSelf::LinkAddressType>;
{ self.Update(restriction, substitution, writeHandler) } -> std::same_as<typename TSelf::LinkAddressType>;
{ self.Delete(restriction, writeHandler) } -> std::same_as<typename TSelf::LinkAddressType>;
};
} // namespace Platform::Interfaces
Loading