-
Notifications
You must be signed in to change notification settings - Fork 3
/
LinksOptions.h
59 lines (55 loc) · 2.18 KB
/
LinksOptions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
namespace Platform::Data
{
template<typename TLinkAddress = std::uint64_t, LinksConstants<TLinkAddress> VConstants = LinksConstants<TLinkAddress>{true}, typename TLink = std::vector<TLinkAddress>, typename TWriteHandler = std::function<TLinkAddress(TLink, TLink)>, typename TReadHandler = std::function<TLinkAddress(TLink)>>
struct LinksOptions
{
using LinkAddressType = TLinkAddress;
using LinkType = TLink;
using WriteHandlerType = TWriteHandler;
using ReadHandlerType = TReadHandler;
static constexpr LinksConstants<LinkAddressType> Constants = VConstants;
};
// template<typename ...>
// struct LinksOptions;
//
// template<typename TLinkAddress, LinksConstants<TLinkAddress> VConstants, typename TLink, typename TWriteHandler, typename TReadHandler>
// struct LinksOptions<TLinkAddress, VConstants, TLink, TWriteHandler, TReadHandler>
// {
// using LinkAddressType = TLinkAddress;
// using LinkType = std::vector<LinkAddressType>;
// using WriteHandlerType = TWriteHandler;
// using ReadHandlerType = TReadHandler;
// using ConstantsType = VConstants;
// };
//
//
// template<typename TLinkAddress, LinksConstants<TLinkAddress> VConstants, typename TLink, typename TWriteHandler>
// struct LinksOptions<TLinkAddress, VConstants, TLink, TWriteHandler> : LinksOptions<TLinkAddress, VConstants, TLink, TWriteHandler, std::function<TLinkAddress(TLink)>>
// {
//
// };
//
//
// template<typename TLinkAddress, LinksConstants<TLinkAddress> VConstants, typename TLink>
// struct LinksOptions<TLinkAddress, VConstants, TLink> : LinksOptions<TLinkAddress, VConstants, TLink, std::function<TLinkAddress(TLink, TLink)>>
// {
//
// };
//
// template<typename TLinkAddress, LinksConstants<TLinkAddress> VConstants>
// struct LinksOptions<TLinkAddress, VConstants> : LinksOptions<TLinkAddress, VConstants, std::vector<TLinkAddress>>
// {
//
// };
//
// template<typename TLinkAddress>
// struct LinksOptions<TLinkAddress> : LinksOptions<TLinkAddress, LinksConstants<TLinkAddress>{true}>
// {
//
// };
//
// struct LinksOptions<> : LinksOptions<std::uint64_t>
// {
//
// };
}