| /** | |
| * Generated by the Emboss compiler. DO NOT EDIT! | |
| */ | |
| #ifndef TESTDATA_TEXT_FORMAT_EMB_H_ | |
| #define TESTDATA_TEXT_FORMAT_EMB_H_ | |
| #include <stdint.h> | |
| #include <string.h> | |
| #include <algorithm> | |
| #include <type_traits> | |
| #include <utility> | |
| #include "runtime/cpp/emboss_cpp_util.h" | |
| #include "runtime/cpp/emboss_enum_view.h" | |
| #include "runtime/cpp/emboss_prelude.h" | |
| #include "runtime/cpp/emboss_text_util.h" | |
| /* NOLINTBEGIN */ | |
| namespace emboss { | |
| namespace test { | |
| namespace Vanilla {} // namespace Vanilla | |
| template <class Storage> | |
| class GenericVanillaView; | |
| namespace StructWithSkippedFields {} // namespace StructWithSkippedFields | |
| template <class Storage> | |
| class GenericStructWithSkippedFieldsView; | |
| namespace StructWithSkippedStructureFields { | |
| } // namespace StructWithSkippedStructureFields | |
| template <class Storage> | |
| class GenericStructWithSkippedStructureFieldsView; | |
| enum class JsonTestEnum : ::std::uint64_t; | |
| namespace JsonTestArrayStruct {} // namespace JsonTestArrayStruct | |
| template <class Storage> | |
| class GenericJsonTestArrayStructView; | |
| namespace JsonTestStruct { | |
| namespace EmbossReservedAnonymousField1 { | |
| } // namespace EmbossReservedAnonymousField1 | |
| template <class Storage> | |
| class GenericEmbossReservedAnonymousField1View; | |
| } // namespace JsonTestStruct | |
| template <class Storage> | |
| class GenericJsonTestStructView; | |
| enum class JsonNarrowEnum : ::std::uint16_t; | |
| namespace JsonEnumStruct {} // namespace JsonEnumStruct | |
| template <class Storage> | |
| class GenericJsonEnumStructView; | |
| namespace JsonFloatStruct {} // namespace JsonFloatStruct | |
| template <class Storage> | |
| class GenericJsonFloatStructView; | |
| namespace JsonOptionalStruct {} // namespace JsonOptionalStruct | |
| template <class Storage> | |
| class GenericJsonOptionalStructView; | |
| namespace JsonPartialStruct {} // namespace JsonPartialStruct | |
| template <class Storage> | |
| class GenericJsonPartialStructView; | |
| namespace Vanilla {} // namespace Vanilla | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericVanillaView; | |
| template <class Storage> | |
| class GenericVanillaView final { | |
| public: | |
| GenericVanillaView() : backing_() {} | |
| explicit GenericVanillaView(Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericVanillaView( | |
| const GenericVanillaView<OtherStorage>& emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template < | |
| typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericVanillaView<typename ::std::remove_cv< | |
| typename ::std::remove_reference<Arg>::type>::type>::value>::type> | |
| explicit GenericVanillaView(Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericVanillaView(Arg0&& emboss_reserved_local_arg0, | |
| Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericVanillaView<Storage>& operator=( | |
| const GenericVanillaView<OtherStorage>& emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_a().Known()) return false; | |
| if (has_a().ValueOrDefault() && !a().Ok()) return false; | |
| if (!has_b().Known()) return false; | |
| if (has_b().ValueOrDefault() && !b().Ok()) return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBytes() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals( | |
| GenericVanillaView<OtherStorage> emboss_reserved_local_other) const { | |
| if (!has_a().Known()) return false; | |
| if (!emboss_reserved_local_other.has_a().Known()) return false; | |
| if (emboss_reserved_local_other.has_a().ValueOrDefault() && | |
| !has_a().ValueOrDefault()) | |
| return false; | |
| if (has_a().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_a().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_a().ValueOrDefault() && | |
| has_a().ValueOrDefault() && | |
| !a().Equals(emboss_reserved_local_other.a())) | |
| return false; | |
| if (!has_b().Known()) return false; | |
| if (!emboss_reserved_local_other.has_b().Known()) return false; | |
| if (emboss_reserved_local_other.has_b().ValueOrDefault() && | |
| !has_b().ValueOrDefault()) | |
| return false; | |
| if (has_b().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_b().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOrDefault() && | |
| has_b().ValueOrDefault() && | |
| !b().Equals(emboss_reserved_local_other.b())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals( | |
| GenericVanillaView<OtherStorage> emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_a().ValueOr(false) && | |
| !has_a().ValueOr(false)) | |
| return false; | |
| if (has_a().ValueOr(false) && | |
| !emboss_reserved_local_other.has_a().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_a().ValueOr(false) && | |
| has_a().ValueOr(false) && | |
| !a().UncheckedEquals(emboss_reserved_local_other.a())) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOr(false) && | |
| !has_b().ValueOr(false)) | |
| return false; | |
| if (has_b().ValueOr(false) && | |
| !emboss_reserved_local_other.has_b().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOr(false) && | |
| has_b().ValueOr(false) && | |
| !b().UncheckedEquals(emboss_reserved_local_other.b())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom( | |
| GenericVanillaView<OtherStorage> emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom( | |
| GenericVanillaView<OtherStorage> emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom( | |
| GenericVanillaView<OtherStorage> emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "a") { | |
| if (!a().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "b") { | |
| if (!b().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_a().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| a().IsAggregate() || a().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"a\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("a: "); | |
| } | |
| a().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !a().IsAggregate() && !a().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# a: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_b().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| b().IsAggregate() || b().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"b\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("b: "); | |
| } | |
| b().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !b().IsAggregate() && !b().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# b: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| a() const; | |
| ::emboss::support::Maybe<bool> has_a() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| b() const; | |
| ::emboss::support::Maybe<bool> has_b() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| IntrinsicSizeInBytes() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericVanillaView; | |
| }; | |
| using VanillaView = | |
| GenericVanillaView</**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using VanillaWriter = | |
| GenericVanillaView</**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericVanillaView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericVanillaView<GenericVanillaView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericVanillaView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeVanillaView(T&& emboss_reserved_local_arg) { | |
| return GenericVanillaView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericVanillaView</**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeVanillaView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericVanillaView</**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericVanillaView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedVanillaView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericVanillaView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| namespace StructWithSkippedFields {} // namespace StructWithSkippedFields | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericStructWithSkippedFieldsView; | |
| template <class Storage> | |
| class GenericStructWithSkippedFieldsView final { | |
| public: | |
| GenericStructWithSkippedFieldsView() : backing_() {} | |
| explicit GenericStructWithSkippedFieldsView( | |
| Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericStructWithSkippedFieldsView( | |
| const GenericStructWithSkippedFieldsView<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template <typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericStructWithSkippedFieldsView< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericStructWithSkippedFieldsView(Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericStructWithSkippedFieldsView( | |
| Arg0&& emboss_reserved_local_arg0, Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericStructWithSkippedFieldsView<Storage>& operator=( | |
| const GenericStructWithSkippedFieldsView<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_a().Known()) return false; | |
| if (has_a().ValueOrDefault() && !a().Ok()) return false; | |
| if (!has_b().Known()) return false; | |
| if (has_b().ValueOrDefault() && !b().Ok()) return false; | |
| if (!has_c().Known()) return false; | |
| if (has_c().ValueOrDefault() && !c().Ok()) return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBytes() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericStructWithSkippedFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_a().Known()) return false; | |
| if (!emboss_reserved_local_other.has_a().Known()) return false; | |
| if (emboss_reserved_local_other.has_a().ValueOrDefault() && | |
| !has_a().ValueOrDefault()) | |
| return false; | |
| if (has_a().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_a().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_a().ValueOrDefault() && | |
| has_a().ValueOrDefault() && | |
| !a().Equals(emboss_reserved_local_other.a())) | |
| return false; | |
| if (!has_b().Known()) return false; | |
| if (!emboss_reserved_local_other.has_b().Known()) return false; | |
| if (emboss_reserved_local_other.has_b().ValueOrDefault() && | |
| !has_b().ValueOrDefault()) | |
| return false; | |
| if (has_b().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_b().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOrDefault() && | |
| has_b().ValueOrDefault() && | |
| !b().Equals(emboss_reserved_local_other.b())) | |
| return false; | |
| if (!has_c().Known()) return false; | |
| if (!emboss_reserved_local_other.has_c().Known()) return false; | |
| if (emboss_reserved_local_other.has_c().ValueOrDefault() && | |
| !has_c().ValueOrDefault()) | |
| return false; | |
| if (has_c().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_c().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_c().ValueOrDefault() && | |
| has_c().ValueOrDefault() && | |
| !c().Equals(emboss_reserved_local_other.c())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericStructWithSkippedFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_a().ValueOr(false) && | |
| !has_a().ValueOr(false)) | |
| return false; | |
| if (has_a().ValueOr(false) && | |
| !emboss_reserved_local_other.has_a().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_a().ValueOr(false) && | |
| has_a().ValueOr(false) && | |
| !a().UncheckedEquals(emboss_reserved_local_other.a())) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOr(false) && | |
| !has_b().ValueOr(false)) | |
| return false; | |
| if (has_b().ValueOr(false) && | |
| !emboss_reserved_local_other.has_b().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOr(false) && | |
| has_b().ValueOr(false) && | |
| !b().UncheckedEquals(emboss_reserved_local_other.b())) | |
| return false; | |
| if (emboss_reserved_local_other.has_c().ValueOr(false) && | |
| !has_c().ValueOr(false)) | |
| return false; | |
| if (has_c().ValueOr(false) && | |
| !emboss_reserved_local_other.has_c().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_c().ValueOr(false) && | |
| has_c().ValueOr(false) && | |
| !c().UncheckedEquals(emboss_reserved_local_other.c())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom(GenericStructWithSkippedFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericStructWithSkippedFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericStructWithSkippedFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "a") { | |
| if (!a().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "b") { | |
| if (!b().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "c") { | |
| if (!c().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_a().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| a().IsAggregate() || a().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"a\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("a: "); | |
| } | |
| a().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !a().IsAggregate() && !a().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# a: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_c().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| c().IsAggregate() || c().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"c\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("c: "); | |
| } | |
| c().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !c().IsAggregate() && !c().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# c: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| a() const; | |
| ::emboss::support::Maybe<bool> has_a() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| b() const; | |
| ::emboss::support::Maybe<bool> has_b() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| c() const; | |
| ::emboss::support::Maybe<bool> has_c() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| IntrinsicSizeInBytes() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericStructWithSkippedFieldsView; | |
| }; | |
| using StructWithSkippedFieldsView = GenericStructWithSkippedFieldsView< | |
| /**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using StructWithSkippedFieldsWriter = GenericStructWithSkippedFieldsView< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericStructWithSkippedFieldsView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericStructWithSkippedFieldsView< | |
| GenericStructWithSkippedFieldsView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericStructWithSkippedFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeStructWithSkippedFieldsView(T&& emboss_reserved_local_arg) { | |
| return GenericStructWithSkippedFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericStructWithSkippedFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeStructWithSkippedFieldsView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericStructWithSkippedFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericStructWithSkippedFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedStructWithSkippedFieldsView( | |
| T* emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { | |
| return GenericStructWithSkippedFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| namespace StructWithSkippedStructureFields { | |
| } // namespace StructWithSkippedStructureFields | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView; | |
| template <class Storage> | |
| class GenericStructWithSkippedStructureFieldsView final { | |
| public: | |
| GenericStructWithSkippedStructureFieldsView() : backing_() {} | |
| explicit GenericStructWithSkippedStructureFieldsView( | |
| Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericStructWithSkippedStructureFieldsView( | |
| const GenericStructWithSkippedStructureFieldsView<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template < | |
| typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericStructWithSkippedStructureFieldsView( | |
| Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericStructWithSkippedStructureFieldsView( | |
| Arg0&& emboss_reserved_local_arg0, Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericStructWithSkippedStructureFieldsView<Storage>& operator=( | |
| const GenericStructWithSkippedStructureFieldsView<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_a().Known()) return false; | |
| if (has_a().ValueOrDefault() && !a().Ok()) return false; | |
| if (!has_b().Known()) return false; | |
| if (has_b().ValueOrDefault() && !b().Ok()) return false; | |
| if (!has_c().Known()) return false; | |
| if (has_c().ValueOrDefault() && !c().Ok()) return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBytes() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericStructWithSkippedStructureFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_a().Known()) return false; | |
| if (!emboss_reserved_local_other.has_a().Known()) return false; | |
| if (emboss_reserved_local_other.has_a().ValueOrDefault() && | |
| !has_a().ValueOrDefault()) | |
| return false; | |
| if (has_a().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_a().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_a().ValueOrDefault() && | |
| has_a().ValueOrDefault() && | |
| !a().Equals(emboss_reserved_local_other.a())) | |
| return false; | |
| if (!has_b().Known()) return false; | |
| if (!emboss_reserved_local_other.has_b().Known()) return false; | |
| if (emboss_reserved_local_other.has_b().ValueOrDefault() && | |
| !has_b().ValueOrDefault()) | |
| return false; | |
| if (has_b().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_b().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOrDefault() && | |
| has_b().ValueOrDefault() && | |
| !b().Equals(emboss_reserved_local_other.b())) | |
| return false; | |
| if (!has_c().Known()) return false; | |
| if (!emboss_reserved_local_other.has_c().Known()) return false; | |
| if (emboss_reserved_local_other.has_c().ValueOrDefault() && | |
| !has_c().ValueOrDefault()) | |
| return false; | |
| if (has_c().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_c().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_c().ValueOrDefault() && | |
| has_c().ValueOrDefault() && | |
| !c().Equals(emboss_reserved_local_other.c())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericStructWithSkippedStructureFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_a().ValueOr(false) && | |
| !has_a().ValueOr(false)) | |
| return false; | |
| if (has_a().ValueOr(false) && | |
| !emboss_reserved_local_other.has_a().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_a().ValueOr(false) && | |
| has_a().ValueOr(false) && | |
| !a().UncheckedEquals(emboss_reserved_local_other.a())) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOr(false) && | |
| !has_b().ValueOr(false)) | |
| return false; | |
| if (has_b().ValueOr(false) && | |
| !emboss_reserved_local_other.has_b().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_b().ValueOr(false) && | |
| has_b().ValueOr(false) && | |
| !b().UncheckedEquals(emboss_reserved_local_other.b())) | |
| return false; | |
| if (emboss_reserved_local_other.has_c().ValueOr(false) && | |
| !has_c().ValueOr(false)) | |
| return false; | |
| if (has_c().ValueOr(false) && | |
| !emboss_reserved_local_other.has_c().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_c().ValueOr(false) && | |
| has_c().ValueOr(false) && | |
| !c().UncheckedEquals(emboss_reserved_local_other.c())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom( | |
| GenericStructWithSkippedStructureFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericStructWithSkippedStructureFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericStructWithSkippedStructureFieldsView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "a") { | |
| if (!a().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "b") { | |
| if (!b().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "c") { | |
| if (!c().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_a().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| a().IsAggregate() || a().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"a\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("a: "); | |
| } | |
| a().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !a().IsAggregate() && !a().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# a: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_c().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| c().IsAggregate() || c().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"c\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("c: "); | |
| } | |
| c().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !c().IsAggregate() && !c().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# c: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>> | |
| a() const; | |
| ::emboss::support::Maybe<bool> has_a() const; | |
| public: | |
| typename ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>> | |
| b() const; | |
| ::emboss::support::Maybe<bool> has_b() const; | |
| public: | |
| typename ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 4>> | |
| c() const; | |
| ::emboss::support::Maybe<bool> has_c() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| IntrinsicSizeInBytes() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericStructWithSkippedStructureFieldsView; | |
| }; | |
| using StructWithSkippedStructureFieldsView = | |
| GenericStructWithSkippedStructureFieldsView< | |
| /**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using StructWithSkippedStructureFieldsWriter = | |
| GenericStructWithSkippedStructureFieldsView< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView< | |
| GenericStructWithSkippedStructureFieldsView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericStructWithSkippedStructureFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeStructWithSkippedStructureFieldsView(T&& emboss_reserved_local_arg) { | |
| return GenericStructWithSkippedStructureFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericStructWithSkippedStructureFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeStructWithSkippedStructureFieldsView( | |
| T* emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { | |
| return GenericStructWithSkippedStructureFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericStructWithSkippedStructureFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedStructWithSkippedStructureFieldsView( | |
| T* emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { | |
| return GenericStructWithSkippedStructureFieldsView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| enum class JsonTestEnum : ::std::uint64_t { | |
| ZERO = static_cast</**/ ::std::int32_t>(0LL), | |
| ONE = static_cast</**/ ::std::int32_t>(1LL), | |
| TWO = static_cast</**/ ::std::int32_t>(2LL), | |
| THREE = static_cast</**/ ::std::int32_t>(3LL), | |
| FOUR = static_cast</**/ ::std::int32_t>(4LL), | |
| }; | |
| template <class Enum> | |
| class EnumTraits; | |
| template <> | |
| class EnumTraits<JsonTestEnum> final { | |
| public: | |
| static bool TryToGetEnumFromName(const char* emboss_reserved_local_name, | |
| JsonTestEnum* emboss_reserved_local_result) { | |
| if (emboss_reserved_local_name == nullptr) return false; | |
| if (!strcmp("ZERO", emboss_reserved_local_name)) { | |
| *emboss_reserved_local_result = JsonTestEnum::ZERO; | |
| return true; | |
| } | |
| if (!strcmp("ONE", emboss_reserved_local_name)) { | |
| *emboss_reserved_local_result = JsonTestEnum::ONE; | |
| return true; | |
| } | |
| if (!strcmp("TWO", emboss_reserved_local_name)) { | |
| *emboss_reserved_local_result = JsonTestEnum::TWO; | |
| return true; | |
| } | |
| if (!strcmp("THREE", emboss_reserved_local_name)) { | |
| *emboss_reserved_local_result = JsonTestEnum::THREE; | |
| return true; | |
| } | |
| if (!strcmp("FOUR", emboss_reserved_local_name)) { | |
| *emboss_reserved_local_result = JsonTestEnum::FOUR; | |
| return true; | |
| } | |
| return false; | |
| } | |
| static const char* TryToGetNameFromEnum( | |
| JsonTestEnum emboss_reserved_local_value) { | |
| switch (emboss_reserved_local_value) { | |
| case JsonTestEnum::ZERO: | |
| return "ZERO"; | |
| case JsonTestEnum::ONE: | |
| return "ONE"; | |
| case JsonTestEnum::TWO: | |
| return "TWO"; | |
| case JsonTestEnum::THREE: | |
| return "THREE"; | |
| case JsonTestEnum::FOUR: | |
| return "FOUR"; | |
| default: | |
| return nullptr; | |
| } | |
| } | |
| static bool EnumIsKnown(JsonTestEnum emboss_reserved_local_value) { | |
| switch (emboss_reserved_local_value) { | |
| case JsonTestEnum::ZERO: | |
| return true; | |
| case JsonTestEnum::ONE: | |
| return true; | |
| case JsonTestEnum::TWO: | |
| return true; | |
| case JsonTestEnum::THREE: | |
| return true; | |
| case JsonTestEnum::FOUR: | |
| return true; | |
| default: | |
| return false; | |
| } | |
| } | |
| static ::std::ostream& SendToOstream( | |
| ::std::ostream& emboss_reserved_local_os, | |
| JsonTestEnum emboss_reserved_local_value) { | |
| const char* emboss_reserved_local_name = | |
| TryToGetNameFromEnum(emboss_reserved_local_value); | |
| if (emboss_reserved_local_name == nullptr) { | |
| emboss_reserved_local_os | |
| << static_cast</**/ ::std::underlying_type<JsonTestEnum>::type>( | |
| emboss_reserved_local_value); | |
| } else { | |
| emboss_reserved_local_os << emboss_reserved_local_name; | |
| } | |
| return emboss_reserved_local_os; | |
| } | |
| }; | |
| static inline bool TryToGetEnumFromName( | |
| const char* emboss_reserved_local_name, | |
| JsonTestEnum* emboss_reserved_local_result) { | |
| return EnumTraits<JsonTestEnum>::TryToGetEnumFromName( | |
| emboss_reserved_local_name, emboss_reserved_local_result); | |
| } | |
| static inline const char* TryToGetNameFromEnum( | |
| JsonTestEnum emboss_reserved_local_value) { | |
| return EnumTraits<JsonTestEnum>::TryToGetNameFromEnum( | |
| emboss_reserved_local_value); | |
| } | |
| static inline bool EnumIsKnown(JsonTestEnum emboss_reserved_local_value) { | |
| return EnumTraits<JsonTestEnum>::EnumIsKnown(emboss_reserved_local_value); | |
| } | |
| static inline ::std::ostream& operator<<( | |
| ::std::ostream& emboss_reserved_local_os, | |
| JsonTestEnum emboss_reserved_local_value) { | |
| return EnumTraits<JsonTestEnum>::SendToOstream(emboss_reserved_local_os, | |
| emboss_reserved_local_value); | |
| } | |
| namespace JsonTestArrayStruct {} // namespace JsonTestArrayStruct | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonTestArrayStructView; | |
| template <class Storage> | |
| class GenericJsonTestArrayStructView final { | |
| public: | |
| GenericJsonTestArrayStructView() : backing_() {} | |
| explicit GenericJsonTestArrayStructView(Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericJsonTestArrayStructView( | |
| const GenericJsonTestArrayStructView<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template <typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericJsonTestArrayStructView< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericJsonTestArrayStructView(Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericJsonTestArrayStructView(Arg0&& emboss_reserved_local_arg0, | |
| Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericJsonTestArrayStructView<Storage>& operator=( | |
| const GenericJsonTestArrayStructView<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_element_one().Known()) return false; | |
| if (has_element_one().ValueOrDefault() && !element_one().Ok()) return false; | |
| if (!has_element_two().Known()) return false; | |
| if (has_element_two().ValueOrDefault() && !element_two().Ok()) return false; | |
| if (!has_element_three().Known()) return false; | |
| if (has_element_three().ValueOrDefault() && !element_three().Ok()) | |
| return false; | |
| if (!has_element_four().Known()) return false; | |
| if (has_element_four().ValueOrDefault() && !element_four().Ok()) | |
| return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBytes() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericJsonTestArrayStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_element_one().Known()) return false; | |
| if (!emboss_reserved_local_other.has_element_one().Known()) return false; | |
| if (emboss_reserved_local_other.has_element_one().ValueOrDefault() && | |
| !has_element_one().ValueOrDefault()) | |
| return false; | |
| if (has_element_one().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_element_one().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_one().ValueOrDefault() && | |
| has_element_one().ValueOrDefault() && | |
| !element_one().Equals(emboss_reserved_local_other.element_one())) | |
| return false; | |
| if (!has_element_two().Known()) return false; | |
| if (!emboss_reserved_local_other.has_element_two().Known()) return false; | |
| if (emboss_reserved_local_other.has_element_two().ValueOrDefault() && | |
| !has_element_two().ValueOrDefault()) | |
| return false; | |
| if (has_element_two().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_element_two().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_two().ValueOrDefault() && | |
| has_element_two().ValueOrDefault() && | |
| !element_two().Equals(emboss_reserved_local_other.element_two())) | |
| return false; | |
| if (!has_element_three().Known()) return false; | |
| if (!emboss_reserved_local_other.has_element_three().Known()) return false; | |
| if (emboss_reserved_local_other.has_element_three().ValueOrDefault() && | |
| !has_element_three().ValueOrDefault()) | |
| return false; | |
| if (has_element_three().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_element_three().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_three().ValueOrDefault() && | |
| has_element_three().ValueOrDefault() && | |
| !element_three().Equals(emboss_reserved_local_other.element_three())) | |
| return false; | |
| if (!has_element_four().Known()) return false; | |
| if (!emboss_reserved_local_other.has_element_four().Known()) return false; | |
| if (emboss_reserved_local_other.has_element_four().ValueOrDefault() && | |
| !has_element_four().ValueOrDefault()) | |
| return false; | |
| if (has_element_four().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_element_four().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_four().ValueOrDefault() && | |
| has_element_four().ValueOrDefault() && | |
| !element_four().Equals(emboss_reserved_local_other.element_four())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericJsonTestArrayStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_element_one().ValueOr(false) && | |
| !has_element_one().ValueOr(false)) | |
| return false; | |
| if (has_element_one().ValueOr(false) && | |
| !emboss_reserved_local_other.has_element_one().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_one().ValueOr(false) && | |
| has_element_one().ValueOr(false) && | |
| !element_one().UncheckedEquals( | |
| emboss_reserved_local_other.element_one())) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_two().ValueOr(false) && | |
| !has_element_two().ValueOr(false)) | |
| return false; | |
| if (has_element_two().ValueOr(false) && | |
| !emboss_reserved_local_other.has_element_two().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_two().ValueOr(false) && | |
| has_element_two().ValueOr(false) && | |
| !element_two().UncheckedEquals( | |
| emboss_reserved_local_other.element_two())) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_three().ValueOr(false) && | |
| !has_element_three().ValueOr(false)) | |
| return false; | |
| if (has_element_three().ValueOr(false) && | |
| !emboss_reserved_local_other.has_element_three().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_three().ValueOr(false) && | |
| has_element_three().ValueOr(false) && | |
| !element_three().UncheckedEquals( | |
| emboss_reserved_local_other.element_three())) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_four().ValueOr(false) && | |
| !has_element_four().ValueOr(false)) | |
| return false; | |
| if (has_element_four().ValueOr(false) && | |
| !emboss_reserved_local_other.has_element_four().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_element_four().ValueOr(false) && | |
| has_element_four().ValueOr(false) && | |
| !element_four().UncheckedEquals( | |
| emboss_reserved_local_other.element_four())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom(GenericJsonTestArrayStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericJsonTestArrayStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericJsonTestArrayStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "element_one") { | |
| if (!element_one().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "element_two") { | |
| if (!element_two().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "element_three") { | |
| if (!element_three().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "element_four") { | |
| if (!element_four().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_element_one().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| element_one().IsAggregate() || element_one().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"element_one\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("element_one: "); | |
| } | |
| element_one().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !element_one().IsAggregate() && !element_one().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# element_one: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_element_two().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| element_two().IsAggregate() || element_two().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"element_two\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("element_two: "); | |
| } | |
| element_two().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !element_two().IsAggregate() && !element_two().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# element_two: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_element_three().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| element_three().IsAggregate() || element_three().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"element_three\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("element_three: "); | |
| } | |
| element_three().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !element_three().IsAggregate() && !element_three().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# element_three: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_element_four().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| element_four().IsAggregate() || element_four().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"element_four\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("element_four: "); | |
| } | |
| element_four().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !element_four().IsAggregate() && !element_four().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# element_four: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| element_one() const; | |
| ::emboss::support::Maybe<bool> has_element_one() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| element_two() const; | |
| ::emboss::support::Maybe<bool> has_element_two() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| element_three() const; | |
| ::emboss::support::Maybe<bool> has_element_three() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 3>>, | |
| 8>> | |
| element_four() const; | |
| ::emboss::support::Maybe<bool> has_element_four() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| IntrinsicSizeInBytes() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericJsonTestArrayStructView; | |
| }; | |
| using JsonTestArrayStructView = GenericJsonTestArrayStructView< | |
| /**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using JsonTestArrayStructWriter = GenericJsonTestArrayStructView< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonTestArrayStructView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericJsonTestArrayStructView< | |
| GenericJsonTestArrayStructView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericJsonTestArrayStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeJsonTestArrayStructView(T&& emboss_reserved_local_arg) { | |
| return GenericJsonTestArrayStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericJsonTestArrayStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeJsonTestArrayStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonTestArrayStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericJsonTestArrayStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedJsonTestArrayStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonTestArrayStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| namespace JsonTestStruct { | |
| namespace EmbossReservedAnonymousField1 { | |
| } // namespace EmbossReservedAnonymousField1 | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; | |
| template <class Storage> | |
| class GenericEmbossReservedAnonymousField1View final { | |
| public: | |
| GenericEmbossReservedAnonymousField1View() : backing_() {} | |
| explicit GenericEmbossReservedAnonymousField1View( | |
| Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericEmbossReservedAnonymousField1View( | |
| const GenericEmbossReservedAnonymousField1View<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template < | |
| typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericEmbossReservedAnonymousField1View( | |
| Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericEmbossReservedAnonymousField1View( | |
| Arg0&& emboss_reserved_local_arg0, Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericEmbossReservedAnonymousField1View<Storage>& operator=( | |
| const GenericEmbossReservedAnonymousField1View<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_seven_bit_uint().Known()) return false; | |
| if (has_seven_bit_uint().ValueOrDefault() && !seven_bit_uint().Ok()) | |
| return false; | |
| if (!has_one_bit_flag().Known()) return false; | |
| if (has_one_bit_flag().ValueOrDefault() && !one_bit_flag().Ok()) | |
| return false; | |
| if (!has_IntrinsicSizeInBits().Known()) return false; | |
| if (has_IntrinsicSizeInBits().ValueOrDefault() && | |
| !IntrinsicSizeInBits().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBits().Known()) return false; | |
| if (has_MaxSizeInBits().ValueOrDefault() && !MaxSizeInBits().Ok()) | |
| return false; | |
| if (!has_MinSizeInBits().Known()) return false; | |
| if (has_MinSizeInBits().ValueOrDefault() && !MinSizeInBits().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBits().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBits().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBits().UncheckedRead()) && | |
| backing_.SizeInBits() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBits().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBits() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBits().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBits().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericEmbossReservedAnonymousField1View<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_seven_bit_uint().Known()) return false; | |
| if (!emboss_reserved_local_other.has_seven_bit_uint().Known()) return false; | |
| if (emboss_reserved_local_other.has_seven_bit_uint().ValueOrDefault() && | |
| !has_seven_bit_uint().ValueOrDefault()) | |
| return false; | |
| if (has_seven_bit_uint().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_seven_bit_uint().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_seven_bit_uint().ValueOrDefault() && | |
| has_seven_bit_uint().ValueOrDefault() && | |
| !seven_bit_uint().Equals(emboss_reserved_local_other.seven_bit_uint())) | |
| return false; | |
| if (!has_one_bit_flag().Known()) return false; | |
| if (!emboss_reserved_local_other.has_one_bit_flag().Known()) return false; | |
| if (emboss_reserved_local_other.has_one_bit_flag().ValueOrDefault() && | |
| !has_one_bit_flag().ValueOrDefault()) | |
| return false; | |
| if (has_one_bit_flag().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_one_bit_flag().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_one_bit_flag().ValueOrDefault() && | |
| has_one_bit_flag().ValueOrDefault() && | |
| !one_bit_flag().Equals(emboss_reserved_local_other.one_bit_flag())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericEmbossReservedAnonymousField1View<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_seven_bit_uint().ValueOr(false) && | |
| !has_seven_bit_uint().ValueOr(false)) | |
| return false; | |
| if (has_seven_bit_uint().ValueOr(false) && | |
| !emboss_reserved_local_other.has_seven_bit_uint().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_seven_bit_uint().ValueOr(false) && | |
| has_seven_bit_uint().ValueOr(false) && | |
| !seven_bit_uint().UncheckedEquals( | |
| emboss_reserved_local_other.seven_bit_uint())) | |
| return false; | |
| if (emboss_reserved_local_other.has_one_bit_flag().ValueOr(false) && | |
| !has_one_bit_flag().ValueOr(false)) | |
| return false; | |
| if (has_one_bit_flag().ValueOr(false) && | |
| !emboss_reserved_local_other.has_one_bit_flag().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_one_bit_flag().ValueOr(false) && | |
| has_one_bit_flag().ValueOr(false) && | |
| !one_bit_flag().UncheckedEquals( | |
| emboss_reserved_local_other.one_bit_flag())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom(GenericEmbossReservedAnonymousField1View<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericEmbossReservedAnonymousField1View<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBits().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericEmbossReservedAnonymousField1View<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBits().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "seven_bit_uint") { | |
| if (!seven_bit_uint().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "one_bit_flag") { | |
| if (!one_bit_flag().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_seven_bit_uint().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| seven_bit_uint().IsAggregate() || seven_bit_uint().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"seven_bit_uint\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("seven_bit_uint: "); | |
| } | |
| seven_bit_uint().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !seven_bit_uint().IsAggregate() && !seven_bit_uint().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# seven_bit_uint: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_one_bit_flag().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| one_bit_flag().IsAggregate() || one_bit_flag().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"one_bit_flag\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("one_bit_flag: "); | |
| } | |
| one_bit_flag().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !one_bit_flag().IsAggregate() && !one_bit_flag().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# one_bit_flag: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 7, ::emboss::support::AllValuesAreOk>, | |
| typename Storage::template OffsetStorageType</**/ 0, 0>> | |
| seven_bit_uint() const; | |
| ::emboss::support::Maybe<bool> has_seven_bit_uint() const; | |
| public: | |
| typename ::emboss::prelude::FlagView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 1, ::emboss::support::AllValuesAreOk>, | |
| typename Storage::template OffsetStorageType</**/ 0, 7>> | |
| one_bit_flag() const; | |
| ::emboss::support::Maybe<bool> has_one_bit_flag() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBitsView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBitsView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBitsView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBitsView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBitsView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBitsView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBitsView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBitsView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBitsView | |
| IntrinsicSizeInBits() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBitsView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBits() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBitsView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBitsView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBitsView( | |
| const EmbossReservedDollarVirtualMaxSizeInBitsView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBitsView( | |
| EmbossReservedDollarVirtualMaxSizeInBitsView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBitsView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBitsView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBitsView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBitsView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBitsView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBitsView | |
| MaxSizeInBits() { | |
| return EmbossReservedDollarVirtualMaxSizeInBitsView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBits() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBitsView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBitsView() {} | |
| EmbossReservedDollarVirtualMinSizeInBitsView( | |
| const EmbossReservedDollarVirtualMinSizeInBitsView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBitsView( | |
| EmbossReservedDollarVirtualMinSizeInBitsView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBitsView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBitsView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBitsView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBitsView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBitsView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBitsView | |
| MinSizeInBits() { | |
| return EmbossReservedDollarVirtualMinSizeInBitsView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBits() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericEmbossReservedAnonymousField1View; | |
| }; | |
| using EmbossReservedAnonymousField1View = | |
| GenericEmbossReservedAnonymousField1View< | |
| /**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using EmbossReservedAnonymousField1Writer = | |
| GenericEmbossReservedAnonymousField1View< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< | |
| GenericEmbossReservedAnonymousField1View<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericEmbossReservedAnonymousField1View< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeEmbossReservedAnonymousField1View(T&& emboss_reserved_local_arg) { | |
| return GenericEmbossReservedAnonymousField1View< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericEmbossReservedAnonymousField1View< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeEmbossReservedAnonymousField1View( | |
| T* emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { | |
| return GenericEmbossReservedAnonymousField1View< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericEmbossReservedAnonymousField1View< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedEmbossReservedAnonymousField1View( | |
| T* emboss_reserved_local_data, ::std::size_t emboss_reserved_local_size) { | |
| return GenericEmbossReservedAnonymousField1View< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| } // namespace JsonTestStruct | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonTestStructView; | |
| template <class Storage> | |
| class GenericJsonTestStructView final { | |
| public: | |
| GenericJsonTestStructView() : backing_() {} | |
| explicit GenericJsonTestStructView(Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericJsonTestStructView(const GenericJsonTestStructView<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template <typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericJsonTestStructView< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericJsonTestStructView(Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericJsonTestStructView(Arg0&& emboss_reserved_local_arg0, | |
| Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericJsonTestStructView<Storage>& operator=( | |
| const GenericJsonTestStructView<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_one_byte_enum().Known()) return false; | |
| if (has_one_byte_enum().ValueOrDefault() && !one_byte_enum().Ok()) | |
| return false; | |
| if (!has_emboss_reserved_anonymous_field_1().Known()) return false; | |
| if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && | |
| !emboss_reserved_anonymous_field_1().Ok()) | |
| return false; | |
| if (!has_one_byte_uint().Known()) return false; | |
| if (has_one_byte_uint().ValueOrDefault() && !one_byte_uint().Ok()) | |
| return false; | |
| if (!has_two_byte_uint().Known()) return false; | |
| if (has_two_byte_uint().ValueOrDefault() && !two_byte_uint().Ok()) | |
| return false; | |
| if (!has_four_byte_uint().Known()) return false; | |
| if (has_four_byte_uint().ValueOrDefault() && !four_byte_uint().Ok()) | |
| return false; | |
| if (!has_eight_byte_uint().Known()) return false; | |
| if (has_eight_byte_uint().ValueOrDefault() && !eight_byte_uint().Ok()) | |
| return false; | |
| if (!has_uint8_array().Known()) return false; | |
| if (has_uint8_array().ValueOrDefault() && !uint8_array().Ok()) return false; | |
| if (!has_uint16_array().Known()) return false; | |
| if (has_uint16_array().ValueOrDefault() && !uint16_array().Ok()) | |
| return false; | |
| if (!has_struct_array().Known()) return false; | |
| if (has_struct_array().ValueOrDefault() && !struct_array().Ok()) | |
| return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| if (!has_seven_bit_uint().Known()) return false; | |
| if (has_seven_bit_uint().ValueOrDefault() && !seven_bit_uint().Ok()) | |
| return false; | |
| if (!has_one_bit_flag().Known()) return false; | |
| if (has_one_bit_flag().ValueOrDefault() && !one_bit_flag().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBytes() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericJsonTestStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_one_byte_enum().Known()) return false; | |
| if (!emboss_reserved_local_other.has_one_byte_enum().Known()) return false; | |
| if (emboss_reserved_local_other.has_one_byte_enum().ValueOrDefault() && | |
| !has_one_byte_enum().ValueOrDefault()) | |
| return false; | |
| if (has_one_byte_enum().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_one_byte_enum().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_one_byte_enum().ValueOrDefault() && | |
| has_one_byte_enum().ValueOrDefault() && | |
| !one_byte_enum().Equals(emboss_reserved_local_other.one_byte_enum())) | |
| return false; | |
| if (!has_emboss_reserved_anonymous_field_1().Known()) return false; | |
| if (!emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1() | |
| .Known()) | |
| return false; | |
| if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1() | |
| .ValueOrDefault() && | |
| !has_emboss_reserved_anonymous_field_1().ValueOrDefault()) | |
| return false; | |
| if (has_emboss_reserved_anonymous_field_1().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1() | |
| .ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1() | |
| .ValueOrDefault() && | |
| has_emboss_reserved_anonymous_field_1().ValueOrDefault() && | |
| !emboss_reserved_anonymous_field_1().Equals( | |
| emboss_reserved_local_other.emboss_reserved_anonymous_field_1())) | |
| return false; | |
| if (!has_one_byte_uint().Known()) return false; | |
| if (!emboss_reserved_local_other.has_one_byte_uint().Known()) return false; | |
| if (emboss_reserved_local_other.has_one_byte_uint().ValueOrDefault() && | |
| !has_one_byte_uint().ValueOrDefault()) | |
| return false; | |
| if (has_one_byte_uint().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_one_byte_uint().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_one_byte_uint().ValueOrDefault() && | |
| has_one_byte_uint().ValueOrDefault() && | |
| !one_byte_uint().Equals(emboss_reserved_local_other.one_byte_uint())) | |
| return false; | |
| if (!has_two_byte_uint().Known()) return false; | |
| if (!emboss_reserved_local_other.has_two_byte_uint().Known()) return false; | |
| if (emboss_reserved_local_other.has_two_byte_uint().ValueOrDefault() && | |
| !has_two_byte_uint().ValueOrDefault()) | |
| return false; | |
| if (has_two_byte_uint().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_two_byte_uint().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_two_byte_uint().ValueOrDefault() && | |
| has_two_byte_uint().ValueOrDefault() && | |
| !two_byte_uint().Equals(emboss_reserved_local_other.two_byte_uint())) | |
| return false; | |
| if (!has_four_byte_uint().Known()) return false; | |
| if (!emboss_reserved_local_other.has_four_byte_uint().Known()) return false; | |
| if (emboss_reserved_local_other.has_four_byte_uint().ValueOrDefault() && | |
| !has_four_byte_uint().ValueOrDefault()) | |
| return false; | |
| if (has_four_byte_uint().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_four_byte_uint().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_four_byte_uint().ValueOrDefault() && | |
| has_four_byte_uint().ValueOrDefault() && | |
| !four_byte_uint().Equals(emboss_reserved_local_other.four_byte_uint())) | |
| return false; | |
| if (!has_eight_byte_uint().Known()) return false; | |
| if (!emboss_reserved_local_other.has_eight_byte_uint().Known()) | |
| return false; | |
| if (emboss_reserved_local_other.has_eight_byte_uint().ValueOrDefault() && | |
| !has_eight_byte_uint().ValueOrDefault()) | |
| return false; | |
| if (has_eight_byte_uint().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_eight_byte_uint().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_eight_byte_uint().ValueOrDefault() && | |
| has_eight_byte_uint().ValueOrDefault() && | |
| !eight_byte_uint().Equals( | |
| emboss_reserved_local_other.eight_byte_uint())) | |
| return false; | |
| if (!has_uint8_array().Known()) return false; | |
| if (!emboss_reserved_local_other.has_uint8_array().Known()) return false; | |
| if (emboss_reserved_local_other.has_uint8_array().ValueOrDefault() && | |
| !has_uint8_array().ValueOrDefault()) | |
| return false; | |
| if (has_uint8_array().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_uint8_array().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_uint8_array().ValueOrDefault() && | |
| has_uint8_array().ValueOrDefault() && | |
| !uint8_array().Equals(emboss_reserved_local_other.uint8_array())) | |
| return false; | |
| if (!has_uint16_array().Known()) return false; | |
| if (!emboss_reserved_local_other.has_uint16_array().Known()) return false; | |
| if (emboss_reserved_local_other.has_uint16_array().ValueOrDefault() && | |
| !has_uint16_array().ValueOrDefault()) | |
| return false; | |
| if (has_uint16_array().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_uint16_array().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_uint16_array().ValueOrDefault() && | |
| has_uint16_array().ValueOrDefault() && | |
| !uint16_array().Equals(emboss_reserved_local_other.uint16_array())) | |
| return false; | |
| if (!has_struct_array().Known()) return false; | |
| if (!emboss_reserved_local_other.has_struct_array().Known()) return false; | |
| if (emboss_reserved_local_other.has_struct_array().ValueOrDefault() && | |
| !has_struct_array().ValueOrDefault()) | |
| return false; | |
| if (has_struct_array().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_struct_array().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_struct_array().ValueOrDefault() && | |
| has_struct_array().ValueOrDefault() && | |
| !struct_array().Equals(emboss_reserved_local_other.struct_array())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericJsonTestStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_one_byte_enum().ValueOr(false) && | |
| !has_one_byte_enum().ValueOr(false)) | |
| return false; | |
| if (has_one_byte_enum().ValueOr(false) && | |
| !emboss_reserved_local_other.has_one_byte_enum().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_one_byte_enum().ValueOr(false) && | |
| has_one_byte_enum().ValueOr(false) && | |
| !one_byte_enum().UncheckedEquals( | |
| emboss_reserved_local_other.one_byte_enum())) | |
| return false; | |
| if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1() | |
| .ValueOr(false) && | |
| !has_emboss_reserved_anonymous_field_1().ValueOr(false)) | |
| return false; | |
| if (has_emboss_reserved_anonymous_field_1().ValueOr(false) && | |
| !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1() | |
| .ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_1() | |
| .ValueOr(false) && | |
| has_emboss_reserved_anonymous_field_1().ValueOr(false) && | |
| !emboss_reserved_anonymous_field_1().UncheckedEquals( | |
| emboss_reserved_local_other.emboss_reserved_anonymous_field_1())) | |
| return false; | |
| if (emboss_reserved_local_other.has_one_byte_uint().ValueOr(false) && | |
| !has_one_byte_uint().ValueOr(false)) | |
| return false; | |
| if (has_one_byte_uint().ValueOr(false) && | |
| !emboss_reserved_local_other.has_one_byte_uint().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_one_byte_uint().ValueOr(false) && | |
| has_one_byte_uint().ValueOr(false) && | |
| !one_byte_uint().UncheckedEquals( | |
| emboss_reserved_local_other.one_byte_uint())) | |
| return false; | |
| if (emboss_reserved_local_other.has_two_byte_uint().ValueOr(false) && | |
| !has_two_byte_uint().ValueOr(false)) | |
| return false; | |
| if (has_two_byte_uint().ValueOr(false) && | |
| !emboss_reserved_local_other.has_two_byte_uint().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_two_byte_uint().ValueOr(false) && | |
| has_two_byte_uint().ValueOr(false) && | |
| !two_byte_uint().UncheckedEquals( | |
| emboss_reserved_local_other.two_byte_uint())) | |
| return false; | |
| if (emboss_reserved_local_other.has_four_byte_uint().ValueOr(false) && | |
| !has_four_byte_uint().ValueOr(false)) | |
| return false; | |
| if (has_four_byte_uint().ValueOr(false) && | |
| !emboss_reserved_local_other.has_four_byte_uint().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_four_byte_uint().ValueOr(false) && | |
| has_four_byte_uint().ValueOr(false) && | |
| !four_byte_uint().UncheckedEquals( | |
| emboss_reserved_local_other.four_byte_uint())) | |
| return false; | |
| if (emboss_reserved_local_other.has_eight_byte_uint().ValueOr(false) && | |
| !has_eight_byte_uint().ValueOr(false)) | |
| return false; | |
| if (has_eight_byte_uint().ValueOr(false) && | |
| !emboss_reserved_local_other.has_eight_byte_uint().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_eight_byte_uint().ValueOr(false) && | |
| has_eight_byte_uint().ValueOr(false) && | |
| !eight_byte_uint().UncheckedEquals( | |
| emboss_reserved_local_other.eight_byte_uint())) | |
| return false; | |
| if (emboss_reserved_local_other.has_uint8_array().ValueOr(false) && | |
| !has_uint8_array().ValueOr(false)) | |
| return false; | |
| if (has_uint8_array().ValueOr(false) && | |
| !emboss_reserved_local_other.has_uint8_array().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_uint8_array().ValueOr(false) && | |
| has_uint8_array().ValueOr(false) && | |
| !uint8_array().UncheckedEquals( | |
| emboss_reserved_local_other.uint8_array())) | |
| return false; | |
| if (emboss_reserved_local_other.has_uint16_array().ValueOr(false) && | |
| !has_uint16_array().ValueOr(false)) | |
| return false; | |
| if (has_uint16_array().ValueOr(false) && | |
| !emboss_reserved_local_other.has_uint16_array().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_uint16_array().ValueOr(false) && | |
| has_uint16_array().ValueOr(false) && | |
| !uint16_array().UncheckedEquals( | |
| emboss_reserved_local_other.uint16_array())) | |
| return false; | |
| if (emboss_reserved_local_other.has_struct_array().ValueOr(false) && | |
| !has_struct_array().ValueOr(false)) | |
| return false; | |
| if (has_struct_array().ValueOr(false) && | |
| !emboss_reserved_local_other.has_struct_array().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_struct_array().ValueOr(false) && | |
| has_struct_array().ValueOr(false) && | |
| !struct_array().UncheckedEquals( | |
| emboss_reserved_local_other.struct_array())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom(GenericJsonTestStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericJsonTestStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericJsonTestStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "one_byte_enum") { | |
| if (!one_byte_enum().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "seven_bit_uint") { | |
| if (!seven_bit_uint().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "one_bit_flag") { | |
| if (!one_bit_flag().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "one_byte_uint") { | |
| if (!one_byte_uint().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "two_byte_uint") { | |
| if (!two_byte_uint().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "four_byte_uint") { | |
| if (!four_byte_uint().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "eight_byte_uint") { | |
| if (!eight_byte_uint().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "uint8_array") { | |
| if (!uint8_array().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "uint16_array") { | |
| if (!uint16_array().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "struct_array") { | |
| if (!struct_array().UpdateFromTextStream( | |
| emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_one_byte_enum().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| one_byte_enum().IsAggregate() || one_byte_enum().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"one_byte_enum\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("one_byte_enum: "); | |
| } | |
| one_byte_enum().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !one_byte_enum().IsAggregate() && !one_byte_enum().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# one_byte_enum: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_seven_bit_uint().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| seven_bit_uint().IsAggregate() || seven_bit_uint().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"seven_bit_uint\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("seven_bit_uint: "); | |
| } | |
| seven_bit_uint().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !seven_bit_uint().IsAggregate() && !seven_bit_uint().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# seven_bit_uint: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_one_bit_flag().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| one_bit_flag().IsAggregate() || one_bit_flag().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"one_bit_flag\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("one_bit_flag: "); | |
| } | |
| one_bit_flag().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !one_bit_flag().IsAggregate() && !one_bit_flag().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# one_bit_flag: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_one_byte_uint().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| one_byte_uint().IsAggregate() || one_byte_uint().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"one_byte_uint\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("one_byte_uint: "); | |
| } | |
| one_byte_uint().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !one_byte_uint().IsAggregate() && !one_byte_uint().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# one_byte_uint: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_two_byte_uint().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| two_byte_uint().IsAggregate() || two_byte_uint().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"two_byte_uint\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("two_byte_uint: "); | |
| } | |
| two_byte_uint().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !two_byte_uint().IsAggregate() && !two_byte_uint().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# two_byte_uint: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_four_byte_uint().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| four_byte_uint().IsAggregate() || four_byte_uint().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"four_byte_uint\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("four_byte_uint: "); | |
| } | |
| four_byte_uint().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !four_byte_uint().IsAggregate() && !four_byte_uint().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# four_byte_uint: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_eight_byte_uint().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| eight_byte_uint().IsAggregate() || eight_byte_uint().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"eight_byte_uint\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("eight_byte_uint: "); | |
| } | |
| eight_byte_uint().WriteToTextStream( | |
| emboss_reserved_local_stream, emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !eight_byte_uint().IsAggregate() && !eight_byte_uint().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# eight_byte_uint: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_uint8_array().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| uint8_array().IsAggregate() || uint8_array().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"uint8_array\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("uint8_array: "); | |
| } | |
| uint8_array().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !uint8_array().IsAggregate() && !uint8_array().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# uint8_array: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_uint16_array().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| uint16_array().IsAggregate() || uint16_array().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"uint16_array\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("uint16_array: "); | |
| } | |
| uint16_array().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !uint16_array().IsAggregate() && !uint16_array().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# uint16_array: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_struct_array().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| struct_array().IsAggregate() || struct_array().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"struct_array\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("struct_array: "); | |
| } | |
| struct_array().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !struct_array().IsAggregate() && !struct_array().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# struct_array: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonTestEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| one_byte_enum() const; | |
| ::emboss::support::Maybe<bool> has_one_byte_enum() const; | |
| private: | |
| typename ::emboss::test::JsonTestStruct:: | |
| GenericEmbossReservedAnonymousField1View< | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| emboss_reserved_anonymous_field_1() const; | |
| ::emboss::support::Maybe<bool> has_emboss_reserved_anonymous_field_1() const; | |
| public: | |
| auto seven_bit_uint() const | |
| -> decltype(this->emboss_reserved_anonymous_field_1().seven_bit_uint()) { | |
| return has_seven_bit_uint().ValueOrDefault() | |
| ? emboss_reserved_anonymous_field_1().seven_bit_uint() | |
| : decltype(this->emboss_reserved_anonymous_field_1() | |
| .seven_bit_uint())(); | |
| } | |
| ::emboss::support::Maybe<bool> has_seven_bit_uint() const; | |
| public: | |
| auto one_bit_flag() const | |
| -> decltype(this->emboss_reserved_anonymous_field_1().one_bit_flag()) { | |
| return has_one_bit_flag().ValueOrDefault() | |
| ? emboss_reserved_anonymous_field_1().one_bit_flag() | |
| : decltype(this->emboss_reserved_anonymous_field_1() | |
| .one_bit_flag())(); | |
| } | |
| ::emboss::support::Maybe<bool> has_one_bit_flag() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| one_byte_uint() const; | |
| ::emboss::support::Maybe<bool> has_one_byte_uint() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 3>>, | |
| 16>> | |
| two_byte_uint() const; | |
| ::emboss::support::Maybe<bool> has_two_byte_uint() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 32, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 5>>, | |
| 32>> | |
| four_byte_uint() const; | |
| ::emboss::support::Maybe<bool> has_four_byte_uint() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 9>>, | |
| 64>> | |
| eight_byte_uint() const; | |
| ::emboss::support::Maybe<bool> has_eight_byte_uint() const; | |
| public: | |
| typename ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 17>::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 17>, 1, 8> | |
| uint8_array() const; | |
| ::emboss::support::Maybe<bool> has_uint8_array() const; | |
| public: | |
| typename ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 27>::template OffsetStorageType</**/ 2, 0>>, | |
| 16>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 27>, 2, 8> | |
| uint16_array() const; | |
| ::emboss::support::Maybe<bool> has_uint16_array() const; | |
| public: | |
| typename ::emboss::support::GenericArrayView< | |
| typename ::emboss::test::GenericJsonTestArrayStructView< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 47>::template OffsetStorageType</**/ 4, 0>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 47>, 4, 8> | |
| struct_array() const; | |
| ::emboss::support::Maybe<bool> has_struct_array() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| IntrinsicSizeInBytes() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericJsonTestStructView; | |
| }; | |
| using JsonTestStructView = | |
| GenericJsonTestStructView</**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using JsonTestStructWriter = GenericJsonTestStructView< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonTestStructView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericJsonTestStructView< | |
| GenericJsonTestStructView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericJsonTestStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeJsonTestStructView(T&& emboss_reserved_local_arg) { | |
| return GenericJsonTestStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericJsonTestStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeJsonTestStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonTestStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericJsonTestStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedJsonTestStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonTestStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| enum class JsonNarrowEnum : ::std::uint16_t { | |
| NARROW_ONE = static_cast</**/ ::std::int32_t>(1LL), | |
| }; | |
| template <class Enum> | |
| class EnumTraits; | |
| template <> | |
| class EnumTraits<JsonNarrowEnum> final { | |
| public: | |
| static bool TryToGetEnumFromName( | |
| const char* emboss_reserved_local_name, | |
| JsonNarrowEnum* emboss_reserved_local_result) { | |
| if (emboss_reserved_local_name == nullptr) return false; | |
| if (!strcmp("NARROW_ONE", emboss_reserved_local_name)) { | |
| *emboss_reserved_local_result = JsonNarrowEnum::NARROW_ONE; | |
| return true; | |
| } | |
| return false; | |
| } | |
| static const char* TryToGetNameFromEnum( | |
| JsonNarrowEnum emboss_reserved_local_value) { | |
| switch (emboss_reserved_local_value) { | |
| case JsonNarrowEnum::NARROW_ONE: | |
| return "NARROW_ONE"; | |
| default: | |
| return nullptr; | |
| } | |
| } | |
| static bool EnumIsKnown(JsonNarrowEnum emboss_reserved_local_value) { | |
| switch (emboss_reserved_local_value) { | |
| case JsonNarrowEnum::NARROW_ONE: | |
| return true; | |
| default: | |
| return false; | |
| } | |
| } | |
| static ::std::ostream& SendToOstream( | |
| ::std::ostream& emboss_reserved_local_os, | |
| JsonNarrowEnum emboss_reserved_local_value) { | |
| const char* emboss_reserved_local_name = | |
| TryToGetNameFromEnum(emboss_reserved_local_value); | |
| if (emboss_reserved_local_name == nullptr) { | |
| emboss_reserved_local_os | |
| << static_cast</**/ ::std::underlying_type<JsonNarrowEnum>::type>( | |
| emboss_reserved_local_value); | |
| } else { | |
| emboss_reserved_local_os << emboss_reserved_local_name; | |
| } | |
| return emboss_reserved_local_os; | |
| } | |
| }; | |
| static inline bool TryToGetEnumFromName( | |
| const char* emboss_reserved_local_name, | |
| JsonNarrowEnum* emboss_reserved_local_result) { | |
| return EnumTraits<JsonNarrowEnum>::TryToGetEnumFromName( | |
| emboss_reserved_local_name, emboss_reserved_local_result); | |
| } | |
| static inline const char* TryToGetNameFromEnum( | |
| JsonNarrowEnum emboss_reserved_local_value) { | |
| return EnumTraits<JsonNarrowEnum>::TryToGetNameFromEnum( | |
| emboss_reserved_local_value); | |
| } | |
| static inline bool EnumIsKnown(JsonNarrowEnum emboss_reserved_local_value) { | |
| return EnumTraits<JsonNarrowEnum>::EnumIsKnown(emboss_reserved_local_value); | |
| } | |
| static inline ::std::ostream& operator<<( | |
| ::std::ostream& emboss_reserved_local_os, | |
| JsonNarrowEnum emboss_reserved_local_value) { | |
| return EnumTraits<JsonNarrowEnum>::SendToOstream(emboss_reserved_local_os, | |
| emboss_reserved_local_value); | |
| } | |
| namespace JsonEnumStruct {} // namespace JsonEnumStruct | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonEnumStructView; | |
| template <class Storage> | |
| class GenericJsonEnumStructView final { | |
| public: | |
| GenericJsonEnumStructView() : backing_() {} | |
| explicit GenericJsonEnumStructView(Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericJsonEnumStructView(const GenericJsonEnumStructView<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template <typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericJsonEnumStructView< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericJsonEnumStructView(Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericJsonEnumStructView(Arg0&& emboss_reserved_local_arg0, | |
| Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericJsonEnumStructView<Storage>& operator=( | |
| const GenericJsonEnumStructView<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_wide_enum().Known()) return false; | |
| if (has_wide_enum().ValueOrDefault() && !wide_enum().Ok()) return false; | |
| if (!has_narrow_enum().Known()) return false; | |
| if (has_narrow_enum().ValueOrDefault() && !narrow_enum().Ok()) return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBytes() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericJsonEnumStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_wide_enum().Known()) return false; | |
| if (!emboss_reserved_local_other.has_wide_enum().Known()) return false; | |
| if (emboss_reserved_local_other.has_wide_enum().ValueOrDefault() && | |
| !has_wide_enum().ValueOrDefault()) | |
| return false; | |
| if (has_wide_enum().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_wide_enum().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_wide_enum().ValueOrDefault() && | |
| has_wide_enum().ValueOrDefault() && | |
| !wide_enum().Equals(emboss_reserved_local_other.wide_enum())) | |
| return false; | |
| if (!has_narrow_enum().Known()) return false; | |
| if (!emboss_reserved_local_other.has_narrow_enum().Known()) return false; | |
| if (emboss_reserved_local_other.has_narrow_enum().ValueOrDefault() && | |
| !has_narrow_enum().ValueOrDefault()) | |
| return false; | |
| if (has_narrow_enum().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_narrow_enum().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_narrow_enum().ValueOrDefault() && | |
| has_narrow_enum().ValueOrDefault() && | |
| !narrow_enum().Equals(emboss_reserved_local_other.narrow_enum())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericJsonEnumStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_wide_enum().ValueOr(false) && | |
| !has_wide_enum().ValueOr(false)) | |
| return false; | |
| if (has_wide_enum().ValueOr(false) && | |
| !emboss_reserved_local_other.has_wide_enum().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_wide_enum().ValueOr(false) && | |
| has_wide_enum().ValueOr(false) && | |
| !wide_enum().UncheckedEquals(emboss_reserved_local_other.wide_enum())) | |
| return false; | |
| if (emboss_reserved_local_other.has_narrow_enum().ValueOr(false) && | |
| !has_narrow_enum().ValueOr(false)) | |
| return false; | |
| if (has_narrow_enum().ValueOr(false) && | |
| !emboss_reserved_local_other.has_narrow_enum().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_narrow_enum().ValueOr(false) && | |
| has_narrow_enum().ValueOr(false) && | |
| !narrow_enum().UncheckedEquals( | |
| emboss_reserved_local_other.narrow_enum())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom(GenericJsonEnumStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericJsonEnumStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericJsonEnumStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "wide_enum") { | |
| if (!wide_enum().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "narrow_enum") { | |
| if (!narrow_enum().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_wide_enum().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| wide_enum().IsAggregate() || wide_enum().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"wide_enum\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("wide_enum: "); | |
| } | |
| wide_enum().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !wide_enum().IsAggregate() && !wide_enum().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# wide_enum: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_narrow_enum().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| narrow_enum().IsAggregate() || narrow_enum().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"narrow_enum\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("narrow_enum: "); | |
| } | |
| narrow_enum().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !narrow_enum().IsAggregate() && !narrow_enum().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# narrow_enum: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonTestEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 64>> | |
| wide_enum() const; | |
| ::emboss::support::Maybe<bool> has_wide_enum() const; | |
| public: | |
| typename ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonNarrowEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 8>>, | |
| 16>> | |
| narrow_enum() const; | |
| ::emboss::support::Maybe<bool> has_narrow_enum() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| IntrinsicSizeInBytes() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericJsonEnumStructView; | |
| }; | |
| using JsonEnumStructView = | |
| GenericJsonEnumStructView</**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using JsonEnumStructWriter = GenericJsonEnumStructView< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonEnumStructView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericJsonEnumStructView< | |
| GenericJsonEnumStructView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericJsonEnumStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeJsonEnumStructView(T&& emboss_reserved_local_arg) { | |
| return GenericJsonEnumStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericJsonEnumStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeJsonEnumStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonEnumStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericJsonEnumStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedJsonEnumStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonEnumStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| namespace JsonFloatStruct {} // namespace JsonFloatStruct | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonFloatStructView; | |
| template <class Storage> | |
| class GenericJsonFloatStructView final { | |
| public: | |
| GenericJsonFloatStructView() : backing_() {} | |
| explicit GenericJsonFloatStructView(Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericJsonFloatStructView(const GenericJsonFloatStructView<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template <typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericJsonFloatStructView< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericJsonFloatStructView(Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericJsonFloatStructView(Arg0&& emboss_reserved_local_arg0, | |
| Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericJsonFloatStructView<Storage>& operator=( | |
| const GenericJsonFloatStructView<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_f().Known()) return false; | |
| if (has_f().ValueOrDefault() && !f().Ok()) return false; | |
| if (!has_d().Known()) return false; | |
| if (has_d().ValueOrDefault() && !d().Ok()) return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBytes() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericJsonFloatStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_f().Known()) return false; | |
| if (!emboss_reserved_local_other.has_f().Known()) return false; | |
| if (emboss_reserved_local_other.has_f().ValueOrDefault() && | |
| !has_f().ValueOrDefault()) | |
| return false; | |
| if (has_f().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_f().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_f().ValueOrDefault() && | |
| has_f().ValueOrDefault() && | |
| !f().Equals(emboss_reserved_local_other.f())) | |
| return false; | |
| if (!has_d().Known()) return false; | |
| if (!emboss_reserved_local_other.has_d().Known()) return false; | |
| if (emboss_reserved_local_other.has_d().ValueOrDefault() && | |
| !has_d().ValueOrDefault()) | |
| return false; | |
| if (has_d().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_d().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_d().ValueOrDefault() && | |
| has_d().ValueOrDefault() && | |
| !d().Equals(emboss_reserved_local_other.d())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericJsonFloatStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_f().ValueOr(false) && | |
| !has_f().ValueOr(false)) | |
| return false; | |
| if (has_f().ValueOr(false) && | |
| !emboss_reserved_local_other.has_f().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_f().ValueOr(false) && | |
| has_f().ValueOr(false) && | |
| !f().UncheckedEquals(emboss_reserved_local_other.f())) | |
| return false; | |
| if (emboss_reserved_local_other.has_d().ValueOr(false) && | |
| !has_d().ValueOr(false)) | |
| return false; | |
| if (has_d().ValueOr(false) && | |
| !emboss_reserved_local_other.has_d().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_d().ValueOr(false) && | |
| has_d().ValueOr(false) && | |
| !d().UncheckedEquals(emboss_reserved_local_other.d())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom(GenericJsonFloatStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericJsonFloatStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericJsonFloatStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "f") { | |
| if (!f().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "d") { | |
| if (!d().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_f().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| f().IsAggregate() || f().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"f\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("f: "); | |
| } | |
| f().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !f().IsAggregate() && !f().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# f: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_d().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| d().IsAggregate() || d().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"d\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("d: "); | |
| } | |
| d().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !d().IsAggregate() && !d().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# d: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::prelude::FloatView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 32, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 32>> | |
| f() const; | |
| ::emboss::support::Maybe<bool> has_f() const; | |
| public: | |
| typename ::emboss::prelude::FloatView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 4>>, | |
| 64>> | |
| d() const; | |
| ::emboss::support::Maybe<bool> has_d() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| IntrinsicSizeInBytes() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericJsonFloatStructView; | |
| }; | |
| using JsonFloatStructView = GenericJsonFloatStructView< | |
| /**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using JsonFloatStructWriter = GenericJsonFloatStructView< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonFloatStructView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericJsonFloatStructView< | |
| GenericJsonFloatStructView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericJsonFloatStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeJsonFloatStructView(T&& emboss_reserved_local_arg) { | |
| return GenericJsonFloatStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericJsonFloatStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeJsonFloatStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonFloatStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericJsonFloatStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedJsonFloatStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonFloatStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| namespace JsonOptionalStruct {} // namespace JsonOptionalStruct | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonOptionalStructView; | |
| template <class Storage> | |
| class GenericJsonOptionalStructView final { | |
| public: | |
| GenericJsonOptionalStructView() : backing_() {} | |
| explicit GenericJsonOptionalStructView(Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericJsonOptionalStructView( | |
| const GenericJsonOptionalStructView<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template <typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericJsonOptionalStructView< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericJsonOptionalStructView(Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericJsonOptionalStructView(Arg0&& emboss_reserved_local_arg0, | |
| Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericJsonOptionalStructView<Storage>& operator=( | |
| const GenericJsonOptionalStructView<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_count().Known()) return false; | |
| if (has_count().ValueOrDefault() && !count().Ok()) return false; | |
| if (!has_bytes().Known()) return false; | |
| if (has_bytes().ValueOrDefault() && !bytes().Ok()) return false; | |
| if (!has_tail_present().Known()) return false; | |
| if (has_tail_present().ValueOrDefault() && !tail_present().Ok()) | |
| return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| if (!has_tail().Known()) return false; | |
| if (has_tail().ValueOrDefault() && !tail().Ok()) return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| ::std::size_t SizeInBytes() const { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericJsonOptionalStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_count().Known()) return false; | |
| if (!emboss_reserved_local_other.has_count().Known()) return false; | |
| if (emboss_reserved_local_other.has_count().ValueOrDefault() && | |
| !has_count().ValueOrDefault()) | |
| return false; | |
| if (has_count().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_count().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_count().ValueOrDefault() && | |
| has_count().ValueOrDefault() && | |
| !count().Equals(emboss_reserved_local_other.count())) | |
| return false; | |
| if (!has_bytes().Known()) return false; | |
| if (!emboss_reserved_local_other.has_bytes().Known()) return false; | |
| if (emboss_reserved_local_other.has_bytes().ValueOrDefault() && | |
| !has_bytes().ValueOrDefault()) | |
| return false; | |
| if (has_bytes().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_bytes().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_bytes().ValueOrDefault() && | |
| has_bytes().ValueOrDefault() && | |
| !bytes().Equals(emboss_reserved_local_other.bytes())) | |
| return false; | |
| if (!has_tail().Known()) return false; | |
| if (!emboss_reserved_local_other.has_tail().Known()) return false; | |
| if (emboss_reserved_local_other.has_tail().ValueOrDefault() && | |
| !has_tail().ValueOrDefault()) | |
| return false; | |
| if (has_tail().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_tail().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_tail().ValueOrDefault() && | |
| has_tail().ValueOrDefault() && | |
| !tail().Equals(emboss_reserved_local_other.tail())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericJsonOptionalStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_count().ValueOr(false) && | |
| !has_count().ValueOr(false)) | |
| return false; | |
| if (has_count().ValueOr(false) && | |
| !emboss_reserved_local_other.has_count().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_count().ValueOr(false) && | |
| has_count().ValueOr(false) && | |
| !count().UncheckedEquals(emboss_reserved_local_other.count())) | |
| return false; | |
| if (emboss_reserved_local_other.has_bytes().ValueOr(false) && | |
| !has_bytes().ValueOr(false)) | |
| return false; | |
| if (has_bytes().ValueOr(false) && | |
| !emboss_reserved_local_other.has_bytes().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_bytes().ValueOr(false) && | |
| has_bytes().ValueOr(false) && | |
| !bytes().UncheckedEquals(emboss_reserved_local_other.bytes())) | |
| return false; | |
| if (emboss_reserved_local_other.has_tail().ValueOr(false) && | |
| !has_tail().ValueOr(false)) | |
| return false; | |
| if (has_tail().ValueOr(false) && | |
| !emboss_reserved_local_other.has_tail().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_tail().ValueOr(false) && | |
| has_tail().ValueOr(false) && | |
| !tail().UncheckedEquals(emboss_reserved_local_other.tail())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom(GenericJsonOptionalStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericJsonOptionalStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericJsonOptionalStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "count") { | |
| if (!count().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "bytes") { | |
| if (!bytes().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "tail") { | |
| if (!tail().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_count().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| count().IsAggregate() || count().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"count\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("count: "); | |
| } | |
| count().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !count().IsAggregate() && !count().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# count: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_bytes().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| bytes().IsAggregate() || bytes().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"bytes\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("bytes: "); | |
| } | |
| bytes().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !bytes().IsAggregate() && !bytes().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# bytes: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_tail().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| tail().IsAggregate() || tail().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"tail\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("tail: "); | |
| } | |
| tail().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !tail().IsAggregate() && !tail().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# tail: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_tail_present().ValueOr(false) && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json()) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| tail_present().IsAggregate() || tail_present().Ok()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| emboss_reserved_local_stream->Write("# tail_present: "); | |
| tail_present().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_stream->Write("\n"); | |
| } else { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# tail_present: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| count() const; | |
| ::emboss::support::Maybe<bool> has_count() const; | |
| public: | |
| typename ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8> | |
| bytes() const; | |
| ::emboss::support::Maybe<bool> has_bytes() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| tail() const; | |
| ::emboss::support::Maybe<bool> has_tail() const; | |
| public: | |
| class EmbossReservedVirtualTailPresentView final { | |
| public: | |
| using ValueType = bool; | |
| explicit EmbossReservedVirtualTailPresentView( | |
| const GenericJsonOptionalStructView& emboss_reserved_local_view) | |
| : view_(emboss_reserved_local_view) {} | |
| EmbossReservedVirtualTailPresentView() = delete; | |
| EmbossReservedVirtualTailPresentView( | |
| const EmbossReservedVirtualTailPresentView&) = default; | |
| EmbossReservedVirtualTailPresentView( | |
| EmbossReservedVirtualTailPresentView&&) = default; | |
| EmbossReservedVirtualTailPresentView& operator=( | |
| const EmbossReservedVirtualTailPresentView&) = default; | |
| EmbossReservedVirtualTailPresentView& operator=( | |
| EmbossReservedVirtualTailPresentView&&) = default; | |
| ~EmbossReservedVirtualTailPresentView() = default; | |
| bool Read() const { | |
| EMBOSS_CHECK(view_.has_tail_present().ValueOr(false)); | |
| auto emboss_reserved_local_value = MaybeRead(); | |
| EMBOSS_CHECK(emboss_reserved_local_value.Known()); | |
| EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); | |
| return emboss_reserved_local_value.ValueOrDefault(); | |
| } | |
| bool UncheckedRead() const { return MaybeRead().ValueOrDefault(); } | |
| bool Ok() const { | |
| auto emboss_reserved_local_value = MaybeRead(); | |
| return emboss_reserved_local_value.Known() && | |
| ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); | |
| } | |
| ::emboss::support::Maybe<bool> IsUndefined() const { | |
| const auto emboss_reserved_local_value = MaybeRead(); | |
| return emboss_reserved_local_value.Known() | |
| ? ::emboss::support::Maybe<bool>(false) | |
| : (emboss_reserved_local_value.IsUndefined() | |
| ? ::emboss::support::Maybe<bool>(true) | |
| : ::emboss::support::Maybe<bool>()); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteBooleanViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| private: | |
| ::emboss::support::Maybe</**/ bool> MaybeRead() const { | |
| const auto emboss_reserved_local_subexpr_1 = view_.count(); | |
| const auto emboss_reserved_local_subexpr_2 = | |
| (emboss_reserved_local_subexpr_1.Ok() | |
| ? ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>( | |
| emboss_reserved_local_subexpr_1.UncheckedRead())) | |
| : ::emboss::support::Maybe</**/ ::std::int32_t>()); | |
| const auto emboss_reserved_local_subexpr_3 = | |
| ::emboss::support::GreaterThan</**/ ::std::int32_t, bool, | |
| ::std::int32_t, ::std::int32_t>( | |
| emboss_reserved_local_subexpr_2, | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL))); | |
| return emboss_reserved_local_subexpr_3; | |
| } | |
| static constexpr bool ValueIsOk(bool emboss_reserved_local_value) { | |
| return (void)emboss_reserved_local_value, // Silence -Wunused-parameter | |
| ::emboss::support::Maybe<bool>(true).ValueOr(false); | |
| } | |
| const GenericJsonOptionalStructView view_; | |
| }; | |
| EmbossReservedVirtualTailPresentView tail_present() const; | |
| ::emboss::support::Maybe<bool> has_tail_present() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const GenericJsonOptionalStructView& emboss_reserved_local_view) | |
| : view_(emboss_reserved_local_view) {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = delete; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| ::std::int32_t Read() const { | |
| EMBOSS_CHECK(view_.has_IntrinsicSizeInBytes().ValueOr(false)); | |
| auto emboss_reserved_local_value = MaybeRead(); | |
| EMBOSS_CHECK(emboss_reserved_local_value.Known()); | |
| EMBOSS_CHECK(ValueIsOk(emboss_reserved_local_value.ValueOrDefault())); | |
| return emboss_reserved_local_value.ValueOrDefault(); | |
| } | |
| ::std::int32_t UncheckedRead() const { | |
| return MaybeRead().ValueOrDefault(); | |
| } | |
| bool Ok() const { | |
| auto emboss_reserved_local_value = MaybeRead(); | |
| return emboss_reserved_local_value.Known() && | |
| ValueIsOk(emboss_reserved_local_value.ValueOrDefault()); | |
| } | |
| ::emboss::support::Maybe<bool> IsUndefined() const { | |
| const auto emboss_reserved_local_value = MaybeRead(); | |
| return emboss_reserved_local_value.Known() | |
| ? ::emboss::support::Maybe<bool>(false) | |
| : (emboss_reserved_local_value.IsUndefined() | |
| ? ::emboss::support::Maybe<bool>(true) | |
| : ::emboss::support::Maybe<bool>()); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| private: | |
| ::emboss::support::Maybe</**/ ::std::int32_t> MaybeRead() const { | |
| const auto emboss_reserved_local_subexpr_1 = view_.count(); | |
| const auto emboss_reserved_local_subexpr_2 = | |
| (emboss_reserved_local_subexpr_1.Ok() | |
| ? ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>( | |
| emboss_reserved_local_subexpr_1.UncheckedRead())) | |
| : ::emboss::support::Maybe</**/ ::std::int32_t>()); | |
| const auto emboss_reserved_local_subexpr_3 = | |
| ::emboss::support::Sum</**/ ::std::int32_t, ::std::int32_t, | |
| ::std::int32_t, ::std::int32_t>( | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)), | |
| emboss_reserved_local_subexpr_2); | |
| const auto emboss_reserved_local_subexpr_4 = | |
| ::emboss::support::Choice</**/ ::std::int32_t, ::std::int32_t, bool, | |
| ::std::int32_t, ::std::int32_t>( | |
| ::emboss::support::Maybe</**/ bool>(true), | |
| emboss_reserved_local_subexpr_3, | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL))); | |
| const auto emboss_reserved_local_subexpr_5 = | |
| ::emboss::support::GreaterThan</**/ ::std::int32_t, bool, | |
| ::std::int32_t, ::std::int32_t>( | |
| emboss_reserved_local_subexpr_2, | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL))); | |
| const auto emboss_reserved_local_subexpr_6 = | |
| ::emboss::support::Sum</**/ ::std::int32_t, ::std::int32_t, | |
| ::std::int32_t, ::std::int32_t>( | |
| emboss_reserved_local_subexpr_3, | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL))); | |
| const auto emboss_reserved_local_subexpr_7 = | |
| ::emboss::support::Choice</**/ ::std::int32_t, ::std::int32_t, bool, | |
| ::std::int32_t, ::std::int32_t>( | |
| emboss_reserved_local_subexpr_5, emboss_reserved_local_subexpr_6, | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL))); | |
| const auto emboss_reserved_local_subexpr_8 = | |
| ::emboss::support::Maximum</**/ ::std::int32_t, ::std::int32_t, | |
| ::std::int32_t, ::std::int32_t, | |
| ::std::int32_t, ::std::int32_t>( | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)), | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)), | |
| emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_7); | |
| return emboss_reserved_local_subexpr_8; | |
| } | |
| static constexpr bool ValueIsOk( | |
| ::std::int32_t emboss_reserved_local_value) { | |
| return (void)emboss_reserved_local_value, // Silence -Wunused-parameter | |
| ::emboss::support::Maybe<bool>(true).ValueOr(false); | |
| } | |
| const GenericJsonOptionalStructView view_; | |
| }; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() | |
| const; | |
| ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() const; | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericJsonOptionalStructView; | |
| }; | |
| using JsonOptionalStructView = GenericJsonOptionalStructView< | |
| /**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using JsonOptionalStructWriter = GenericJsonOptionalStructView< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonOptionalStructView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericJsonOptionalStructView< | |
| GenericJsonOptionalStructView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericJsonOptionalStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeJsonOptionalStructView(T&& emboss_reserved_local_arg) { | |
| return GenericJsonOptionalStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericJsonOptionalStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeJsonOptionalStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonOptionalStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericJsonOptionalStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedJsonOptionalStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonOptionalStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| namespace JsonPartialStruct {} // namespace JsonPartialStruct | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonPartialStructView; | |
| template <class Storage> | |
| class GenericJsonPartialStructView final { | |
| public: | |
| GenericJsonPartialStructView() : backing_() {} | |
| explicit GenericJsonPartialStructView(Storage emboss_reserved_local_bytes) | |
| : backing_(emboss_reserved_local_bytes) {} | |
| template <typename OtherStorage> | |
| GenericJsonPartialStructView(const GenericJsonPartialStructView<OtherStorage>& | |
| emboss_reserved_local_other) | |
| : backing_{emboss_reserved_local_other.BackingStorage()} {} | |
| template <typename Arg, | |
| typename = typename ::std::enable_if< | |
| !EmbossReservedInternalIsGenericJsonPartialStructView< | |
| typename ::std::remove_cv<typename ::std::remove_reference< | |
| Arg>::type>::type>::value>::type> | |
| explicit GenericJsonPartialStructView(Arg&& emboss_reserved_local_arg) | |
| : backing_(::std::forward<Arg>(emboss_reserved_local_arg)) {} | |
| template <typename Arg0, typename Arg1, typename... Args> | |
| explicit GenericJsonPartialStructView(Arg0&& emboss_reserved_local_arg0, | |
| Arg1&& emboss_reserved_local_arg1, | |
| Args&&... emboss_reserved_local_args) | |
| : backing_(::std::forward<Arg0>(emboss_reserved_local_arg0), | |
| ::std::forward<Arg1>(emboss_reserved_local_arg1), | |
| ::std::forward<Args>(emboss_reserved_local_args)...) {} | |
| template <typename OtherStorage> | |
| GenericJsonPartialStructView<Storage>& operator=( | |
| const GenericJsonPartialStructView<OtherStorage>& | |
| emboss_reserved_local_other) { | |
| backing_ = emboss_reserved_local_other.BackingStorage(); | |
| return *this; | |
| } | |
| bool Ok() const { | |
| if (!IsComplete()) return false; | |
| if (!has_second_byte().Known()) return false; | |
| if (has_second_byte().ValueOrDefault() && !second_byte().Ok()) return false; | |
| if (!has_first_byte().Known()) return false; | |
| if (has_first_byte().ValueOrDefault() && !first_byte().Ok()) return false; | |
| if (!has_IntrinsicSizeInBytes().Known()) return false; | |
| if (has_IntrinsicSizeInBytes().ValueOrDefault() && | |
| !IntrinsicSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MaxSizeInBytes().Known()) return false; | |
| if (has_MaxSizeInBytes().ValueOrDefault() && !MaxSizeInBytes().Ok()) | |
| return false; | |
| if (!has_MinSizeInBytes().Known()) return false; | |
| if (has_MinSizeInBytes().ValueOrDefault() && !MinSizeInBytes().Ok()) | |
| return false; | |
| return true; | |
| } | |
| Storage BackingStorage() const { return backing_; } | |
| bool IsComplete() const { | |
| return IntrinsicSizeInBytes().IsUndefined().ValueOr(false) || | |
| (backing_.Ok() && IntrinsicSizeInBytes().Ok() && | |
| ::emboss::support::FitsInSizeT( | |
| IntrinsicSizeInBytes().UncheckedRead()) && | |
| backing_.SizeInBytes() >= | |
| static_cast</**/ ::std::size_t>( | |
| IntrinsicSizeInBytes().UncheckedRead())); | |
| } | |
| static constexpr ::std::size_t SizeInBytes() { | |
| return static_cast</**/ ::std::size_t>(IntrinsicSizeInBytes().Read()); | |
| } | |
| static constexpr bool SizeIsKnown() { return IntrinsicSizeInBytes().Ok(); } | |
| template <typename OtherStorage> | |
| bool Equals(GenericJsonPartialStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (!has_second_byte().Known()) return false; | |
| if (!emboss_reserved_local_other.has_second_byte().Known()) return false; | |
| if (emboss_reserved_local_other.has_second_byte().ValueOrDefault() && | |
| !has_second_byte().ValueOrDefault()) | |
| return false; | |
| if (has_second_byte().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_second_byte().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_second_byte().ValueOrDefault() && | |
| has_second_byte().ValueOrDefault() && | |
| !second_byte().Equals(emboss_reserved_local_other.second_byte())) | |
| return false; | |
| if (!has_first_byte().Known()) return false; | |
| if (!emboss_reserved_local_other.has_first_byte().Known()) return false; | |
| if (emboss_reserved_local_other.has_first_byte().ValueOrDefault() && | |
| !has_first_byte().ValueOrDefault()) | |
| return false; | |
| if (has_first_byte().ValueOrDefault() && | |
| !emboss_reserved_local_other.has_first_byte().ValueOrDefault()) | |
| return false; | |
| if (emboss_reserved_local_other.has_first_byte().ValueOrDefault() && | |
| has_first_byte().ValueOrDefault() && | |
| !first_byte().Equals(emboss_reserved_local_other.first_byte())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| bool UncheckedEquals(GenericJsonPartialStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| if (emboss_reserved_local_other.has_second_byte().ValueOr(false) && | |
| !has_second_byte().ValueOr(false)) | |
| return false; | |
| if (has_second_byte().ValueOr(false) && | |
| !emboss_reserved_local_other.has_second_byte().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_second_byte().ValueOr(false) && | |
| has_second_byte().ValueOr(false) && | |
| !second_byte().UncheckedEquals( | |
| emboss_reserved_local_other.second_byte())) | |
| return false; | |
| if (emboss_reserved_local_other.has_first_byte().ValueOr(false) && | |
| !has_first_byte().ValueOr(false)) | |
| return false; | |
| if (has_first_byte().ValueOr(false) && | |
| !emboss_reserved_local_other.has_first_byte().ValueOr(false)) | |
| return false; | |
| if (emboss_reserved_local_other.has_first_byte().ValueOr(false) && | |
| has_first_byte().ValueOr(false) && | |
| !first_byte().UncheckedEquals(emboss_reserved_local_other.first_byte())) | |
| return false; | |
| return true; | |
| } | |
| template <typename OtherStorage> | |
| void UncheckedCopyFrom(GenericJsonPartialStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.UncheckedCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes() | |
| .UncheckedRead())); | |
| } | |
| template <typename OtherStorage> | |
| void CopyFrom(GenericJsonPartialStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| backing_.CopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <typename OtherStorage> | |
| bool TryToCopyFrom(GenericJsonPartialStructView<OtherStorage> | |
| emboss_reserved_local_other) const { | |
| return emboss_reserved_local_other.Ok() && | |
| backing_.TryToCopyFrom( | |
| emboss_reserved_local_other.BackingStorage(), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_other.IntrinsicSizeInBytes().Read())); | |
| } | |
| template <class Stream> | |
| bool UpdateFromTextStream(Stream* emboss_reserved_local_stream) const { | |
| ::std::string emboss_reserved_local_brace; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_brace)) | |
| return false; | |
| if (emboss_reserved_local_brace != "{") return false; | |
| for (;;) { | |
| ::std::string emboss_reserved_local_name; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == ",") | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_name)) | |
| return false; | |
| if (emboss_reserved_local_name == "}") return true; | |
| ::std::string emboss_reserved_local_colon; | |
| if (!::emboss::support::ReadToken(emboss_reserved_local_stream, | |
| &emboss_reserved_local_colon)) | |
| return false; | |
| if (emboss_reserved_local_colon != ":") return false; | |
| if (emboss_reserved_local_name == "second_byte") { | |
| if (!second_byte().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| if (emboss_reserved_local_name == "first_byte") { | |
| if (!first_byte().UpdateFromTextStream(emboss_reserved_local_stream)) { | |
| return false; | |
| } | |
| continue; | |
| } | |
| return false; | |
| } | |
| } | |
| template <class Stream> | |
| void WriteToTextStream( | |
| Stream* emboss_reserved_local_stream, | |
| ::emboss::TextOutputOptions emboss_reserved_local_options) const { | |
| ::emboss::TextOutputOptions emboss_reserved_local_field_options = | |
| emboss_reserved_local_options.PlusOneIndent(); | |
| if (emboss_reserved_local_options.multiline()) { | |
| emboss_reserved_local_stream->Write("{\n"); | |
| } else { | |
| emboss_reserved_local_stream->Write("{"); | |
| } | |
| bool emboss_reserved_local_wrote_field = false; | |
| if (has_second_byte().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| second_byte().IsAggregate() || second_byte().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"second_byte\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("second_byte: "); | |
| } | |
| second_byte().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !second_byte().IsAggregate() && !second_byte().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# second_byte: UNREADABLE\n"); | |
| } | |
| } | |
| if (has_first_byte().ValueOr(false)) { | |
| if (!emboss_reserved_local_field_options.allow_partial_output() || | |
| first_byte().IsAggregate() || first_byte().Ok()) { | |
| if (emboss_reserved_local_wrote_field) { | |
| if (emboss_reserved_local_field_options.json() || | |
| !emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write(","); | |
| } | |
| } | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } else if (!emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| if (emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\"first_byte\":"); | |
| } else { | |
| emboss_reserved_local_stream->Write("first_byte: "); | |
| } | |
| first_byte().WriteToTextStream(emboss_reserved_local_stream, | |
| emboss_reserved_local_field_options); | |
| emboss_reserved_local_wrote_field = true; | |
| if (emboss_reserved_local_field_options.multiline() && | |
| !emboss_reserved_local_field_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| } else if (emboss_reserved_local_field_options.allow_partial_output() && | |
| emboss_reserved_local_field_options.comments() && | |
| !emboss_reserved_local_field_options.json() && | |
| !first_byte().IsAggregate() && !first_byte().Ok()) { | |
| if (emboss_reserved_local_field_options.multiline()) { | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_field_options.current_indent()); | |
| } | |
| emboss_reserved_local_stream->Write("# first_byte: UNREADABLE\n"); | |
| } | |
| } | |
| (void)emboss_reserved_local_wrote_field; | |
| if (emboss_reserved_local_options.multiline()) { | |
| if (emboss_reserved_local_wrote_field && | |
| emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write("\n"); | |
| } | |
| emboss_reserved_local_stream->Write( | |
| emboss_reserved_local_options.current_indent()); | |
| emboss_reserved_local_stream->Write("}"); | |
| } else { | |
| if (!emboss_reserved_local_options.json()) { | |
| emboss_reserved_local_stream->Write(" "); | |
| } | |
| emboss_reserved_local_stream->Write("}"); | |
| } | |
| } | |
| static constexpr bool IsAggregate() { return true; } | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| second_byte() const; | |
| ::emboss::support::Maybe<bool> has_second_byte() const; | |
| public: | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| first_byte() const; | |
| ::emboss::support::Maybe<bool> has_first_byte() const; | |
| public: | |
| class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView() {} | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualIntrinsicSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualIntrinsicSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| IntrinsicSizeInBytes() { | |
| return EmbossReservedDollarVirtualIntrinsicSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMaxSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMaxSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMaxSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMaxSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMaxSizeInBytesView | |
| MaxSizeInBytes() { | |
| return EmbossReservedDollarVirtualMaxSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MaxSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| public: | |
| class EmbossReservedDollarVirtualMinSizeInBytesView final { | |
| public: | |
| using ValueType = ::std::int32_t; | |
| constexpr EmbossReservedDollarVirtualMinSizeInBytesView() {} | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| const EmbossReservedDollarVirtualMinSizeInBytesView&) = default; | |
| EmbossReservedDollarVirtualMinSizeInBytesView& operator=( | |
| EmbossReservedDollarVirtualMinSizeInBytesView&&) = default; | |
| ~EmbossReservedDollarVirtualMinSizeInBytesView() = default; | |
| static constexpr ::std::int32_t Read(); | |
| static constexpr ::std::int32_t UncheckedRead(); | |
| static constexpr bool Ok() { return true; } | |
| static constexpr ::emboss::support::Maybe<bool> IsUndefined() { | |
| return ::emboss::support::Maybe<bool>(false); | |
| } | |
| template <class Stream> | |
| void WriteToTextStream(Stream* emboss_reserved_local_stream, | |
| const ::emboss::TextOutputOptions& | |
| emboss_reserved_local_options) const { | |
| ::emboss::support::WriteIntegerViewToTextStream( | |
| this, emboss_reserved_local_stream, emboss_reserved_local_options); | |
| } | |
| static constexpr bool IsAggregate() { return false; } | |
| }; | |
| static constexpr EmbossReservedDollarVirtualMinSizeInBytesView | |
| MinSizeInBytes() { | |
| return EmbossReservedDollarVirtualMinSizeInBytesView(); | |
| } | |
| static constexpr ::emboss::support::Maybe<bool> has_MinSizeInBytes() { | |
| return ::emboss::support::Maybe<bool>(true); | |
| } | |
| private: | |
| Storage backing_; | |
| template <class OtherStorage> | |
| friend class GenericJsonPartialStructView; | |
| }; | |
| using JsonPartialStructView = GenericJsonPartialStructView< | |
| /**/ ::emboss::support::ReadOnlyContiguousBuffer>; | |
| using JsonPartialStructWriter = GenericJsonPartialStructView< | |
| /**/ ::emboss::support::ReadWriteContiguousBuffer>; | |
| template <class View> | |
| struct EmbossReservedInternalIsGenericJsonPartialStructView { | |
| static constexpr const bool value = false; | |
| }; | |
| template <class Storage> | |
| struct EmbossReservedInternalIsGenericJsonPartialStructView< | |
| GenericJsonPartialStructView<Storage>> { | |
| static constexpr const bool value = true; | |
| }; | |
| template <typename T> | |
| inline GenericJsonPartialStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>> | |
| MakeJsonPartialStructView(T&& emboss_reserved_local_arg) { | |
| return GenericJsonPartialStructView< | |
| /**/ ::emboss::support::ContiguousBuffer< | |
| typename ::std::remove_reference< | |
| decltype(*::std::declval<T>()->data())>::type, | |
| 1, 0>>(::std::forward<T>(emboss_reserved_local_arg)); | |
| } | |
| template <typename T> | |
| inline GenericJsonPartialStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>> | |
| MakeJsonPartialStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonPartialStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, 1, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| template <typename T, ::std::size_t kAlignment> | |
| inline GenericJsonPartialStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>> | |
| MakeAlignedJsonPartialStructView(T* emboss_reserved_local_data, | |
| ::std::size_t emboss_reserved_local_size) { | |
| return GenericJsonPartialStructView< | |
| /**/ ::emboss::support::ContiguousBuffer<T, kAlignment, 0>>( | |
| emboss_reserved_local_data, emboss_reserved_local_size); | |
| } | |
| namespace Vanilla {} // namespace Vanilla | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| GenericVanillaView<Storage>::a() const { | |
| if (has_a().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> GenericVanillaView<Storage>::has_a() | |
| const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| GenericVanillaView<Storage>::b() const { | |
| if (has_b().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 1>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> GenericVanillaView<Storage>::has_b() | |
| const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace Vanilla { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace Vanilla | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericVanillaView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { | |
| return Vanilla::IntrinsicSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericVanillaView<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { | |
| return Vanilla::IntrinsicSizeInBytes(); | |
| } | |
| namespace Vanilla { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace Vanilla | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericVanillaView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return Vanilla::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericVanillaView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return Vanilla::MaxSizeInBytes(); | |
| } | |
| namespace Vanilla { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace Vanilla | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericVanillaView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return Vanilla::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericVanillaView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return Vanilla::MinSizeInBytes(); | |
| } | |
| namespace StructWithSkippedFields {} // namespace StructWithSkippedFields | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| GenericStructWithSkippedFieldsView<Storage>::a() const { | |
| if (has_a().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericStructWithSkippedFieldsView<Storage>::has_a() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| GenericStructWithSkippedFieldsView<Storage>::b() const { | |
| if (has_b().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 1>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericStructWithSkippedFieldsView<Storage>::has_b() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| GenericStructWithSkippedFieldsView<Storage>::c() const { | |
| if (has_c().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 2>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericStructWithSkippedFieldsView<Storage>::has_c() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace StructWithSkippedFields { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(3LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace StructWithSkippedFields | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedFieldsView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { | |
| return StructWithSkippedFields::IntrinsicSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedFieldsView<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { | |
| return StructWithSkippedFields::IntrinsicSizeInBytes(); | |
| } | |
| namespace StructWithSkippedFields { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(3LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace StructWithSkippedFields | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedFieldsView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return StructWithSkippedFields::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedFieldsView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return StructWithSkippedFields::MaxSizeInBytes(); | |
| } | |
| namespace StructWithSkippedFields { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(3LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace StructWithSkippedFields | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedFieldsView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return StructWithSkippedFields::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedFieldsView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return StructWithSkippedFields::MinSizeInBytes(); | |
| } | |
| namespace StructWithSkippedStructureFields { | |
| } // namespace StructWithSkippedStructureFields | |
| template <class Storage> | |
| inline typename ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>> | |
| GenericStructWithSkippedStructureFieldsView<Storage>::a() const { | |
| if (has_a().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericStructWithSkippedStructureFieldsView<Storage>::has_a() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>> | |
| GenericStructWithSkippedStructureFieldsView<Storage>::b() const { | |
| if (has_b().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>> | |
| (backing_.template GetOffsetStorage<0, 2>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericStructWithSkippedStructureFieldsView<Storage>::has_b() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 4>> | |
| GenericStructWithSkippedStructureFieldsView<Storage>::c() const { | |
| if (has_c().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(4LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 4>> | |
| (backing_.template GetOffsetStorage<0, 4>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::test::GenericVanillaView< | |
| typename Storage::template OffsetStorageType</**/ 0, 4>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericStructWithSkippedStructureFieldsView<Storage>::has_c() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace StructWithSkippedStructureFields { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(6LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace StructWithSkippedStructureFields | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedStructureFieldsView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { | |
| return StructWithSkippedStructureFields::IntrinsicSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t | |
| GenericStructWithSkippedStructureFieldsView<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { | |
| return StructWithSkippedStructureFields::IntrinsicSizeInBytes(); | |
| } | |
| namespace StructWithSkippedStructureFields { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(6LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace StructWithSkippedStructureFields | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedStructureFieldsView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return StructWithSkippedStructureFields::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedStructureFieldsView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return StructWithSkippedStructureFields::MaxSizeInBytes(); | |
| } | |
| namespace StructWithSkippedStructureFields { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(6LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace StructWithSkippedStructureFields | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedStructureFieldsView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return StructWithSkippedStructureFields::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericStructWithSkippedStructureFieldsView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return StructWithSkippedStructureFields::MinSizeInBytes(); | |
| } | |
| namespace JsonTestArrayStruct {} // namespace JsonTestArrayStruct | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| GenericJsonTestArrayStructView<Storage>::element_one() const { | |
| if (has_element_one().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestArrayStructView<Storage>::has_element_one() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| GenericJsonTestArrayStructView<Storage>::element_two() const { | |
| if (has_element_two().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 1>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestArrayStructView<Storage>::has_element_two() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| GenericJsonTestArrayStructView<Storage>::element_three() const { | |
| if (has_element_three().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 2>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestArrayStructView<Storage>::has_element_three() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 3>>, | |
| 8>> | |
| GenericJsonTestArrayStructView<Storage>::element_four() const { | |
| if (has_element_four().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(3LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 3>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 3>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 3>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestArrayStructView<Storage>::has_element_four() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace JsonTestArrayStruct { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(4LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonTestArrayStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestArrayStructView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { | |
| return JsonTestArrayStruct::IntrinsicSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestArrayStructView<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { | |
| return JsonTestArrayStruct::IntrinsicSizeInBytes(); | |
| } | |
| namespace JsonTestArrayStruct { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(4LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonTestArrayStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestArrayStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return JsonTestArrayStruct::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestArrayStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return JsonTestArrayStruct::MaxSizeInBytes(); | |
| } | |
| namespace JsonTestArrayStruct { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(4LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonTestArrayStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestArrayStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return JsonTestArrayStruct::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestArrayStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return JsonTestArrayStruct::MinSizeInBytes(); | |
| } | |
| namespace JsonTestStruct { | |
| namespace EmbossReservedAnonymousField1 { | |
| } // namespace EmbossReservedAnonymousField1 | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 7, ::emboss::support::AllValuesAreOk>, | |
| typename Storage::template OffsetStorageType</**/ 0, 0>> | |
| GenericEmbossReservedAnonymousField1View<Storage>::seven_bit_uint() const { | |
| if (has_seven_bit_uint().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(7LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 7, ::emboss::support::AllValuesAreOk>, | |
| typename Storage::template OffsetStorageType</**/ 0, 0>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 7, ::emboss::support::AllValuesAreOk>, | |
| typename Storage::template OffsetStorageType</**/ 0, 0>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericEmbossReservedAnonymousField1View<Storage>::has_seven_bit_uint() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::FlagView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 1, ::emboss::support::AllValuesAreOk>, | |
| typename Storage::template OffsetStorageType</**/ 0, 7>> | |
| GenericEmbossReservedAnonymousField1View<Storage>::one_bit_flag() const { | |
| if (has_one_bit_flag().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(7LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::FlagView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 1, ::emboss::support::AllValuesAreOk>, | |
| typename Storage::template OffsetStorageType</**/ 0, 7>> | |
| (backing_.template GetOffsetStorage<0, 7>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::FlagView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 1, ::emboss::support::AllValuesAreOk>, | |
| typename Storage::template OffsetStorageType</**/ 0, 7>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericEmbossReservedAnonymousField1View<Storage>::has_one_bit_flag() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace EmbossReservedAnonymousField1 { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBits() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(8LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace EmbossReservedAnonymousField1 | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericEmbossReservedAnonymousField1View< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { | |
| return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t | |
| GenericEmbossReservedAnonymousField1View<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { | |
| return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); | |
| } | |
| namespace EmbossReservedAnonymousField1 { | |
| inline constexpr ::std::int32_t MaxSizeInBits() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(8LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace EmbossReservedAnonymousField1 | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericEmbossReservedAnonymousField1View< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { | |
| return EmbossReservedAnonymousField1::MaxSizeInBits(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericEmbossReservedAnonymousField1View< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { | |
| return EmbossReservedAnonymousField1::MaxSizeInBits(); | |
| } | |
| namespace EmbossReservedAnonymousField1 { | |
| inline constexpr ::std::int32_t MinSizeInBits() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(8LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace EmbossReservedAnonymousField1 | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericEmbossReservedAnonymousField1View< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { | |
| return EmbossReservedAnonymousField1::MinSizeInBits(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericEmbossReservedAnonymousField1View< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { | |
| return EmbossReservedAnonymousField1::MinSizeInBits(); | |
| } | |
| } // namespace JsonTestStruct | |
| template <class Storage> | |
| inline typename ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonTestEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| GenericJsonTestStructView<Storage>::one_byte_enum() const { | |
| if (has_one_byte_enum().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonTestEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonTestEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_one_byte_enum() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::test::JsonTestStruct:: | |
| GenericEmbossReservedAnonymousField1View< | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| GenericJsonTestStructView<Storage>::emboss_reserved_anonymous_field_1() | |
| const { | |
| if (has_emboss_reserved_anonymous_field_1().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::test::JsonTestStruct:: | |
| GenericEmbossReservedAnonymousField1View< | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 1>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::test::JsonTestStruct:: | |
| GenericEmbossReservedAnonymousField1View< | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> GenericJsonTestStructView< | |
| Storage>::has_emboss_reserved_anonymous_field_1() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_seven_bit_uint() const { | |
| return ::emboss::support::And</**/ bool, bool, bool, bool>( | |
| ::emboss::support::Maybe</**/ bool>(true), | |
| ::emboss::support::Maybe</**/ bool>(true)); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_one_bit_flag() const { | |
| return ::emboss::support::And</**/ bool, bool, bool, bool>( | |
| ::emboss::support::Maybe</**/ bool>(true), | |
| ::emboss::support::Maybe</**/ bool>(true)); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| GenericJsonTestStructView<Storage>::one_byte_uint() const { | |
| if (has_one_byte_uint().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 2>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 2>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_one_byte_uint() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 3>>, | |
| 16>> | |
| GenericJsonTestStructView<Storage>::two_byte_uint() const { | |
| if (has_two_byte_uint().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(3LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 3>>, | |
| 16>> | |
| (backing_.template GetOffsetStorage<0, 3>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 3>>, | |
| 16>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_two_byte_uint() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 32, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 5>>, | |
| 32>> | |
| GenericJsonTestStructView<Storage>::four_byte_uint() const { | |
| if (has_four_byte_uint().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(4LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(5LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 32, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 5>>, | |
| 32>> | |
| (backing_.template GetOffsetStorage<0, 5>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 32, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 5>>, | |
| 32>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_four_byte_uint() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 9>>, | |
| 64>> | |
| GenericJsonTestStructView<Storage>::eight_byte_uint() const { | |
| if (has_eight_byte_uint().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(8LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(9LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 9>>, | |
| 64>> | |
| (backing_.template GetOffsetStorage<0, 9>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 9>>, | |
| 64>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_eight_byte_uint() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 17>::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 17>, 1, 8> | |
| GenericJsonTestStructView<Storage>::uint8_array() const { | |
| if (has_uint8_array().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(10LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(17LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 17>::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 17>, 1, 8> | |
| (backing_.template GetOffsetStorage<0, 17>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 17>::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 17>, 1, 8> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_uint8_array() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 27>::template OffsetStorageType</**/ 2, 0>>, | |
| 16>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 27>, 2, 8> | |
| GenericJsonTestStructView<Storage>::uint16_array() const { | |
| if (has_uint16_array().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(20LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(27LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 27>::template OffsetStorageType</**/ 2, 0>>, | |
| 16>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 27>, 2, 8> | |
| (backing_.template GetOffsetStorage<0, 27>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 27>::template OffsetStorageType</**/ 2, 0>>, | |
| 16>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 27>, 2, 8> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_uint16_array() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::support::GenericArrayView< | |
| typename ::emboss::test::GenericJsonTestArrayStructView< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 47>::template OffsetStorageType</**/ 4, 0>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 47>, 4, 8> | |
| GenericJsonTestStructView<Storage>::struct_array() const { | |
| if (has_struct_array().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(8LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(47LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::support::GenericArrayView< | |
| typename ::emboss::test::GenericJsonTestArrayStructView< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 47>::template OffsetStorageType</**/ 4, 0>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 47>, 4, 8> | |
| (backing_.template GetOffsetStorage<0, 47>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::support::GenericArrayView< | |
| typename ::emboss::test::GenericJsonTestArrayStructView< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 47>::template OffsetStorageType</**/ 4, 0>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 47>, 4, 8> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonTestStructView<Storage>::has_struct_array() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace JsonTestStruct { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(55LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonTestStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestStructView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { | |
| return JsonTestStruct::IntrinsicSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestStructView<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { | |
| return JsonTestStruct::IntrinsicSizeInBytes(); | |
| } | |
| namespace JsonTestStruct { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(55LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonTestStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return JsonTestStruct::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return JsonTestStruct::MaxSizeInBytes(); | |
| } | |
| namespace JsonTestStruct { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(55LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonTestStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return JsonTestStruct::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonTestStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return JsonTestStruct::MinSizeInBytes(); | |
| } | |
| namespace JsonEnumStruct {} // namespace JsonEnumStruct | |
| template <class Storage> | |
| inline typename ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonTestEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 64>> | |
| GenericJsonEnumStructView<Storage>::wide_enum() const { | |
| if (has_wide_enum().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(8LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonTestEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 64>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonTestEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 64>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonEnumStructView<Storage>::has_wide_enum() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonNarrowEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 8>>, | |
| 16>> | |
| GenericJsonEnumStructView<Storage>::narrow_enum() const { | |
| if (has_narrow_enum().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(8LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonNarrowEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 8>>, | |
| 16>> | |
| (backing_.template GetOffsetStorage<0, 8>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::support::EnumView< | |
| /**/ ::emboss::test::JsonNarrowEnum, | |
| ::emboss::support::FixedSizeViewParameters< | |
| 16, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 8>>, | |
| 16>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonEnumStructView<Storage>::has_narrow_enum() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace JsonEnumStruct { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(10LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonEnumStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonEnumStructView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { | |
| return JsonEnumStruct::IntrinsicSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonEnumStructView<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { | |
| return JsonEnumStruct::IntrinsicSizeInBytes(); | |
| } | |
| namespace JsonEnumStruct { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(10LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonEnumStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonEnumStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return JsonEnumStruct::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonEnumStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return JsonEnumStruct::MaxSizeInBytes(); | |
| } | |
| namespace JsonEnumStruct { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(10LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonEnumStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonEnumStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return JsonEnumStruct::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonEnumStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return JsonEnumStruct::MinSizeInBytes(); | |
| } | |
| namespace JsonFloatStruct {} // namespace JsonFloatStruct | |
| template <class Storage> | |
| inline typename ::emboss::prelude::FloatView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 32, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 32>> | |
| GenericJsonFloatStructView<Storage>::f() const { | |
| if (has_f().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(4LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::FloatView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 32, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 32>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::FloatView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 32, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 32>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonFloatStructView<Storage>::has_f() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::FloatView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 4>>, | |
| 64>> | |
| GenericJsonFloatStructView<Storage>::d() const { | |
| if (has_d().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(8LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(4LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::FloatView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 4>>, | |
| 64>> | |
| (backing_.template GetOffsetStorage<0, 4>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::FloatView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 64, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::LittleEndianByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 4>>, | |
| 64>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonFloatStructView<Storage>::has_d() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace JsonFloatStruct { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(12LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonFloatStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonFloatStructView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { | |
| return JsonFloatStruct::IntrinsicSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonFloatStructView<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { | |
| return JsonFloatStruct::IntrinsicSizeInBytes(); | |
| } | |
| namespace JsonFloatStruct { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(12LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonFloatStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonFloatStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return JsonFloatStruct::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonFloatStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return JsonFloatStruct::MaxSizeInBytes(); | |
| } | |
| namespace JsonFloatStruct { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(12LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonFloatStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonFloatStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return JsonFloatStruct::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonFloatStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return JsonFloatStruct::MinSizeInBytes(); | |
| } | |
| namespace JsonOptionalStruct {} // namespace JsonOptionalStruct | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| GenericJsonOptionalStructView<Storage>::count() const { | |
| if (has_count().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonOptionalStructView<Storage>::has_count() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8> | |
| GenericJsonOptionalStructView<Storage>::bytes() const { | |
| if (has_bytes().ValueOr(false)) { | |
| const auto emboss_reserved_local_subexpr_1 = count(); | |
| const auto emboss_reserved_local_subexpr_2 = | |
| (emboss_reserved_local_subexpr_1.Ok() | |
| ? ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>( | |
| emboss_reserved_local_subexpr_1.UncheckedRead())) | |
| : ::emboss::support::Maybe</**/ ::std::int32_t>()); | |
| auto emboss_reserved_local_size = emboss_reserved_local_subexpr_2; | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8> | |
| (backing_.template GetOffsetStorage<0, 1>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::support::GenericArrayView< | |
| typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType< | |
| /**/ 0, 1>::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| , | |
| typename Storage::template OffsetStorageType</**/ 0, 1>, 1, 8> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonOptionalStructView<Storage>::has_bytes() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| GenericJsonOptionalStructView<Storage>::tail() const { | |
| if (has_tail().ValueOr(false)) { | |
| const auto emboss_reserved_local_subexpr_1 = count(); | |
| const auto emboss_reserved_local_subexpr_2 = | |
| (emboss_reserved_local_subexpr_1.Ok() | |
| ? ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>( | |
| emboss_reserved_local_subexpr_1.UncheckedRead())) | |
| : ::emboss::support::Maybe</**/ ::std::int32_t>()); | |
| const auto emboss_reserved_local_subexpr_3 = | |
| ::emboss::support::Sum</**/ ::std::int32_t, ::std::int32_t, | |
| ::std::int32_t, ::std::int32_t>( | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)), | |
| emboss_reserved_local_subexpr_2); | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_3; | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<1, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 1, 0>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonOptionalStructView<Storage>::has_tail() const { | |
| return ::emboss::support::GreaterThan</**/ ::std::int32_t, bool, | |
| ::std::int32_t, ::std::int32_t>( | |
| (count().Ok() | |
| ? ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(count().UncheckedRead())) | |
| : ::emboss::support::Maybe</**/ ::std::int32_t>()), | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL))); | |
| } | |
| template <class Storage> | |
| inline typename GenericJsonOptionalStructView< | |
| Storage>::EmbossReservedVirtualTailPresentView | |
| GenericJsonOptionalStructView<Storage>::tail_present() const { | |
| return typename GenericJsonOptionalStructView< | |
| Storage>::EmbossReservedVirtualTailPresentView(*this); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonOptionalStructView<Storage>::has_tail_present() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename GenericJsonOptionalStructView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView | |
| GenericJsonOptionalStructView<Storage>::IntrinsicSizeInBytes() const { | |
| return typename GenericJsonOptionalStructView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView(*this); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonOptionalStructView<Storage>::has_IntrinsicSizeInBytes() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace JsonOptionalStruct { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(257LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonOptionalStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonOptionalStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return JsonOptionalStruct::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonOptionalStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return JsonOptionalStruct::MaxSizeInBytes(); | |
| } | |
| namespace JsonOptionalStruct { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonOptionalStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonOptionalStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return JsonOptionalStruct::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonOptionalStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return JsonOptionalStruct::MinSizeInBytes(); | |
| } | |
| namespace JsonPartialStruct {} // namespace JsonPartialStruct | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| GenericJsonPartialStructView<Storage>::second_byte() const { | |
| if (has_second_byte().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 1>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 1>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonPartialStructView<Storage>::has_second_byte() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| template <class Storage> | |
| inline typename ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| GenericJsonPartialStructView<Storage>::first_byte() const { | |
| if (has_first_byte().ValueOr(false)) { | |
| auto emboss_reserved_local_size = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(1LL)); | |
| auto emboss_reserved_local_offset = | |
| ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(0LL)); | |
| if (emboss_reserved_local_size.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_size.ValueOrDefault()) && | |
| emboss_reserved_local_offset.Known() && | |
| ::emboss::support::FitsInSizeT( | |
| emboss_reserved_local_offset.ValueOrDefault())) { | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (backing_.template GetOffsetStorage<0, 0>( | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_offset.ValueOrDefault()), | |
| static_cast</**/ ::std::size_t>( | |
| emboss_reserved_local_size.ValueOrDefault()))); | |
| } | |
| } | |
| return ::emboss::prelude::UIntView< | |
| /**/ ::emboss::support::FixedSizeViewParameters< | |
| 8, ::emboss::support::AllValuesAreOk>, | |
| typename ::emboss::support::BitBlock< | |
| /**/ ::emboss::support::NullByteOrderer< | |
| typename Storage::template OffsetStorageType</**/ 0, 0>>, | |
| 8>> | |
| (); | |
| } | |
| template <class Storage> | |
| inline ::emboss::support::Maybe<bool> | |
| GenericJsonPartialStructView<Storage>::has_first_byte() const { | |
| return ::emboss::support::Maybe</**/ bool>(true); | |
| } | |
| namespace JsonPartialStruct { | |
| inline constexpr ::std::int32_t IntrinsicSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonPartialStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonPartialStructView< | |
| Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { | |
| return JsonPartialStruct::IntrinsicSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonPartialStructView<Storage>:: | |
| EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { | |
| return JsonPartialStruct::IntrinsicSizeInBytes(); | |
| } | |
| namespace JsonPartialStruct { | |
| inline constexpr ::std::int32_t MaxSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonPartialStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonPartialStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { | |
| return JsonPartialStruct::MaxSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonPartialStructView< | |
| Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { | |
| return JsonPartialStruct::MaxSizeInBytes(); | |
| } | |
| namespace JsonPartialStruct { | |
| inline constexpr ::std::int32_t MinSizeInBytes() { | |
| return ::emboss::support::Maybe</**/ ::std::int32_t>( | |
| static_cast</**/ ::std::int32_t>(2LL)) | |
| .ValueOrDefault(); | |
| } | |
| } // namespace JsonPartialStruct | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonPartialStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { | |
| return JsonPartialStruct::MinSizeInBytes(); | |
| } | |
| template <class Storage> | |
| inline constexpr ::std::int32_t GenericJsonPartialStructView< | |
| Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { | |
| return JsonPartialStruct::MinSizeInBytes(); | |
| } | |
| } // namespace test | |
| } // namespace emboss | |
| /* NOLINTEND */ | |
| #endif // TESTDATA_TEXT_FORMAT_EMB_H_ |