25#include "comms/comms.h"
27#include "FieldWrapper.h"
32namespace field_wrapper
35class CC_API UnknownValueWrapper :
public FieldWrapper
38 typedef std::unique_ptr<UnknownValueWrapper> Ptr;
40 UnknownValueWrapper();
41 virtual ~UnknownValueWrapper() noexcept;
46 virtual Ptr cloneImpl() = 0;
48 void dispatchImpl(FieldWrapperHandler& handler);
51template <typename TField>
52class UnknownValueWrapperT : public FieldWrapperT<UnknownValueWrapper, TField>
54 using Base = FieldWrapperT<UnknownValueWrapper, TField>;
56 using SerialisedSeq =
typename Base::SerialisedSeq;
59 typedef typename Base::Ptr Ptr;
61 explicit UnknownValueWrapperT(Field& fieldRef)
66 UnknownValueWrapperT(
const UnknownValueWrapperT&) =
default;
67 UnknownValueWrapperT(UnknownValueWrapperT&&) =
default;
68 virtual ~UnknownValueWrapperT() noexcept = default;
70 UnknownValueWrapperT& operator=(const UnknownValueWrapperT&) = delete;
73 virtual Ptr cloneImpl()
override
75 return Ptr(
new UnknownValueWrapperT<TField>(Base::field()));
79using UnknownValueWrapperPtr = UnknownValueWrapper::Ptr;
81template <
typename TField>
83makeUnknownValueWrapper(TField& field)
86 UnknownValueWrapperPtr(
87 new UnknownValueWrapperT<TField>(field));