COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
MsgSizeLayerBase.h
1//
2// Copyright 2025 - 2025 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#pragma once
9
10#include "comms/frame/details/MsgSizeLayerOptionsParser.h"
12#include "comms/options.h"
13
14#include <cstddef>
15
16namespace comms
17{
18
19namespace frame
20{
21
22// Forward declaration
23template <typename TField, typename TNextLayer, typename... TOptions>
24class MsgSizeLayer;
25
26namespace details
27{
28
29template <typename TField, typename TNextLayer, typename... TOptions>
30class MsgSizeLayerBaseHelper
31{
32 using ParsedOptionsInternal = comms::frame::details::MsgSizeLayerOptionsParser<TOptions...>;
33 using ActualLayer = typename ParsedOptionsInternal::template DefineExtendingClass<MsgSizeLayer<TField, TNextLayer, TOptions...>>;
34 using TopBase =
36 TField,
37 TNextLayer,
38 ActualLayer,
40 >;
41
42public:
43 using Base = TopBase;
44};
45
46template <typename TField, typename TNextLayer, typename... TOptions>
47using MsgSizeLayerBase = typename MsgSizeLayerBaseHelper<TField, TNextLayer, TOptions...>::Base;
48
49} // namespace details
50
51} // namespace frame
52
53} // namespace comms
Contains definition of comms::frame::FrameLayerBase.
Base class for all the middle (non MsgDataLayer) protocol transport layers.
Definition FrameLayerBase.h:60
comms::frame::MsgSizeLayer< TField, TNextLayer, TOptions... > MsgSizeLayer
Alias to the comms::frame::MsgSizeLayer.
Definition MsgSizeLayer.h:25
Main namespace for all classes / functions of COMMS library.
Contains definition of all the options used by the COMMS library.
Disallow usage of FrameLayerForceReadUntilDataSplit option in earlier (outer wrapping) layers.
Definition options.h:1130