COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
FrameLayerBaseOptionsParser.h
1//
2// Copyright 2017 - 2026 (C). Alex Robenko. All rights reserved.
3//
4// SPDX-License-Identifier: MPL-2.0
5//
6// This Source Code Form is subject to the terms of the Mozilla Public
7// License, v. 2.0. If a copy of the MPL was not distributed with this
8// file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10#pragma once
11
12#include "comms/options.h"
13
14#include <tuple>
15
16namespace comms
17{
18
19namespace frame
20{
21
22namespace details
23{
24
25template <typename... TOptions>
26class FrameLayerBaseOptionsParser;
27
28template <>
29class FrameLayerBaseOptionsParser<>
30{
31public:
32 static constexpr bool HasForceReadUntilDataSplit = false;
33 static constexpr bool HasDisallowReadUntilDataSplit = false;
34};
35
36template <typename... TOptions>
37class FrameLayerBaseOptionsParser<
38 comms::option::def::FrameLayerForceReadUntilDataSplit, TOptions...> :
39 public FrameLayerBaseOptionsParser<TOptions...>
40{
41public:
42 static constexpr bool HasForceReadUntilDataSplit = true;
43};
44
45template <typename... TOptions>
46class FrameLayerBaseOptionsParser<
47 comms::option::def::FrameLayerDisallowReadUntilDataSplit, TOptions...> :
48 public FrameLayerBaseOptionsParser<TOptions...>
49{
50public:
51 static constexpr bool HasDisallowReadUntilDataSplit = true;
52};
53
54template <typename... TOptions>
55class FrameLayerBaseOptionsParser<
56 comms::option::app::EmptyOption,
57 TOptions...> : public FrameLayerBaseOptionsParser<TOptions...>
58{
59};
60
61template <typename... TBundledOptions, typename... TOptions>
62class FrameLayerBaseOptionsParser<
63 std::tuple<TBundledOptions...>,
64 TOptions...> : public FrameLayerBaseOptionsParser<TBundledOptions..., TOptions...>
65{
66};
67
68} // namespace details
69
70} // namespace frame
71
72} // namespace comms
Main namespace for all classes / functions of COMMS library.
STL namespace.
Contains definition of all the options used by the COMMS library.