diff --git a/compiler/back_end/cpp/BUILD b/compiler/back_end/cpp/BUILD index 5bac5360..14eac6a0 100644 --- a/compiler/back_end/cpp/BUILD +++ b/compiler/back_end/cpp/BUILD @@ -16,8 +16,7 @@ load("@rules_python//python:py_binary.bzl", "py_binary") load("@rules_python//python:py_library.bzl", "py_library") -load("@rules_python//python:py_test.bzl", "py_test") -load(":build_defs.bzl", "emboss_cc_test") +load(":build_defs.bzl", "cpp_golden_test", "emboss_cc_test") package( default_visibility = [ @@ -388,3 +387,213 @@ emboss_cc_test( "@com_google_googletest//:gtest_main", ], ) + +# New golden test infrastructure +py_library( + name = "one_golden_test_lib", + srcs = ["one_golden_test.py"], +) + +py_binary( + name = "run_one_golden_test", + srcs = ["run_one_golden_test.py"], + deps = [":one_golden_test_lib"], +) + +cpp_golden_test( + name = "anonymous_bits_golden_test", + emb_file = "//testdata:anonymous_bits.emb", + golden_file = "//testdata/golden_cpp:anonymous_bits.emb.h", +) + +cpp_golden_test( + name = "bits_golden_test", + emb_file = "//testdata:bits.emb", + golden_file = "//testdata/golden_cpp:bits.emb.h", +) + +cpp_golden_test( + name = "absolute_cpp_namespace_golden_test", + emb_file = "//testdata:absolute_cpp_namespace.emb", + golden_file = "//testdata/golden_cpp:absolute_cpp_namespace.emb.h", +) + +cpp_golden_test( + name = "alignments_golden_test", + emb_file = "//testdata:alignments.emb", + golden_file = "//testdata/golden_cpp:alignments.emb.h", +) + +cpp_golden_test( + name = "auto_array_size_golden_test", + emb_file = "//testdata:auto_array_size.emb", + golden_file = "//testdata/golden_cpp:auto_array_size.emb.h", +) + +cpp_golden_test( + name = "bcd_golden_test", + emb_file = "//testdata:bcd.emb", + golden_file = "//testdata/golden_cpp:bcd.emb.h", +) + +cpp_golden_test( + name = "complex_offset_golden_test", + emb_file = "//testdata:complex_offset.emb", + golden_file = "//testdata/golden_cpp:complex_offset.emb.h", +) + +cpp_golden_test( + name = "complex_structure_golden_test", + emb_file = "//testdata:complex_structure.emb", + golden_file = "//testdata/golden_cpp:complex_structure.emb.h", +) + +cpp_golden_test( + name = "condition_golden_test", + emb_file = "//testdata:condition.emb", + golden_file = "//testdata/golden_cpp:condition.emb.h", +) + +cpp_golden_test( + name = "cpp_namespace_golden_test", + emb_file = "//testdata:cpp_namespace.emb", + golden_file = "//testdata/golden_cpp:cpp_namespace.emb.h", +) + +cpp_golden_test( + name = "dynamic_size_golden_test", + emb_file = "//testdata:dynamic_size.emb", + golden_file = "//testdata/golden_cpp:dynamic_size.emb.h", +) + +cpp_golden_test( + name = "enum_case_golden_test", + emb_file = "//testdata:enum_case.emb", + golden_file = "//testdata/golden_cpp:enum_case.emb.h", +) + +cpp_golden_test( + name = "enum_golden_test", + emb_file = "//testdata:enum.emb", + golden_file = "//testdata/golden_cpp:enum.emb.h", +) + +cpp_golden_test( + name = "explicit_sizes_golden_test", + emb_file = "//testdata:explicit_sizes.emb", + golden_file = "//testdata/golden_cpp:explicit_sizes.emb.h", +) + +cpp_golden_test( + name = "float_golden_test", + emb_file = "//testdata:float.emb", + golden_file = "//testdata/golden_cpp:float.emb.h", +) + +cpp_golden_test( + name = "imported_golden_test", + emb_file = "//testdata:imported.emb", + golden_file = "//testdata/golden_cpp:imported.emb.h", +) + +cpp_golden_test( + name = "inline_type_golden_test", + emb_file = "//testdata:inline_type.emb", + golden_file = "//testdata/golden_cpp:inline_type.emb.h", +) + +cpp_golden_test( + name = "int_sizes_golden_test", + emb_file = "//testdata:int_sizes.emb", + golden_file = "//testdata/golden_cpp:int_sizes.emb.h", +) + +cpp_golden_test( + name = "large_array_golden_test", + emb_file = "//testdata:large_array.emb", + golden_file = "//testdata/golden_cpp:large_array.emb.h", +) + +cpp_golden_test( + name = "nested_structure_golden_test", + emb_file = "//testdata:nested_structure.emb", + golden_file = "//testdata/golden_cpp:nested_structure.emb.h", +) + +cpp_golden_test( + name = "next_keyword_golden_test", + emb_file = "//testdata:next_keyword.emb", + golden_file = "//testdata/golden_cpp:next_keyword.emb.h", +) + +cpp_golden_test( + name = "no_cpp_namespace_golden_test", + emb_file = "//testdata:no_cpp_namespace.emb", + golden_file = "//testdata/golden_cpp:no_cpp_namespace.emb.h", +) + +cpp_golden_test( + name = "no_enum_traits_golden_test", + emb_file = "//testdata:no_enum_traits.emb", + golden_file = "//testdata/golden_cpp:no_enum_traits.emb.h", +) + +cpp_golden_test( + name = "parameters_golden_test", + emb_file = "//testdata:parameters.emb", + golden_file = "//testdata/golden_cpp:parameters.emb.h", +) + +cpp_golden_test( + name = "requires_golden_test", + emb_file = "//testdata:requires.emb", + golden_file = "//testdata/golden_cpp:requires.emb.h", +) + +cpp_golden_test( + name = "start_size_range_golden_test", + emb_file = "//testdata:start_size_range.emb", + golden_file = "//testdata/golden_cpp:start_size_range.emb.h", +) + +cpp_golden_test( + name = "subtypes_golden_test", + emb_file = "//testdata:subtypes.emb", + golden_file = "//testdata/golden_cpp:subtypes.emb.h", +) + +cpp_golden_test( + name = "text_format_golden_test", + emb_file = "//testdata:text_format.emb", + golden_file = "//testdata/golden_cpp:text_format.emb.h", +) + +cpp_golden_test( + name = "uint_sizes_golden_test", + emb_file = "//testdata:uint_sizes.emb", + golden_file = "//testdata/golden_cpp:uint_sizes.emb.h", +) + +cpp_golden_test( + name = "virtual_field_golden_test", + emb_file = "//testdata:virtual_field.emb", + golden_file = "//testdata/golden_cpp:virtual_field.emb.h", +) + +cpp_golden_test( + name = "importer_golden_test", + emb_file = "//testdata:importer.emb", + golden_file = "//testdata/golden_cpp:importer.emb.h", +) + +cpp_golden_test( + name = "importer2_golden_test", + emb_file = "//testdata:importer2.emb", + golden_file = "//testdata/golden_cpp:importer2.emb.h", +) + +cpp_golden_test( + name = "imported_genfiles_golden_test", + emb_file = "//testdata:imported_genfiles.emb", + golden_file = "//testdata/golden_cpp:imported_genfiles.emb.h", +) diff --git a/compiler/back_end/cpp/build_defs.bzl b/compiler/back_end/cpp/build_defs.bzl index 16e0532c..78d22f30 100644 --- a/compiler/back_end/cpp/build_defs.bzl +++ b/compiler/back_end/cpp/build_defs.bzl @@ -16,6 +16,8 @@ # vim:set ft=blazebuild: """Rule to generate cc_tests with and without system-specific optimizations.""" +load("@rules_python//python:py_test.bzl", "py_test") + def emboss_cc_test(name, copts = None, no_w_sign_compare = False, **kwargs): """Generates cc_test rules with and without -DEMBOSS_NO_OPTIMIZATIONS.""" native.cc_test( @@ -43,3 +45,33 @@ def emboss_cc_test(name, copts = None, no_w_sign_compare = False, **kwargs): ] + ([] if no_w_sign_compare else ["-Wsign-compare"]) + (copts or []), **kwargs ) + +def cpp_golden_test(name, emb_file, golden_file, import_dirs = []): + """Defines a C++ golden file test. + + Args: + name: The name of the test. + emb_file: The .emb file to test. + golden_file: The golden .h file. + import_dirs: A list of import directories. + """ + py_test( + name = name, + main = ":run_one_golden_test.py", + srcs = [":run_one_golden_test.py", ":one_golden_test.py"], + tags = ["golden"], + args = [ + "$(location //compiler/front_end:emboss_front_end)", + "$(location :emboss_codegen_cpp)", + "$(location %s)" % emb_file, + "$(location %s)" % golden_file, + ] + ["--import-dir=" + d for d in import_dirs], + data = [ + "//compiler/front_end:emboss_front_end", + ":emboss_codegen_cpp", + emb_file, + golden_file, + "//testdata:test_embs", + ] + import_dirs, + deps = [":one_golden_test_lib"], + ) diff --git a/compiler/back_end/cpp/one_golden_test.py b/compiler/back_end/cpp/one_golden_test.py new file mode 100644 index 00000000..196e4a2d --- /dev/null +++ b/compiler/back_end/cpp/one_golden_test.py @@ -0,0 +1,95 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import difflib +import os +import subprocess +import sys +import unittest + + +class OneGoldenTest(unittest.TestCase): + def __init__( + self, + emboss_front_end, + emboss_compiler, + emb_file, + golden_file, + include_dirs=None, + ): + super(OneGoldenTest, self).__init__("test_golden_file") + self.emboss_front_end = emboss_front_end + self.emboss_compiler = emboss_compiler + self.emb_file = emb_file + self.golden_file = golden_file + self.include_dirs = include_dirs if include_dirs is not None else [] + + def test_golden_file(self): + temp_dir = os.environ.get("TEST_TMPDIR", "") + ir_path = os.path.join(temp_dir, "ir.json") + output_path = os.path.join(temp_dir, os.path.basename(self.golden_file)) + + front_end_args = [ + self.emboss_front_end, + self.emb_file, + "--output-file", + ir_path, + ] + for include_dir in self.include_dirs: + front_end_args.extend(["--import-dir", include_dir]) + + process = subprocess.run(front_end_args, capture_output=True, text=True) + self.assertEqual( + process.returncode, 0, f"Front end failed with error:\n{process.stderr}" + ) + + compiler_args = [ + self.emboss_compiler, + "--input-file", + ir_path, + "--output-file", + output_path, + ] + + process = subprocess.run(compiler_args, capture_output=True, text=True) + + self.assertEqual( + process.returncode, 0, f"Compiler failed with error:\n{process.stderr}" + ) + + with open(output_path, "r") as f: + generated_contents = f.read() + + with open(self.golden_file, "r") as f: + golden_contents = f.read() + + self.assertMultiLineEqual( + golden_contents, + generated_contents, + msg="Generated file does not match golden file. Diff:\n" + + "".join( + difflib.unified_diff( + golden_contents.splitlines(keepends=True), + generated_contents.splitlines(keepends=True), + fromfile=self.golden_file, + tofile="Generated C++ Header", + ) + ), + ) + + +if __name__ == "__main__": + # This script is not intended to be run directly. + # It should be invoked by a test runner. + pass diff --git a/compiler/back_end/cpp/run_one_golden_test.py b/compiler/back_end/cpp/run_one_golden_test.py new file mode 100644 index 00000000..36f166eb --- /dev/null +++ b/compiler/back_end/cpp/run_one_golden_test.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest +import sys +import os + +sys.path.insert(0, os.path.dirname(__file__)) + +from one_golden_test import OneGoldenTest + + +def main(argv): + if len(argv) < 5: + print( + f"Usage: {argv[0]} emboss_front_end emboss_compiler emb_file golden_file [include_dir...]" + ) + return 1 + + emboss_front_end = argv[1] + emboss_compiler = argv[2] + emb_file = argv[3] + golden_file = argv[4] + include_dirs = argv[5:] + + suite = unittest.TestSuite() + suite.addTest( + OneGoldenTest( + emboss_front_end, emboss_compiler, emb_file, golden_file, include_dirs + ) + ) + runner = unittest.TextTestRunner() + result = runner.run(suite) + return 0 if result.wasSuccessful() else 1 + + +if __name__ == "__main__": + sys.exit(main(sys.argv)) diff --git a/testdata/BUILD b/testdata/BUILD index f8a1be7d..95716da7 100644 --- a/testdata/BUILD +++ b/testdata/BUILD @@ -36,6 +36,11 @@ filegroup( ], ) + + +exports_files(glob(["**/*.emb"])) + + filegroup( name = "test_embs", srcs = [ @@ -57,6 +62,7 @@ filegroup( "imported.emb", "imported_genfiles.emb", "importer.emb", + "importer2.emb", "int_sizes.emb", "nested_structure.emb", "next_keyword.emb", diff --git a/testdata/golden_cpp/BUILD b/testdata/golden_cpp/BUILD new file mode 100644 index 00000000..d1f63ca7 --- /dev/null +++ b/testdata/golden_cpp/BUILD @@ -0,0 +1,18 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +exports_files( + glob(["*.emb.h"]), + visibility = ["//compiler/back_end/cpp:__pkg__"], +) diff --git a/testdata/golden_cpp/absolute_cpp_namespace.emb.h b/testdata/golden_cpp/absolute_cpp_namespace.emb.h new file mode 100644 index 00000000..fb13bb18 --- /dev/null +++ b/testdata/golden_cpp/absolute_cpp_namespace.emb.h @@ -0,0 +1,126 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_ABSOLUTE_CPP_NAMESPACE_EMB_H_ +#define TESTDATA_ABSOLUTE_CPP_NAMESPACE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace leading_double_colon { +enum class Foo : ::std::uint64_t; + + +enum class Foo : ::std::uint64_t { + VALUE = static_cast(12LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Foo *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("VALUE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Foo::VALUE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Foo emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Foo::VALUE: return "VALUE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Foo emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Foo::VALUE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Foo 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::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, + Foo *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Foo emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Foo emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Foo emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + +} // namespace leading_double_colon + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_ABSOLUTE_CPP_NAMESPACE_EMB_H_ + diff --git a/testdata/golden_cpp/alignments.emb.h b/testdata/golden_cpp/alignments.emb.h new file mode 100644 index 00000000..e60daf58 --- /dev/null +++ b/testdata/golden_cpp/alignments.emb.h @@ -0,0 +1,2953 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_ALIGNMENTS_EMB_H_ +#define TESTDATA_ALIGNMENTS_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Alignments { + +} // namespace Alignments + + +template +class GenericAlignmentsView; + +namespace Placeholder4 { + +} // namespace Placeholder4 + + +template +class GenericPlaceholder4View; + +namespace Placeholder6 { + +} // namespace Placeholder6 + + +template +class GenericPlaceholder6View; + + + + + + + + + + + + + + + +namespace Alignments { + +} // namespace Alignments + + +template +struct EmbossReservedInternalIsGenericAlignmentsView; + +template +class GenericAlignmentsView final { + public: + GenericAlignmentsView() : backing_() {} + explicit GenericAlignmentsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericAlignmentsView( + const GenericAlignmentsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericAlignmentsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericAlignmentsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericAlignmentsView &operator=( + const GenericAlignmentsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_zero_offset().Known()) return false; + if (has_zero_offset().ValueOrDefault() && !zero_offset().Ok()) return false; + + + if (!has_zero_offset_substructure().Known()) return false; + if (has_zero_offset_substructure().ValueOrDefault() && !zero_offset_substructure().Ok()) return false; + + + if (!has_two_offset_substructure().Known()) return false; + if (has_two_offset_substructure().ValueOrDefault() && !two_offset_substructure().Ok()) return false; + + + if (!has_three_offset().Known()) return false; + if (has_three_offset().ValueOrDefault() && !three_offset().Ok()) return false; + + + if (!has_four_offset().Known()) return false; + if (has_four_offset().ValueOrDefault() && !four_offset().Ok()) return false; + + + if (!has_eleven_offset().Known()) return false; + if (has_eleven_offset().ValueOrDefault() && !eleven_offset().Ok()) return false; + + + if (!has_twelve_offset().Known()) return false; + if (has_twelve_offset().ValueOrDefault() && !twelve_offset().Ok()) return false; + + + if (!has_zero_offset_four_stride_array().Known()) return false; + if (has_zero_offset_four_stride_array().ValueOrDefault() && !zero_offset_four_stride_array().Ok()) return false; + + + if (!has_zero_offset_six_stride_array().Known()) return false; + if (has_zero_offset_six_stride_array().ValueOrDefault() && !zero_offset_six_stride_array().Ok()) return false; + + + if (!has_three_offset_four_stride_array().Known()) return false; + if (has_three_offset_four_stride_array().ValueOrDefault() && !three_offset_four_stride_array().Ok()) return false; + + + if (!has_four_offset_six_stride_array().Known()) return false; + if (has_four_offset_six_stride_array().ValueOrDefault() && !four_offset_six_stride_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; + + + + return true; + } + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { + return backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericAlignmentsView emboss_reserved_local_other) const { + + if (!has_zero_offset().Known()) return false; + if (!emboss_reserved_local_other.has_zero_offset().Known()) return false; + + if (emboss_reserved_local_other.has_zero_offset().ValueOrDefault() && + !has_zero_offset().ValueOrDefault()) + return false; + if (has_zero_offset().ValueOrDefault() && + !emboss_reserved_local_other.has_zero_offset().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_zero_offset().ValueOrDefault() && + has_zero_offset().ValueOrDefault() && + !zero_offset().Equals(emboss_reserved_local_other.zero_offset())) + return false; + + + + if (!has_zero_offset_substructure().Known()) return false; + if (!emboss_reserved_local_other.has_zero_offset_substructure().Known()) return false; + + if (emboss_reserved_local_other.has_zero_offset_substructure().ValueOrDefault() && + !has_zero_offset_substructure().ValueOrDefault()) + return false; + if (has_zero_offset_substructure().ValueOrDefault() && + !emboss_reserved_local_other.has_zero_offset_substructure().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_zero_offset_substructure().ValueOrDefault() && + has_zero_offset_substructure().ValueOrDefault() && + !zero_offset_substructure().Equals(emboss_reserved_local_other.zero_offset_substructure())) + return false; + + + + if (!has_two_offset_substructure().Known()) return false; + if (!emboss_reserved_local_other.has_two_offset_substructure().Known()) return false; + + if (emboss_reserved_local_other.has_two_offset_substructure().ValueOrDefault() && + !has_two_offset_substructure().ValueOrDefault()) + return false; + if (has_two_offset_substructure().ValueOrDefault() && + !emboss_reserved_local_other.has_two_offset_substructure().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_offset_substructure().ValueOrDefault() && + has_two_offset_substructure().ValueOrDefault() && + !two_offset_substructure().Equals(emboss_reserved_local_other.two_offset_substructure())) + return false; + + + + if (!has_three_offset().Known()) return false; + if (!emboss_reserved_local_other.has_three_offset().Known()) return false; + + if (emboss_reserved_local_other.has_three_offset().ValueOrDefault() && + !has_three_offset().ValueOrDefault()) + return false; + if (has_three_offset().ValueOrDefault() && + !emboss_reserved_local_other.has_three_offset().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_offset().ValueOrDefault() && + has_three_offset().ValueOrDefault() && + !three_offset().Equals(emboss_reserved_local_other.three_offset())) + return false; + + + + if (!has_four_offset().Known()) return false; + if (!emboss_reserved_local_other.has_four_offset().Known()) return false; + + if (emboss_reserved_local_other.has_four_offset().ValueOrDefault() && + !has_four_offset().ValueOrDefault()) + return false; + if (has_four_offset().ValueOrDefault() && + !emboss_reserved_local_other.has_four_offset().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_offset().ValueOrDefault() && + has_four_offset().ValueOrDefault() && + !four_offset().Equals(emboss_reserved_local_other.four_offset())) + return false; + + + + if (!has_eleven_offset().Known()) return false; + if (!emboss_reserved_local_other.has_eleven_offset().Known()) return false; + + if (emboss_reserved_local_other.has_eleven_offset().ValueOrDefault() && + !has_eleven_offset().ValueOrDefault()) + return false; + if (has_eleven_offset().ValueOrDefault() && + !emboss_reserved_local_other.has_eleven_offset().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_eleven_offset().ValueOrDefault() && + has_eleven_offset().ValueOrDefault() && + !eleven_offset().Equals(emboss_reserved_local_other.eleven_offset())) + return false; + + + + if (!has_twelve_offset().Known()) return false; + if (!emboss_reserved_local_other.has_twelve_offset().Known()) return false; + + if (emboss_reserved_local_other.has_twelve_offset().ValueOrDefault() && + !has_twelve_offset().ValueOrDefault()) + return false; + if (has_twelve_offset().ValueOrDefault() && + !emboss_reserved_local_other.has_twelve_offset().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_twelve_offset().ValueOrDefault() && + has_twelve_offset().ValueOrDefault() && + !twelve_offset().Equals(emboss_reserved_local_other.twelve_offset())) + return false; + + + + if (!has_zero_offset_four_stride_array().Known()) return false; + if (!emboss_reserved_local_other.has_zero_offset_four_stride_array().Known()) return false; + + if (emboss_reserved_local_other.has_zero_offset_four_stride_array().ValueOrDefault() && + !has_zero_offset_four_stride_array().ValueOrDefault()) + return false; + if (has_zero_offset_four_stride_array().ValueOrDefault() && + !emboss_reserved_local_other.has_zero_offset_four_stride_array().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_zero_offset_four_stride_array().ValueOrDefault() && + has_zero_offset_four_stride_array().ValueOrDefault() && + !zero_offset_four_stride_array().Equals(emboss_reserved_local_other.zero_offset_four_stride_array())) + return false; + + + + if (!has_zero_offset_six_stride_array().Known()) return false; + if (!emboss_reserved_local_other.has_zero_offset_six_stride_array().Known()) return false; + + if (emboss_reserved_local_other.has_zero_offset_six_stride_array().ValueOrDefault() && + !has_zero_offset_six_stride_array().ValueOrDefault()) + return false; + if (has_zero_offset_six_stride_array().ValueOrDefault() && + !emboss_reserved_local_other.has_zero_offset_six_stride_array().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_zero_offset_six_stride_array().ValueOrDefault() && + has_zero_offset_six_stride_array().ValueOrDefault() && + !zero_offset_six_stride_array().Equals(emboss_reserved_local_other.zero_offset_six_stride_array())) + return false; + + + + if (!has_three_offset_four_stride_array().Known()) return false; + if (!emboss_reserved_local_other.has_three_offset_four_stride_array().Known()) return false; + + if (emboss_reserved_local_other.has_three_offset_four_stride_array().ValueOrDefault() && + !has_three_offset_four_stride_array().ValueOrDefault()) + return false; + if (has_three_offset_four_stride_array().ValueOrDefault() && + !emboss_reserved_local_other.has_three_offset_four_stride_array().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_offset_four_stride_array().ValueOrDefault() && + has_three_offset_four_stride_array().ValueOrDefault() && + !three_offset_four_stride_array().Equals(emboss_reserved_local_other.three_offset_four_stride_array())) + return false; + + + + if (!has_four_offset_six_stride_array().Known()) return false; + if (!emboss_reserved_local_other.has_four_offset_six_stride_array().Known()) return false; + + if (emboss_reserved_local_other.has_four_offset_six_stride_array().ValueOrDefault() && + !has_four_offset_six_stride_array().ValueOrDefault()) + return false; + if (has_four_offset_six_stride_array().ValueOrDefault() && + !emboss_reserved_local_other.has_four_offset_six_stride_array().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_offset_six_stride_array().ValueOrDefault() && + has_four_offset_six_stride_array().ValueOrDefault() && + !four_offset_six_stride_array().Equals(emboss_reserved_local_other.four_offset_six_stride_array())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAlignmentsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_zero_offset().ValueOr(false) && + !has_zero_offset().ValueOr(false)) + return false; + if (has_zero_offset().ValueOr(false) && + !emboss_reserved_local_other.has_zero_offset().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_zero_offset().ValueOr(false) && + has_zero_offset().ValueOr(false) && + !zero_offset().UncheckedEquals(emboss_reserved_local_other.zero_offset())) + return false; + + + + if (emboss_reserved_local_other.has_zero_offset_substructure().ValueOr(false) && + !has_zero_offset_substructure().ValueOr(false)) + return false; + if (has_zero_offset_substructure().ValueOr(false) && + !emboss_reserved_local_other.has_zero_offset_substructure().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_zero_offset_substructure().ValueOr(false) && + has_zero_offset_substructure().ValueOr(false) && + !zero_offset_substructure().UncheckedEquals(emboss_reserved_local_other.zero_offset_substructure())) + return false; + + + + if (emboss_reserved_local_other.has_two_offset_substructure().ValueOr(false) && + !has_two_offset_substructure().ValueOr(false)) + return false; + if (has_two_offset_substructure().ValueOr(false) && + !emboss_reserved_local_other.has_two_offset_substructure().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_offset_substructure().ValueOr(false) && + has_two_offset_substructure().ValueOr(false) && + !two_offset_substructure().UncheckedEquals(emboss_reserved_local_other.two_offset_substructure())) + return false; + + + + if (emboss_reserved_local_other.has_three_offset().ValueOr(false) && + !has_three_offset().ValueOr(false)) + return false; + if (has_three_offset().ValueOr(false) && + !emboss_reserved_local_other.has_three_offset().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_offset().ValueOr(false) && + has_three_offset().ValueOr(false) && + !three_offset().UncheckedEquals(emboss_reserved_local_other.three_offset())) + return false; + + + + if (emboss_reserved_local_other.has_four_offset().ValueOr(false) && + !has_four_offset().ValueOr(false)) + return false; + if (has_four_offset().ValueOr(false) && + !emboss_reserved_local_other.has_four_offset().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_offset().ValueOr(false) && + has_four_offset().ValueOr(false) && + !four_offset().UncheckedEquals(emboss_reserved_local_other.four_offset())) + return false; + + + + if (emboss_reserved_local_other.has_eleven_offset().ValueOr(false) && + !has_eleven_offset().ValueOr(false)) + return false; + if (has_eleven_offset().ValueOr(false) && + !emboss_reserved_local_other.has_eleven_offset().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_eleven_offset().ValueOr(false) && + has_eleven_offset().ValueOr(false) && + !eleven_offset().UncheckedEquals(emboss_reserved_local_other.eleven_offset())) + return false; + + + + if (emboss_reserved_local_other.has_twelve_offset().ValueOr(false) && + !has_twelve_offset().ValueOr(false)) + return false; + if (has_twelve_offset().ValueOr(false) && + !emboss_reserved_local_other.has_twelve_offset().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_twelve_offset().ValueOr(false) && + has_twelve_offset().ValueOr(false) && + !twelve_offset().UncheckedEquals(emboss_reserved_local_other.twelve_offset())) + return false; + + + + if (emboss_reserved_local_other.has_zero_offset_four_stride_array().ValueOr(false) && + !has_zero_offset_four_stride_array().ValueOr(false)) + return false; + if (has_zero_offset_four_stride_array().ValueOr(false) && + !emboss_reserved_local_other.has_zero_offset_four_stride_array().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_zero_offset_four_stride_array().ValueOr(false) && + has_zero_offset_four_stride_array().ValueOr(false) && + !zero_offset_four_stride_array().UncheckedEquals(emboss_reserved_local_other.zero_offset_four_stride_array())) + return false; + + + + if (emboss_reserved_local_other.has_zero_offset_six_stride_array().ValueOr(false) && + !has_zero_offset_six_stride_array().ValueOr(false)) + return false; + if (has_zero_offset_six_stride_array().ValueOr(false) && + !emboss_reserved_local_other.has_zero_offset_six_stride_array().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_zero_offset_six_stride_array().ValueOr(false) && + has_zero_offset_six_stride_array().ValueOr(false) && + !zero_offset_six_stride_array().UncheckedEquals(emboss_reserved_local_other.zero_offset_six_stride_array())) + return false; + + + + if (emboss_reserved_local_other.has_three_offset_four_stride_array().ValueOr(false) && + !has_three_offset_four_stride_array().ValueOr(false)) + return false; + if (has_three_offset_four_stride_array().ValueOr(false) && + !emboss_reserved_local_other.has_three_offset_four_stride_array().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_offset_four_stride_array().ValueOr(false) && + has_three_offset_four_stride_array().ValueOr(false) && + !three_offset_four_stride_array().UncheckedEquals(emboss_reserved_local_other.three_offset_four_stride_array())) + return false; + + + + if (emboss_reserved_local_other.has_four_offset_six_stride_array().ValueOr(false) && + !has_four_offset_six_stride_array().ValueOr(false)) + return false; + if (has_four_offset_six_stride_array().ValueOr(false) && + !emboss_reserved_local_other.has_four_offset_six_stride_array().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_offset_six_stride_array().ValueOr(false) && + has_four_offset_six_stride_array().ValueOr(false) && + !four_offset_six_stride_array().UncheckedEquals(emboss_reserved_local_other.four_offset_six_stride_array())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAlignmentsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAlignmentsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAlignmentsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "zero_offset") { + if (!zero_offset().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "zero_offset_substructure") { + if (!zero_offset_substructure().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_offset_substructure") { + if (!two_offset_substructure().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_offset") { + if (!three_offset().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_offset") { + if (!four_offset().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "eleven_offset") { + if (!eleven_offset().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "twelve_offset") { + if (!twelve_offset().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "zero_offset_four_stride_array") { + if (!zero_offset_four_stride_array().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "zero_offset_six_stride_array") { + if (!zero_offset_six_stride_array().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_offset_four_stride_array") { + if (!three_offset_four_stride_array().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_offset_six_stride_array") { + if (!four_offset_six_stride_array().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_zero_offset().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + zero_offset().IsAggregate() || zero_offset().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("zero_offset: "); + zero_offset().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !zero_offset().IsAggregate() && !zero_offset().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("# zero_offset: UNREADABLE\n"); + } + } + + if (has_zero_offset_substructure().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + zero_offset_substructure().IsAggregate() || zero_offset_substructure().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("zero_offset_substructure: "); + zero_offset_substructure().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !zero_offset_substructure().IsAggregate() && !zero_offset_substructure().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("# zero_offset_substructure: UNREADABLE\n"); + } + } + + if (has_two_offset_substructure().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_offset_substructure().IsAggregate() || two_offset_substructure().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_offset_substructure: "); + two_offset_substructure().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_offset_substructure().IsAggregate() && !two_offset_substructure().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_offset_substructure: UNREADABLE\n"); + } + } + + if (has_three_offset().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_offset().IsAggregate() || three_offset().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_offset: "); + three_offset().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_offset().IsAggregate() && !three_offset().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("# three_offset: UNREADABLE\n"); + } + } + + if (has_four_offset().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_offset().IsAggregate() || four_offset().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_offset: "); + four_offset().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_offset().IsAggregate() && !four_offset().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_offset: UNREADABLE\n"); + } + } + + if (has_eleven_offset().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + eleven_offset().IsAggregate() || eleven_offset().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("eleven_offset: "); + eleven_offset().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !eleven_offset().IsAggregate() && !eleven_offset().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("# eleven_offset: UNREADABLE\n"); + } + } + + if (has_twelve_offset().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + twelve_offset().IsAggregate() || twelve_offset().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("twelve_offset: "); + twelve_offset().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !twelve_offset().IsAggregate() && !twelve_offset().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("# twelve_offset: UNREADABLE\n"); + } + } + + if (has_zero_offset_four_stride_array().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + zero_offset_four_stride_array().IsAggregate() || zero_offset_four_stride_array().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("zero_offset_four_stride_array: "); + zero_offset_four_stride_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !zero_offset_four_stride_array().IsAggregate() && !zero_offset_four_stride_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("# zero_offset_four_stride_array: UNREADABLE\n"); + } + } + + if (has_zero_offset_six_stride_array().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + zero_offset_six_stride_array().IsAggregate() || zero_offset_six_stride_array().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("zero_offset_six_stride_array: "); + zero_offset_six_stride_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !zero_offset_six_stride_array().IsAggregate() && !zero_offset_six_stride_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("# zero_offset_six_stride_array: UNREADABLE\n"); + } + } + + if (has_three_offset_four_stride_array().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_offset_four_stride_array().IsAggregate() || three_offset_four_stride_array().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_offset_four_stride_array: "); + three_offset_four_stride_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_offset_four_stride_array().IsAggregate() && !three_offset_four_stride_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("# three_offset_four_stride_array: UNREADABLE\n"); + } + } + + if (has_four_offset_six_stride_array().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_offset_six_stride_array().IsAggregate() || four_offset_six_stride_array().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_offset_six_stride_array: "); + four_offset_six_stride_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_offset_six_stride_array().IsAggregate() && !four_offset_six_stride_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("# four_offset_six_stride_array: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericPlaceholder4View> + + zero_offset() const; + ::emboss::support::Maybe has_zero_offset() const; + + public: + typename ::emboss::test::GenericPlaceholder6View> + + zero_offset_substructure() const; + ::emboss::support::Maybe has_zero_offset_substructure() const; + + public: + typename ::emboss::test::GenericPlaceholder6View> + + two_offset_substructure() const; + ::emboss::support::Maybe has_two_offset_substructure() const; + + public: + typename ::emboss::test::GenericPlaceholder4View> + + three_offset() const; + ::emboss::support::Maybe has_three_offset() const; + + public: + typename ::emboss::test::GenericPlaceholder4View> + + four_offset() const; + ::emboss::support::Maybe has_four_offset() const; + + public: + typename ::emboss::test::GenericPlaceholder4View> + + eleven_offset() const; + ::emboss::support::Maybe has_eleven_offset() const; + + public: + typename ::emboss::test::GenericPlaceholder4View> + + twelve_offset() const; + ::emboss::support::Maybe has_twelve_offset() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 > + + zero_offset_four_stride_array() const; + ::emboss::support::Maybe has_zero_offset_four_stride_array() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 6, + 8 > + + zero_offset_six_stride_array() const; + ::emboss::support::Maybe has_zero_offset_six_stride_array() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 > + + three_offset_four_stride_array() const; + ::emboss::support::Maybe has_three_offset_four_stride_array() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 6, + 8 > + + four_offset_six_stride_array() const; + ::emboss::support::Maybe has_four_offset_six_stride_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericAlignmentsView; +}; +using AlignmentsView = + GenericAlignmentsView; +using AlignmentsWriter = + GenericAlignmentsView; + +template +struct EmbossReservedInternalIsGenericAlignmentsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAlignmentsView< + GenericAlignmentsView> { + static constexpr const bool value = true; +}; + +template +inline GenericAlignmentsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAlignmentsView( T &&emboss_reserved_local_arg) { + return GenericAlignmentsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAlignmentsView> +MakeAlignmentsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAlignmentsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAlignmentsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAlignmentsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAlignmentsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace Placeholder4 { + +} // namespace Placeholder4 + + +template +struct EmbossReservedInternalIsGenericPlaceholder4View; + +template +class GenericPlaceholder4View final { + public: + GenericPlaceholder4View() : backing_() {} + explicit GenericPlaceholder4View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericPlaceholder4View( + const GenericPlaceholder4View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericPlaceholder4View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericPlaceholder4View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericPlaceholder4View &operator=( + const GenericPlaceholder4View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_dummy().Known()) return false; + if (has_dummy().ValueOrDefault() && !dummy().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericPlaceholder4View emboss_reserved_local_other) const { + + if (!has_dummy().Known()) return false; + if (!emboss_reserved_local_other.has_dummy().Known()) return false; + + if (emboss_reserved_local_other.has_dummy().ValueOrDefault() && + !has_dummy().ValueOrDefault()) + return false; + if (has_dummy().ValueOrDefault() && + !emboss_reserved_local_other.has_dummy().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_dummy().ValueOrDefault() && + has_dummy().ValueOrDefault() && + !dummy().Equals(emboss_reserved_local_other.dummy())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericPlaceholder4View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_dummy().ValueOr(false) && + !has_dummy().ValueOr(false)) + return false; + if (has_dummy().ValueOr(false) && + !emboss_reserved_local_other.has_dummy().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_dummy().ValueOr(false) && + has_dummy().ValueOr(false) && + !dummy().UncheckedEquals(emboss_reserved_local_other.dummy())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericPlaceholder4View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericPlaceholder4View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericPlaceholder4View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "dummy") { + if (!dummy().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_dummy().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + dummy().IsAggregate() || dummy().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("dummy: "); + dummy().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !dummy().IsAggregate() && !dummy().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("# dummy: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + dummy() const; + ::emboss::support::Maybe has_dummy() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericPlaceholder4View; +}; +using Placeholder4View = + GenericPlaceholder4View; +using Placeholder4Writer = + GenericPlaceholder4View; + +template +struct EmbossReservedInternalIsGenericPlaceholder4View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericPlaceholder4View< + GenericPlaceholder4View> { + static constexpr const bool value = true; +}; + +template +inline GenericPlaceholder4View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakePlaceholder4View( T &&emboss_reserved_local_arg) { + return GenericPlaceholder4View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericPlaceholder4View> +MakePlaceholder4View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericPlaceholder4View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericPlaceholder4View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedPlaceholder4View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericPlaceholder4View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace Placeholder6 { + +} // namespace Placeholder6 + + +template +struct EmbossReservedInternalIsGenericPlaceholder6View; + +template +class GenericPlaceholder6View final { + public: + GenericPlaceholder6View() : backing_() {} + explicit GenericPlaceholder6View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericPlaceholder6View( + const GenericPlaceholder6View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericPlaceholder6View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericPlaceholder6View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericPlaceholder6View &operator=( + const GenericPlaceholder6View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_zero_offset().Known()) return false; + if (has_zero_offset().ValueOrDefault() && !zero_offset().Ok()) return false; + + + if (!has_two_offset().Known()) return false; + if (has_two_offset().ValueOrDefault() && !two_offset().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericPlaceholder6View emboss_reserved_local_other) const { + + if (!has_zero_offset().Known()) return false; + if (!emboss_reserved_local_other.has_zero_offset().Known()) return false; + + if (emboss_reserved_local_other.has_zero_offset().ValueOrDefault() && + !has_zero_offset().ValueOrDefault()) + return false; + if (has_zero_offset().ValueOrDefault() && + !emboss_reserved_local_other.has_zero_offset().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_zero_offset().ValueOrDefault() && + has_zero_offset().ValueOrDefault() && + !zero_offset().Equals(emboss_reserved_local_other.zero_offset())) + return false; + + + + if (!has_two_offset().Known()) return false; + if (!emboss_reserved_local_other.has_two_offset().Known()) return false; + + if (emboss_reserved_local_other.has_two_offset().ValueOrDefault() && + !has_two_offset().ValueOrDefault()) + return false; + if (has_two_offset().ValueOrDefault() && + !emboss_reserved_local_other.has_two_offset().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_offset().ValueOrDefault() && + has_two_offset().ValueOrDefault() && + !two_offset().Equals(emboss_reserved_local_other.two_offset())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericPlaceholder6View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_zero_offset().ValueOr(false) && + !has_zero_offset().ValueOr(false)) + return false; + if (has_zero_offset().ValueOr(false) && + !emboss_reserved_local_other.has_zero_offset().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_zero_offset().ValueOr(false) && + has_zero_offset().ValueOr(false) && + !zero_offset().UncheckedEquals(emboss_reserved_local_other.zero_offset())) + return false; + + + + if (emboss_reserved_local_other.has_two_offset().ValueOr(false) && + !has_two_offset().ValueOr(false)) + return false; + if (has_two_offset().ValueOr(false) && + !emboss_reserved_local_other.has_two_offset().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_offset().ValueOr(false) && + has_two_offset().ValueOr(false) && + !two_offset().UncheckedEquals(emboss_reserved_local_other.two_offset())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericPlaceholder6View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericPlaceholder6View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericPlaceholder6View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "zero_offset") { + if (!zero_offset().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_offset") { + if (!two_offset().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_zero_offset().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + zero_offset().IsAggregate() || zero_offset().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("zero_offset: "); + zero_offset().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !zero_offset().IsAggregate() && !zero_offset().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("# zero_offset: UNREADABLE\n"); + } + } + + if (has_two_offset().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_offset().IsAggregate() || two_offset().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_offset: "); + two_offset().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_offset().IsAggregate() && !two_offset().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_offset: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericPlaceholder4View> + + zero_offset() const; + ::emboss::support::Maybe has_zero_offset() const; + + public: + typename ::emboss::test::GenericPlaceholder4View> + + two_offset() const; + ::emboss::support::Maybe has_two_offset() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericPlaceholder6View; +}; +using Placeholder6View = + GenericPlaceholder6View; +using Placeholder6Writer = + GenericPlaceholder6View; + +template +struct EmbossReservedInternalIsGenericPlaceholder6View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericPlaceholder6View< + GenericPlaceholder6View> { + static constexpr const bool value = true; +}; + +template +inline GenericPlaceholder6View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakePlaceholder6View( T &&emboss_reserved_local_arg) { + return GenericPlaceholder6View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericPlaceholder6View> +MakePlaceholder6View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericPlaceholder6View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericPlaceholder6View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedPlaceholder6View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericPlaceholder6View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Alignments { + +} // namespace Alignments + + +template +inline typename ::emboss::test::GenericPlaceholder4View> + + GenericAlignmentsView::zero_offset() + const { + + if ( has_zero_offset().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder4View> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder4View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_zero_offset() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericPlaceholder6View> + + GenericAlignmentsView::zero_offset_substructure() + const { + + if ( has_zero_offset_substructure().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder6View> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder6View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_zero_offset_substructure() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericPlaceholder6View> + + GenericAlignmentsView::two_offset_substructure() + const { + + if ( has_two_offset_substructure().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder6View> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder6View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_two_offset_substructure() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericPlaceholder4View> + + GenericAlignmentsView::three_offset() + const { + + if ( has_three_offset().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder4View> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder4View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_three_offset() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericPlaceholder4View> + + GenericAlignmentsView::four_offset() + const { + + if ( has_four_offset().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder4View> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder4View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_four_offset() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericPlaceholder4View> + + GenericAlignmentsView::eleven_offset() + const { + + if ( has_eleven_offset().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(11LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder4View> + +( + backing_ + .template GetOffsetStorage<0, + 11>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder4View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_eleven_offset() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericPlaceholder4View> + + GenericAlignmentsView::twelve_offset() + const { + + if ( has_twelve_offset().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(12LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder4View> + +( + backing_ + .template GetOffsetStorage<0, + 12>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder4View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_twelve_offset() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 > + + GenericAlignmentsView::zero_offset_four_stride_array() + const { + + if ( has_zero_offset_four_stride_array().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(12LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_zero_offset_four_stride_array() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 6, + 8 > + + GenericAlignmentsView::zero_offset_six_stride_array() + const { + + if ( has_zero_offset_six_stride_array().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(24LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 6, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 6, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_zero_offset_six_stride_array() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 > + + GenericAlignmentsView::three_offset_four_stride_array() + const { + + if ( has_three_offset_four_stride_array().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(12LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder4View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_three_offset_four_stride_array() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 6, + 8 > + + GenericAlignmentsView::four_offset_six_stride_array() + const { + + if ( has_four_offset_six_stride_array().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(24LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 6, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericPlaceholder6View::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 6, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlignmentsView::has_four_offset_six_stride_array() const { + return ::emboss::support::Maybe(true); +} + + +namespace Alignments { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(28LL)).ValueOrDefault(); +} +} // namespace Alignments + +template +inline constexpr ::std::int32_t +GenericAlignmentsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Alignments::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlignmentsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Alignments::IntrinsicSizeInBytes(); +} + +namespace Alignments { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(28LL)).ValueOrDefault(); +} +} // namespace Alignments + +template +inline constexpr ::std::int32_t +GenericAlignmentsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Alignments::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlignmentsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Alignments::MaxSizeInBytes(); +} + +namespace Alignments { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(28LL)).ValueOrDefault(); +} +} // namespace Alignments + +template +inline constexpr ::std::int32_t +GenericAlignmentsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Alignments::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlignmentsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Alignments::MinSizeInBytes(); +} +namespace Placeholder4 { + +} // namespace Placeholder4 + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericPlaceholder4View::dummy() + const { + + if ( has_dummy().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPlaceholder4View::has_dummy() const { + return ::emboss::support::Maybe(true); +} + + +namespace Placeholder4 { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Placeholder4 + +template +inline constexpr ::std::int32_t +GenericPlaceholder4View::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Placeholder4::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericPlaceholder4View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Placeholder4::IntrinsicSizeInBytes(); +} + +namespace Placeholder4 { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Placeholder4 + +template +inline constexpr ::std::int32_t +GenericPlaceholder4View::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Placeholder4::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericPlaceholder4View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Placeholder4::MaxSizeInBytes(); +} + +namespace Placeholder4 { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Placeholder4 + +template +inline constexpr ::std::int32_t +GenericPlaceholder4View::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Placeholder4::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericPlaceholder4View< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Placeholder4::MinSizeInBytes(); +} +namespace Placeholder6 { + +} // namespace Placeholder6 + + +template +inline typename ::emboss::test::GenericPlaceholder4View> + + GenericPlaceholder6View::zero_offset() + const { + + if ( has_zero_offset().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder4View> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder4View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPlaceholder6View::has_zero_offset() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericPlaceholder4View> + + GenericPlaceholder6View::two_offset() + const { + + if ( has_two_offset().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericPlaceholder4View> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericPlaceholder4View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPlaceholder6View::has_two_offset() const { + return ::emboss::support::Maybe(true); +} + + +namespace Placeholder6 { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(6LL)).ValueOrDefault(); +} +} // namespace Placeholder6 + +template +inline constexpr ::std::int32_t +GenericPlaceholder6View::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Placeholder6::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericPlaceholder6View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Placeholder6::IntrinsicSizeInBytes(); +} + +namespace Placeholder6 { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(6LL)).ValueOrDefault(); +} +} // namespace Placeholder6 + +template +inline constexpr ::std::int32_t +GenericPlaceholder6View::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Placeholder6::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericPlaceholder6View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Placeholder6::MaxSizeInBytes(); +} + +namespace Placeholder6 { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(6LL)).ValueOrDefault(); +} +} // namespace Placeholder6 + +template +inline constexpr ::std::int32_t +GenericPlaceholder6View::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Placeholder6::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericPlaceholder6View< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Placeholder6::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_ALIGNMENTS_EMB_H_ + diff --git a/testdata/golden_cpp/anonymous_bits.emb.h b/testdata/golden_cpp/anonymous_bits.emb.h new file mode 100644 index 00000000..7d505c9a --- /dev/null +++ b/testdata/golden_cpp/anonymous_bits.emb.h @@ -0,0 +1,2417 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_ANONYMOUS_BITS_EMB_H_ +#define TESTDATA_ANONYMOUS_BITS_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Foo { +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +class GenericEmbossReservedAnonymousField2View; + + +enum class Bar : ::std::uint64_t; + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +class GenericEmbossReservedAnonymousField1View; + + +} // namespace Foo + + +template +class GenericFooView; + + + + + + + + + + + +namespace Foo { + + + + + +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View; + +template +class GenericEmbossReservedAnonymousField2View final { + public: + GenericEmbossReservedAnonymousField2View() : backing_() {} + explicit GenericEmbossReservedAnonymousField2View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField2View( + const GenericEmbossReservedAnonymousField2View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField2View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField2View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField2View &operator=( + const GenericEmbossReservedAnonymousField2View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_high_bit().Known()) return false; + if (has_high_bit().ValueOrDefault() && !high_bit().Ok()) return false; + + + if (!has_bar().Known()) return false; + if (has_bar().ValueOrDefault() && !bar().Ok()) return false; + + + if (!has_first_bit().Known()) return false; + if (has_first_bit().ValueOrDefault() && !first_bit().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + + if (!has_high_bit().Known()) return false; + if (!emboss_reserved_local_other.has_high_bit().Known()) return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOrDefault() && + !has_high_bit().ValueOrDefault()) + return false; + if (has_high_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_high_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOrDefault() && + has_high_bit().ValueOrDefault() && + !high_bit().Equals(emboss_reserved_local_other.high_bit())) + return false; + + + + if (!has_bar().Known()) return false; + if (!emboss_reserved_local_other.has_bar().Known()) return false; + + if (emboss_reserved_local_other.has_bar().ValueOrDefault() && + !has_bar().ValueOrDefault()) + return false; + if (has_bar().ValueOrDefault() && + !emboss_reserved_local_other.has_bar().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_bar().ValueOrDefault() && + has_bar().ValueOrDefault() && + !bar().Equals(emboss_reserved_local_other.bar())) + return false; + + + + if (!has_first_bit().Known()) return false; + if (!emboss_reserved_local_other.has_first_bit().Known()) return false; + + if (emboss_reserved_local_other.has_first_bit().ValueOrDefault() && + !has_first_bit().ValueOrDefault()) + return false; + if (has_first_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_first_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_first_bit().ValueOrDefault() && + has_first_bit().ValueOrDefault() && + !first_bit().Equals(emboss_reserved_local_other.first_bit())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && + !has_high_bit().ValueOr(false)) + return false; + if (has_high_bit().ValueOr(false) && + !emboss_reserved_local_other.has_high_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && + has_high_bit().ValueOr(false) && + !high_bit().UncheckedEquals(emboss_reserved_local_other.high_bit())) + return false; + + + + if (emboss_reserved_local_other.has_bar().ValueOr(false) && + !has_bar().ValueOr(false)) + return false; + if (has_bar().ValueOr(false) && + !emboss_reserved_local_other.has_bar().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_bar().ValueOr(false) && + has_bar().ValueOr(false) && + !bar().UncheckedEquals(emboss_reserved_local_other.bar())) + return false; + + + + if (emboss_reserved_local_other.has_first_bit().ValueOr(false) && + !has_first_bit().ValueOr(false)) + return false; + if (has_first_bit().ValueOr(false) && + !emboss_reserved_local_other.has_first_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_first_bit().ValueOr(false) && + has_first_bit().ValueOr(false) && + !first_bit().UncheckedEquals(emboss_reserved_local_other.first_bit())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "high_bit") { + if (!high_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "bar") { + if (!bar().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "first_bit") { + if (!first_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_high_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + high_bit().IsAggregate() || high_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("high_bit: "); + high_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !high_bit().IsAggregate() && !high_bit().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("# high_bit: UNREADABLE\n"); + } + } + + if (has_bar().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + bar().IsAggregate() || bar().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("bar: "); + bar().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !bar().IsAggregate() && !bar().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("# bar: UNREADABLE\n"); + } + } + + if (has_first_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + first_bit().IsAggregate() || first_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("first_bit: "); + first_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !first_bit().IsAggregate() && !first_bit().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_bit: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + high_bit() const; + ::emboss::support::Maybe has_high_bit() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::Bar, + ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + bar() const; + ::emboss::support::Maybe has_bar() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + first_bit() const; + ::emboss::support::Maybe has_first_bit() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField2View; +}; +using EmbossReservedAnonymousField2View = + GenericEmbossReservedAnonymousField2View; +using EmbossReservedAnonymousField2Writer = + GenericEmbossReservedAnonymousField2View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< + GenericEmbossReservedAnonymousField2View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField2View> +MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField2View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField2View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +enum class Bar : ::std::uint64_t { + BAR = static_cast(0LL), + BAZ = static_cast(1LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Bar *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("BAR", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Bar::BAR; + return true; + } + + if (!strcmp("BAZ", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Bar::BAZ; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Bar emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Bar::BAR: return "BAR"; + + case Bar::BAZ: return "BAZ"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Bar emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Bar::BAR: return true; + + case Bar::BAZ: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Bar 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::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, + Bar *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Bar emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Bar emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Bar emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; + +template +class GenericEmbossReservedAnonymousField1View final { + public: + GenericEmbossReservedAnonymousField1View() : backing_() {} + explicit GenericEmbossReservedAnonymousField1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField1View( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField1View &operator=( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_bit_23().Known()) return false; + if (has_bit_23().ValueOrDefault() && !bit_23().Ok()) return false; + + + if (!has_low_bit().Known()) return false; + if (has_low_bit().ValueOrDefault() && !low_bit().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (!has_bit_23().Known()) return false; + if (!emboss_reserved_local_other.has_bit_23().Known()) return false; + + if (emboss_reserved_local_other.has_bit_23().ValueOrDefault() && + !has_bit_23().ValueOrDefault()) + return false; + if (has_bit_23().ValueOrDefault() && + !emboss_reserved_local_other.has_bit_23().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_bit_23().ValueOrDefault() && + has_bit_23().ValueOrDefault() && + !bit_23().Equals(emboss_reserved_local_other.bit_23())) + return false; + + + + if (!has_low_bit().Known()) return false; + if (!emboss_reserved_local_other.has_low_bit().Known()) return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOrDefault() && + !has_low_bit().ValueOrDefault()) + return false; + if (has_low_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_low_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOrDefault() && + has_low_bit().ValueOrDefault() && + !low_bit().Equals(emboss_reserved_local_other.low_bit())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_bit_23().ValueOr(false) && + !has_bit_23().ValueOr(false)) + return false; + if (has_bit_23().ValueOr(false) && + !emboss_reserved_local_other.has_bit_23().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_bit_23().ValueOr(false) && + has_bit_23().ValueOr(false) && + !bit_23().UncheckedEquals(emboss_reserved_local_other.bit_23())) + return false; + + + + if (emboss_reserved_local_other.has_low_bit().ValueOr(false) && + !has_low_bit().ValueOr(false)) + return false; + if (has_low_bit().ValueOr(false) && + !emboss_reserved_local_other.has_low_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOr(false) && + has_low_bit().ValueOr(false) && + !low_bit().UncheckedEquals(emboss_reserved_local_other.low_bit())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "bit_23") { + if (!bit_23().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "low_bit") { + if (!low_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_bit_23().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + bit_23().IsAggregate() || bit_23().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("bit_23: "); + bit_23().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !bit_23().IsAggregate() && !bit_23().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("# bit_23: UNREADABLE\n"); + } + } + + if (has_low_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + low_bit().IsAggregate() || low_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("low_bit: "); + low_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !low_bit().IsAggregate() && !low_bit().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("# low_bit: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + bit_23() const; + ::emboss::support::Maybe has_bit_23() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + low_bit() const; + ::emboss::support::Maybe has_low_bit() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField1View; +}; +using EmbossReservedAnonymousField1View = + GenericEmbossReservedAnonymousField1View; +using EmbossReservedAnonymousField1Writer = + GenericEmbossReservedAnonymousField1View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< + GenericEmbossReservedAnonymousField1View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField1View> +MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace Foo + + +template +struct EmbossReservedInternalIsGenericFooView; + +template +class GenericFooView final { + public: + GenericFooView() : backing_() {} + explicit GenericFooView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericFooView( + const GenericFooView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericFooView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericFooView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericFooView &operator=( + const GenericFooView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + using Bar = ::emboss::test::Foo::Bar; + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_emboss_reserved_anonymous_field_2().Known()) return false; + if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; + + + if (!has_high_bit().Known()) return false; + if (has_high_bit().ValueOrDefault() && !high_bit().Ok()) return false; + + + if (!has_bar().Known()) return false; + if (has_bar().ValueOrDefault() && !bar().Ok()) return false; + + + if (!has_first_bit().Known()) return false; + if (has_first_bit().ValueOrDefault() && !first_bit().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_bit_23().Known()) return false; + if (has_bit_23().ValueOrDefault() && !bit_23().Ok()) return false; + + + if (!has_low_bit().Known()) return false; + if (has_low_bit().ValueOrDefault() && !low_bit().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericFooView emboss_reserved_local_other) const { + + if (!has_emboss_reserved_anonymous_field_2().Known()) return false; + if (!emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().Known()) return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !has_emboss_reserved_anonymous_field_2().ValueOrDefault()) + return false; + if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !emboss_reserved_anonymous_field_2().Equals(emboss_reserved_local_other.emboss_reserved_anonymous_field_2())) + 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; + + return true; + } + template + bool UncheckedEquals( + GenericFooView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !has_emboss_reserved_anonymous_field_2().ValueOr(false)) + return false; + if (has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && + has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !emboss_reserved_anonymous_field_2().UncheckedEquals(emboss_reserved_local_other.emboss_reserved_anonymous_field_2())) + 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; + + return true; + } + template + void UncheckedCopyFrom( + GenericFooView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericFooView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericFooView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "high_bit") { + if (!high_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "bar") { + if (!bar().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "first_bit") { + if (!first_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "bit_23") { + if (!bit_23().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "low_bit") { + if (!low_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_high_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + high_bit().IsAggregate() || high_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("high_bit: "); + high_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !high_bit().IsAggregate() && !high_bit().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("# high_bit: UNREADABLE\n"); + } + } + + if (has_bar().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + bar().IsAggregate() || bar().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("bar: "); + bar().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !bar().IsAggregate() && !bar().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("# bar: UNREADABLE\n"); + } + } + + if (has_first_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + first_bit().IsAggregate() || first_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("first_bit: "); + first_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !first_bit().IsAggregate() && !first_bit().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_bit: UNREADABLE\n"); + } + } + + if (has_bit_23().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + bit_23().IsAggregate() || bit_23().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("bit_23: "); + bit_23().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !bit_23().IsAggregate() && !bit_23().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("# bit_23: UNREADABLE\n"); + } + } + + if (has_low_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + low_bit().IsAggregate() || low_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("low_bit: "); + low_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !low_bit().IsAggregate() && !low_bit().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("# low_bit: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField2View>, 32>> + + emboss_reserved_anonymous_field_2() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + + public: + auto high_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().high_bit()) { + return has_high_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_2().high_bit() + : decltype(this->emboss_reserved_anonymous_field_2().high_bit())(); + } + ::emboss::support::Maybe has_high_bit() const; + + public: + auto bar() const -> decltype(this->emboss_reserved_anonymous_field_2().bar()) { + return has_bar().ValueOrDefault() ? emboss_reserved_anonymous_field_2().bar() + : decltype(this->emboss_reserved_anonymous_field_2().bar())(); + } + ::emboss::support::Maybe has_bar() const; + + public: + auto first_bit() const -> decltype(this->emboss_reserved_anonymous_field_2().first_bit()) { + return has_first_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_2().first_bit() + : decltype(this->emboss_reserved_anonymous_field_2().first_bit())(); + } + ::emboss::support::Maybe has_first_bit() const; + + private: + typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField1View>, 32>> + + emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + + public: + auto bit_23() const -> decltype(this->emboss_reserved_anonymous_field_1().bit_23()) { + return has_bit_23().ValueOrDefault() ? emboss_reserved_anonymous_field_1().bit_23() + : decltype(this->emboss_reserved_anonymous_field_1().bit_23())(); + } + ::emboss::support::Maybe has_bit_23() const; + + public: + auto low_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().low_bit()) { + return has_low_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().low_bit() + : decltype(this->emboss_reserved_anonymous_field_1().low_bit())(); + } + ::emboss::support::Maybe has_low_bit() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericFooView; +}; +using FooView = + GenericFooView; +using FooWriter = + GenericFooView; + +template +struct EmbossReservedInternalIsGenericFooView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericFooView< + GenericFooView> { + static constexpr const bool value = true; +}; + +template +inline GenericFooView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeFooView( T &&emboss_reserved_local_arg) { + return GenericFooView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericFooView> +MakeFooView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFooView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericFooView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedFooView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFooView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Foo { +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::high_bit() + const { + + if ( has_high_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(31LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 31>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_high_bit() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::Bar, + ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::bar() + const { + + if ( has_bar().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(14LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::Bar, + ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 14>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::Bar, + ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_bar() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::first_bit() + const { + + if ( has_first_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_first_bit() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::MinSizeInBits(); +} + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::bit_23() + const { + + if ( has_bit_23().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(23LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 23>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_bit_23() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::low_bit() + const { + + if ( has_low_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_low_bit() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(24LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(24LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(24LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +} // namespace Foo + + +template +inline typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField2View>, 32>> + + GenericFooView::emboss_reserved_anonymous_field_2() + const { + + if ( has_emboss_reserved_anonymous_field_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Foo::GenericEmbossReservedAnonymousField2View>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Foo::GenericEmbossReservedAnonymousField2View>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFooView::has_emboss_reserved_anonymous_field_2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericFooView::has_high_bit() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericFooView::has_bar() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericFooView::has_first_bit() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline typename ::emboss::test::Foo::GenericEmbossReservedAnonymousField1View>, 32>> + + GenericFooView::emboss_reserved_anonymous_field_1() + const { + + if ( has_emboss_reserved_anonymous_field_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Foo::GenericEmbossReservedAnonymousField1View>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Foo::GenericEmbossReservedAnonymousField1View>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFooView::has_emboss_reserved_anonymous_field_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericFooView::has_bit_23() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericFooView::has_low_bit() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +namespace Foo { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Foo + +template +inline constexpr ::std::int32_t +GenericFooView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Foo::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFooView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Foo::IntrinsicSizeInBytes(); +} + +namespace Foo { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Foo + +template +inline constexpr ::std::int32_t +GenericFooView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Foo::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFooView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Foo::MaxSizeInBytes(); +} + +namespace Foo { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Foo + +template +inline constexpr ::std::int32_t +GenericFooView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Foo::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFooView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Foo::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_ANONYMOUS_BITS_EMB_H_ + diff --git a/testdata/golden_cpp/auto_array_size.emb.h b/testdata/golden_cpp/auto_array_size.emb.h new file mode 100644 index 00000000..64e29731 --- /dev/null +++ b/testdata/golden_cpp/auto_array_size.emb.h @@ -0,0 +1,1803 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_AUTO_ARRAY_SIZE_EMB_H_ +#define TESTDATA_AUTO_ARRAY_SIZE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Element { + +} // namespace Element + + +template +class GenericElementView; + +namespace AutoSize { + +} // namespace AutoSize + + +template +class GenericAutoSizeView; + + + + + + +namespace Element { + +} // namespace Element + + +template +struct EmbossReservedInternalIsGenericElementView; + +template +class GenericElementView final { + public: + GenericElementView() : backing_() {} + explicit GenericElementView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericElementView( + const GenericElementView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericElementView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericElementView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericElementView &operator=( + const GenericElementView &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericElementView 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 + bool UncheckedEquals( + GenericElementView 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 + void UncheckedCopyFrom( + GenericElementView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericElementView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericElementView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericElementView; +}; +using ElementView = + GenericElementView; +using ElementWriter = + GenericElementView; + +template +struct EmbossReservedInternalIsGenericElementView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericElementView< + GenericElementView> { + static constexpr const bool value = true; +}; + +template +inline GenericElementView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeElementView( T &&emboss_reserved_local_arg) { + return GenericElementView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericElementView> +MakeElementView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericElementView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericElementView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedElementView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericElementView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + +namespace AutoSize { + +} // namespace AutoSize + + +template +struct EmbossReservedInternalIsGenericAutoSizeView; + +template +class GenericAutoSizeView final { + public: + GenericAutoSizeView() : backing_() {} + explicit GenericAutoSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericAutoSizeView( + const GenericAutoSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericAutoSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericAutoSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericAutoSizeView &operator=( + const GenericAutoSizeView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_array_size().Known()) return false; + if (has_array_size().ValueOrDefault() && !array_size().Ok()) return false; + + + if (!has_four_byte_array().Known()) return false; + if (has_four_byte_array().ValueOrDefault() && !four_byte_array().Ok()) return false; + + + if (!has_four_struct_array().Known()) return false; + if (has_four_struct_array().ValueOrDefault() && !four_struct_array().Ok()) return false; + + + if (!has_dynamic_byte_array().Known()) return false; + if (has_dynamic_byte_array().ValueOrDefault() && !dynamic_byte_array().Ok()) return false; + + + if (!has_dynamic_struct_array().Known()) return false; + if (has_dynamic_struct_array().ValueOrDefault() && !dynamic_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; + + + + return true; + } + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { + return backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericAutoSizeView emboss_reserved_local_other) const { + + if (!has_array_size().Known()) return false; + if (!emboss_reserved_local_other.has_array_size().Known()) return false; + + if (emboss_reserved_local_other.has_array_size().ValueOrDefault() && + !has_array_size().ValueOrDefault()) + return false; + if (has_array_size().ValueOrDefault() && + !emboss_reserved_local_other.has_array_size().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_array_size().ValueOrDefault() && + has_array_size().ValueOrDefault() && + !array_size().Equals(emboss_reserved_local_other.array_size())) + return false; + + + + if (!has_four_byte_array().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte_array().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte_array().ValueOrDefault() && + !has_four_byte_array().ValueOrDefault()) + return false; + if (has_four_byte_array().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte_array().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte_array().ValueOrDefault() && + has_four_byte_array().ValueOrDefault() && + !four_byte_array().Equals(emboss_reserved_local_other.four_byte_array())) + return false; + + + + if (!has_four_struct_array().Known()) return false; + if (!emboss_reserved_local_other.has_four_struct_array().Known()) return false; + + if (emboss_reserved_local_other.has_four_struct_array().ValueOrDefault() && + !has_four_struct_array().ValueOrDefault()) + return false; + if (has_four_struct_array().ValueOrDefault() && + !emboss_reserved_local_other.has_four_struct_array().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_struct_array().ValueOrDefault() && + has_four_struct_array().ValueOrDefault() && + !four_struct_array().Equals(emboss_reserved_local_other.four_struct_array())) + return false; + + + + if (!has_dynamic_byte_array().Known()) return false; + if (!emboss_reserved_local_other.has_dynamic_byte_array().Known()) return false; + + if (emboss_reserved_local_other.has_dynamic_byte_array().ValueOrDefault() && + !has_dynamic_byte_array().ValueOrDefault()) + return false; + if (has_dynamic_byte_array().ValueOrDefault() && + !emboss_reserved_local_other.has_dynamic_byte_array().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_dynamic_byte_array().ValueOrDefault() && + has_dynamic_byte_array().ValueOrDefault() && + !dynamic_byte_array().Equals(emboss_reserved_local_other.dynamic_byte_array())) + return false; + + + + if (!has_dynamic_struct_array().Known()) return false; + if (!emboss_reserved_local_other.has_dynamic_struct_array().Known()) return false; + + if (emboss_reserved_local_other.has_dynamic_struct_array().ValueOrDefault() && + !has_dynamic_struct_array().ValueOrDefault()) + return false; + if (has_dynamic_struct_array().ValueOrDefault() && + !emboss_reserved_local_other.has_dynamic_struct_array().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_dynamic_struct_array().ValueOrDefault() && + has_dynamic_struct_array().ValueOrDefault() && + !dynamic_struct_array().Equals(emboss_reserved_local_other.dynamic_struct_array())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAutoSizeView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_array_size().ValueOr(false) && + !has_array_size().ValueOr(false)) + return false; + if (has_array_size().ValueOr(false) && + !emboss_reserved_local_other.has_array_size().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_array_size().ValueOr(false) && + has_array_size().ValueOr(false) && + !array_size().UncheckedEquals(emboss_reserved_local_other.array_size())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte_array().ValueOr(false) && + !has_four_byte_array().ValueOr(false)) + return false; + if (has_four_byte_array().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte_array().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte_array().ValueOr(false) && + has_four_byte_array().ValueOr(false) && + !four_byte_array().UncheckedEquals(emboss_reserved_local_other.four_byte_array())) + return false; + + + + if (emboss_reserved_local_other.has_four_struct_array().ValueOr(false) && + !has_four_struct_array().ValueOr(false)) + return false; + if (has_four_struct_array().ValueOr(false) && + !emboss_reserved_local_other.has_four_struct_array().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_struct_array().ValueOr(false) && + has_four_struct_array().ValueOr(false) && + !four_struct_array().UncheckedEquals(emboss_reserved_local_other.four_struct_array())) + return false; + + + + if (emboss_reserved_local_other.has_dynamic_byte_array().ValueOr(false) && + !has_dynamic_byte_array().ValueOr(false)) + return false; + if (has_dynamic_byte_array().ValueOr(false) && + !emboss_reserved_local_other.has_dynamic_byte_array().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_dynamic_byte_array().ValueOr(false) && + has_dynamic_byte_array().ValueOr(false) && + !dynamic_byte_array().UncheckedEquals(emboss_reserved_local_other.dynamic_byte_array())) + return false; + + + + if (emboss_reserved_local_other.has_dynamic_struct_array().ValueOr(false) && + !has_dynamic_struct_array().ValueOr(false)) + return false; + if (has_dynamic_struct_array().ValueOr(false) && + !emboss_reserved_local_other.has_dynamic_struct_array().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_dynamic_struct_array().ValueOr(false) && + has_dynamic_struct_array().ValueOr(false) && + !dynamic_struct_array().UncheckedEquals(emboss_reserved_local_other.dynamic_struct_array())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAutoSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAutoSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAutoSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "array_size") { + if (!array_size().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte_array") { + if (!four_byte_array().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_struct_array") { + if (!four_struct_array().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "dynamic_byte_array") { + if (!dynamic_byte_array().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "dynamic_struct_array") { + if (!dynamic_struct_array().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_array_size().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + array_size().IsAggregate() || array_size().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("array_size: "); + array_size().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !array_size().IsAggregate() && !array_size().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("# array_size: UNREADABLE\n"); + } + } + + if (has_four_byte_array().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte_array().IsAggregate() || four_byte_array().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte_array: "); + four_byte_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte_array().IsAggregate() && !four_byte_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("# four_byte_array: UNREADABLE\n"); + } + } + + if (has_four_struct_array().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_struct_array().IsAggregate() || four_struct_array().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_struct_array: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_struct_array().IsAggregate() && !four_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("# four_struct_array: UNREADABLE\n"); + } + } + + if (has_dynamic_byte_array().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + dynamic_byte_array().IsAggregate() || dynamic_byte_array().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("dynamic_byte_array: "); + dynamic_byte_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !dynamic_byte_array().IsAggregate() && !dynamic_byte_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("# dynamic_byte_array: UNREADABLE\n"); + } + } + + if (has_dynamic_struct_array().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + dynamic_struct_array().IsAggregate() || dynamic_struct_array().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("dynamic_struct_array: "); + dynamic_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !dynamic_struct_array().IsAggregate() && !dynamic_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("# dynamic_struct_array: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + array_size() const; + ::emboss::support::Maybe has_array_size() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + four_byte_array() const; + ::emboss::support::Maybe has_four_byte_array() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 2, + 8 > + + four_struct_array() const; + ::emboss::support::Maybe has_four_struct_array() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + dynamic_byte_array() const; + ::emboss::support::Maybe has_dynamic_byte_array() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 2, + 8 > + + dynamic_struct_array() const; + ::emboss::support::Maybe has_dynamic_struct_array() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericAutoSizeView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.array_size(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(13LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Sum(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_5); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(5LL)), ::emboss::support::Maybe(static_cast(13LL)), 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(true).ValueOr(false); + } + + const GenericAutoSizeView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericAutoSizeView; +}; +using AutoSizeView = + GenericAutoSizeView; +using AutoSizeWriter = + GenericAutoSizeView; + +template +struct EmbossReservedInternalIsGenericAutoSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAutoSizeView< + GenericAutoSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericAutoSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAutoSizeView( T &&emboss_reserved_local_arg) { + return GenericAutoSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAutoSizeView> +MakeAutoSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAutoSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAutoSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAutoSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAutoSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Element { + +} // namespace Element + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericElementView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericElementView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericElementView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericElementView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +namespace Element { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Element + +template +inline constexpr ::std::int32_t +GenericElementView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Element::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericElementView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Element::IntrinsicSizeInBytes(); +} + +namespace Element { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Element + +template +inline constexpr ::std::int32_t +GenericElementView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Element::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericElementView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Element::MaxSizeInBytes(); +} + +namespace Element { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Element + +template +inline constexpr ::std::int32_t +GenericElementView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Element::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericElementView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Element::MinSizeInBytes(); +} +namespace AutoSize { + +} // namespace AutoSize + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAutoSizeView::array_size() + const { + + if ( has_array_size().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAutoSizeView::has_array_size() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericAutoSizeView::four_byte_array() + const { + + if ( has_four_byte_array().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericAutoSizeView::has_four_byte_array() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 2, + 8 > + + GenericAutoSizeView::four_struct_array() + const { + + if ( has_four_struct_array().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(5LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 2, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 5>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 2, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericAutoSizeView::has_four_struct_array() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericAutoSizeView::dynamic_byte_array() + const { + + if ( has_dynamic_byte_array().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = array_size(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_2; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(13LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 13>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericAutoSizeView::has_dynamic_byte_array() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 2, + 8 > + + GenericAutoSizeView::dynamic_struct_array() + const { + + if ( has_dynamic_struct_array().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = array_size(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(13LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_2); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_4; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_3; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 2, + 8 > + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 2, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericAutoSizeView::has_dynamic_struct_array() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericAutoSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericAutoSizeView::IntrinsicSizeInBytes() const { + return + typename GenericAutoSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAutoSizeView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace AutoSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(778LL)).ValueOrDefault(); +} +} // namespace AutoSize + +template +inline constexpr ::std::int32_t +GenericAutoSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return AutoSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAutoSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return AutoSize::MaxSizeInBytes(); +} + +namespace AutoSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(13LL)).ValueOrDefault(); +} +} // namespace AutoSize + +template +inline constexpr ::std::int32_t +GenericAutoSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return AutoSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAutoSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return AutoSize::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_AUTO_ARRAY_SIZE_EMB_H_ + diff --git a/testdata/golden_cpp/bcd.emb.h b/testdata/golden_cpp/bcd.emb.h new file mode 100644 index 00000000..1e4edc24 --- /dev/null +++ b/testdata/golden_cpp/bcd.emb.h @@ -0,0 +1,3175 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_BCD_EMB_H_ +#define TESTDATA_BCD_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace BcdSizes { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +class GenericEmbossReservedAnonymousField1View; + + +} // namespace BcdSizes + + +template +class GenericBcdSizesView; + +namespace BcdBigEndian { + +} // namespace BcdBigEndian + + +template +class GenericBcdBigEndianView; + + + + + + + + + + + + + + + + + +namespace BcdSizes { + + + + + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; + +template +class GenericEmbossReservedAnonymousField1View final { + public: + GenericEmbossReservedAnonymousField1View() : backing_() {} + explicit GenericEmbossReservedAnonymousField1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField1View( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField1View &operator=( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_four_bit().Known()) return false; + if (has_four_bit().ValueOrDefault() && !four_bit().Ok()) return false; + + + if (!has_six_bit().Known()) return false; + if (has_six_bit().ValueOrDefault() && !six_bit().Ok()) return false; + + + if (!has_ten_bit().Known()) return false; + if (has_ten_bit().ValueOrDefault() && !ten_bit().Ok()) return false; + + + if (!has_twelve_bit().Known()) return false; + if (has_twelve_bit().ValueOrDefault() && !twelve_bit().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (!has_four_bit().Known()) return false; + if (!emboss_reserved_local_other.has_four_bit().Known()) return false; + + if (emboss_reserved_local_other.has_four_bit().ValueOrDefault() && + !has_four_bit().ValueOrDefault()) + return false; + if (has_four_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_four_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_bit().ValueOrDefault() && + has_four_bit().ValueOrDefault() && + !four_bit().Equals(emboss_reserved_local_other.four_bit())) + return false; + + + + if (!has_six_bit().Known()) return false; + if (!emboss_reserved_local_other.has_six_bit().Known()) return false; + + if (emboss_reserved_local_other.has_six_bit().ValueOrDefault() && + !has_six_bit().ValueOrDefault()) + return false; + if (has_six_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_six_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_six_bit().ValueOrDefault() && + has_six_bit().ValueOrDefault() && + !six_bit().Equals(emboss_reserved_local_other.six_bit())) + return false; + + + + if (!has_ten_bit().Known()) return false; + if (!emboss_reserved_local_other.has_ten_bit().Known()) return false; + + if (emboss_reserved_local_other.has_ten_bit().ValueOrDefault() && + !has_ten_bit().ValueOrDefault()) + return false; + if (has_ten_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_ten_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_ten_bit().ValueOrDefault() && + has_ten_bit().ValueOrDefault() && + !ten_bit().Equals(emboss_reserved_local_other.ten_bit())) + return false; + + + + if (!has_twelve_bit().Known()) return false; + if (!emboss_reserved_local_other.has_twelve_bit().Known()) return false; + + if (emboss_reserved_local_other.has_twelve_bit().ValueOrDefault() && + !has_twelve_bit().ValueOrDefault()) + return false; + if (has_twelve_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_twelve_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_twelve_bit().ValueOrDefault() && + has_twelve_bit().ValueOrDefault() && + !twelve_bit().Equals(emboss_reserved_local_other.twelve_bit())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_four_bit().ValueOr(false) && + !has_four_bit().ValueOr(false)) + return false; + if (has_four_bit().ValueOr(false) && + !emboss_reserved_local_other.has_four_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_bit().ValueOr(false) && + has_four_bit().ValueOr(false) && + !four_bit().UncheckedEquals(emboss_reserved_local_other.four_bit())) + return false; + + + + if (emboss_reserved_local_other.has_six_bit().ValueOr(false) && + !has_six_bit().ValueOr(false)) + return false; + if (has_six_bit().ValueOr(false) && + !emboss_reserved_local_other.has_six_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_six_bit().ValueOr(false) && + has_six_bit().ValueOr(false) && + !six_bit().UncheckedEquals(emboss_reserved_local_other.six_bit())) + return false; + + + + if (emboss_reserved_local_other.has_ten_bit().ValueOr(false) && + !has_ten_bit().ValueOr(false)) + return false; + if (has_ten_bit().ValueOr(false) && + !emboss_reserved_local_other.has_ten_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_ten_bit().ValueOr(false) && + has_ten_bit().ValueOr(false) && + !ten_bit().UncheckedEquals(emboss_reserved_local_other.ten_bit())) + return false; + + + + if (emboss_reserved_local_other.has_twelve_bit().ValueOr(false) && + !has_twelve_bit().ValueOr(false)) + return false; + if (has_twelve_bit().ValueOr(false) && + !emboss_reserved_local_other.has_twelve_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_twelve_bit().ValueOr(false) && + has_twelve_bit().ValueOr(false) && + !twelve_bit().UncheckedEquals(emboss_reserved_local_other.twelve_bit())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "four_bit") { + if (!four_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_bit") { + if (!six_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "ten_bit") { + if (!ten_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "twelve_bit") { + if (!twelve_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_four_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_bit().IsAggregate() || four_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_bit: "); + four_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_bit().IsAggregate() && !four_bit().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_bit: UNREADABLE\n"); + } + } + + if (has_six_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_bit().IsAggregate() || six_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_bit: "); + six_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_bit().IsAggregate() && !six_bit().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("# six_bit: UNREADABLE\n"); + } + } + + if (has_ten_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten_bit().IsAggregate() || ten_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("ten_bit: "); + ten_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !ten_bit().IsAggregate() && !ten_bit().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("# ten_bit: UNREADABLE\n"); + } + } + + if (has_twelve_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + twelve_bit().IsAggregate() || twelve_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("twelve_bit: "); + twelve_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !twelve_bit().IsAggregate() && !twelve_bit().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("# twelve_bit: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + four_bit() const; + ::emboss::support::Maybe has_four_bit() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<6, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + six_bit() const; + ::emboss::support::Maybe has_six_bit() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<10, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + ten_bit() const; + ::emboss::support::Maybe has_ten_bit() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<12, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + twelve_bit() const; + ::emboss::support::Maybe has_twelve_bit() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField1View; +}; +using EmbossReservedAnonymousField1View = + GenericEmbossReservedAnonymousField1View; +using EmbossReservedAnonymousField1Writer = + GenericEmbossReservedAnonymousField1View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< + GenericEmbossReservedAnonymousField1View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField1View> +MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace BcdSizes + + +template +struct EmbossReservedInternalIsGenericBcdSizesView; + +template +class GenericBcdSizesView final { + public: + GenericBcdSizesView() : backing_() {} + explicit GenericBcdSizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBcdSizesView( + const GenericBcdSizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBcdSizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBcdSizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBcdSizesView &operator=( + const GenericBcdSizesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_three_byte().Known()) return false; + if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + + if (!has_five_byte().Known()) return false; + if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + + if (!has_six_byte().Known()) return false; + if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + + + if (!has_seven_byte().Known()) return false; + if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + + + if (!has_eight_byte().Known()) return false; + if (has_eight_byte().ValueOrDefault() && !eight_byte().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_four_bit().Known()) return false; + if (has_four_bit().ValueOrDefault() && !four_bit().Ok()) return false; + + + if (!has_six_bit().Known()) return false; + if (has_six_bit().ValueOrDefault() && !six_bit().Ok()) return false; + + + if (!has_ten_bit().Known()) return false; + if (has_ten_bit().ValueOrDefault() && !ten_bit().Ok()) return false; + + + if (!has_twelve_bit().Known()) return false; + if (has_twelve_bit().ValueOrDefault() && !twelve_bit().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericBcdSizesView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_three_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + !has_three_byte().ValueOrDefault()) + return false; + if (has_three_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + has_three_byte().ValueOrDefault() && + !three_byte().Equals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (!has_five_byte().Known()) return false; + if (!emboss_reserved_local_other.has_five_byte().Known()) return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + !has_five_byte().ValueOrDefault()) + return false; + if (has_five_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_five_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + has_five_byte().ValueOrDefault() && + !five_byte().Equals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (!has_six_byte().Known()) return false; + if (!emboss_reserved_local_other.has_six_byte().Known()) return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + !has_six_byte().ValueOrDefault()) + return false; + if (has_six_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_six_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + has_six_byte().ValueOrDefault() && + !six_byte().Equals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (!has_seven_byte().Known()) return false; + if (!emboss_reserved_local_other.has_seven_byte().Known()) return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + !has_seven_byte().ValueOrDefault()) + return false; + if (has_seven_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_seven_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + has_seven_byte().ValueOrDefault() && + !seven_byte().Equals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (!has_eight_byte().Known()) return false; + if (!emboss_reserved_local_other.has_eight_byte().Known()) return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + !has_eight_byte().ValueOrDefault()) + return false; + if (has_eight_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_eight_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + has_eight_byte().ValueOrDefault() && + !eight_byte().Equals(emboss_reserved_local_other.eight_byte())) + 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; + + return true; + } + template + bool UncheckedEquals( + GenericBcdSizesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + !has_three_byte().ValueOr(false)) + return false; + if (has_three_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + has_three_byte().ValueOr(false) && + !three_byte().UncheckedEquals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + !has_five_byte().ValueOr(false)) + return false; + if (has_five_byte().ValueOr(false) && + !emboss_reserved_local_other.has_five_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + has_five_byte().ValueOr(false) && + !five_byte().UncheckedEquals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + !has_six_byte().ValueOr(false)) + return false; + if (has_six_byte().ValueOr(false) && + !emboss_reserved_local_other.has_six_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + has_six_byte().ValueOr(false) && + !six_byte().UncheckedEquals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + !has_seven_byte().ValueOr(false)) + return false; + if (has_seven_byte().ValueOr(false) && + !emboss_reserved_local_other.has_seven_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + has_seven_byte().ValueOr(false) && + !seven_byte().UncheckedEquals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + !has_eight_byte().ValueOr(false)) + return false; + if (has_eight_byte().ValueOr(false) && + !emboss_reserved_local_other.has_eight_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + has_eight_byte().ValueOr(false) && + !eight_byte().UncheckedEquals(emboss_reserved_local_other.eight_byte())) + 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; + + return true; + } + template + void UncheckedCopyFrom( + GenericBcdSizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBcdSizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBcdSizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_byte") { + if (!three_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "five_byte") { + if (!five_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_byte") { + if (!six_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "seven_byte") { + if (!seven_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "eight_byte") { + if (!eight_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_bit") { + if (!four_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_bit") { + if (!six_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "ten_bit") { + if (!ten_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "twelve_bit") { + if (!twelve_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_three_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_byte().IsAggregate() || three_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_byte: "); + three_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_byte().IsAggregate() && !three_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("# three_byte: UNREADABLE\n"); + } + } + + if (has_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + if (has_five_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + five_byte().IsAggregate() || five_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("five_byte: "); + five_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !five_byte().IsAggregate() && !five_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("# five_byte: UNREADABLE\n"); + } + } + + if (has_six_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_byte().IsAggregate() || six_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_byte: "); + six_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_byte().IsAggregate() && !six_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("# six_byte: UNREADABLE\n"); + } + } + + if (has_seven_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + seven_byte().IsAggregate() || seven_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("seven_byte: "); + seven_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !seven_byte().IsAggregate() && !seven_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("# seven_byte: UNREADABLE\n"); + } + } + + if (has_eight_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + eight_byte().IsAggregate() || eight_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("eight_byte: "); + eight_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !eight_byte().IsAggregate() && !eight_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("# eight_byte: UNREADABLE\n"); + } + } + + if (has_four_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_bit().IsAggregate() || four_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_bit: "); + four_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_bit().IsAggregate() && !four_bit().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_bit: UNREADABLE\n"); + } + } + + if (has_six_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_bit().IsAggregate() || six_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_bit: "); + six_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_bit().IsAggregate() && !six_bit().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("# six_bit: UNREADABLE\n"); + } + } + + if (has_ten_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten_bit().IsAggregate() || ten_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("ten_bit: "); + ten_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !ten_bit().IsAggregate() && !ten_bit().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("# ten_bit: UNREADABLE\n"); + } + } + + if (has_twelve_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + twelve_bit().IsAggregate() || twelve_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("twelve_bit: "); + twelve_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !twelve_bit().IsAggregate() && !twelve_bit().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("# twelve_bit: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + three_byte() const; + ::emboss::support::Maybe has_three_byte() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + four_byte() const; + ::emboss::support::Maybe has_four_byte() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + five_byte() const; + ::emboss::support::Maybe has_five_byte() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + six_byte() const; + ::emboss::support::Maybe has_six_byte() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + eight_byte() const; + ::emboss::support::Maybe has_eight_byte() const; + + private: + typename ::emboss::test::BcdSizes::GenericEmbossReservedAnonymousField1View>, 32>> + + emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + + public: + auto four_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().four_bit()) { + return has_four_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().four_bit() + : decltype(this->emboss_reserved_anonymous_field_1().four_bit())(); + } + ::emboss::support::Maybe has_four_bit() const; + + public: + auto six_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().six_bit()) { + return has_six_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().six_bit() + : decltype(this->emboss_reserved_anonymous_field_1().six_bit())(); + } + ::emboss::support::Maybe has_six_bit() const; + + public: + auto ten_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().ten_bit()) { + return has_ten_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().ten_bit() + : decltype(this->emboss_reserved_anonymous_field_1().ten_bit())(); + } + ::emboss::support::Maybe has_ten_bit() const; + + public: + auto twelve_bit() const -> decltype(this->emboss_reserved_anonymous_field_1().twelve_bit()) { + return has_twelve_bit().ValueOrDefault() ? emboss_reserved_anonymous_field_1().twelve_bit() + : decltype(this->emboss_reserved_anonymous_field_1().twelve_bit())(); + } + ::emboss::support::Maybe has_twelve_bit() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBcdSizesView; +}; +using BcdSizesView = + GenericBcdSizesView; +using BcdSizesWriter = + GenericBcdSizesView; + +template +struct EmbossReservedInternalIsGenericBcdSizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBcdSizesView< + GenericBcdSizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericBcdSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBcdSizesView( T &&emboss_reserved_local_arg) { + return GenericBcdSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBcdSizesView> +MakeBcdSizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBcdSizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBcdSizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBcdSizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBcdSizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace BcdBigEndian { + +} // namespace BcdBigEndian + + +template +struct EmbossReservedInternalIsGenericBcdBigEndianView; + +template +class GenericBcdBigEndianView final { + public: + GenericBcdBigEndianView() : backing_() {} + explicit GenericBcdBigEndianView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBcdBigEndianView( + const GenericBcdBigEndianView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBcdBigEndianView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBcdBigEndianView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBcdBigEndianView &operator=( + const GenericBcdBigEndianView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericBcdBigEndianView emboss_reserved_local_other) const { + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericBcdBigEndianView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericBcdBigEndianView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBcdBigEndianView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBcdBigEndianView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + four_byte() const; + ::emboss::support::Maybe has_four_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBcdBigEndianView; +}; +using BcdBigEndianView = + GenericBcdBigEndianView; +using BcdBigEndianWriter = + GenericBcdBigEndianView; + +template +struct EmbossReservedInternalIsGenericBcdBigEndianView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBcdBigEndianView< + GenericBcdBigEndianView> { + static constexpr const bool value = true; +}; + +template +inline GenericBcdBigEndianView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBcdBigEndianView( T &&emboss_reserved_local_arg) { + return GenericBcdBigEndianView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBcdBigEndianView> +MakeBcdBigEndianView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBcdBigEndianView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBcdBigEndianView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBcdBigEndianView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBcdBigEndianView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace BcdSizes { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::four_bit() + const { + + if ( has_four_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_four_bit() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<6, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::six_bit() + const { + + if ( has_six_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<6, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<6, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_six_bit() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<10, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::ten_bit() + const { + + if ( has_ten_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(10LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<10, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<10, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_ten_bit() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<12, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::twelve_bit() + const { + + if ( has_twelve_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(12LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(20LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<12, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 20>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<12, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_twelve_bit() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +} // namespace BcdSizes + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericBcdSizesView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericBcdSizesView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + GenericBcdSizesView::three_byte() + const { + + if ( has_three_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_three_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericBcdSizesView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + GenericBcdSizesView::five_byte() + const { + + if ( has_five_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(5LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_five_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + GenericBcdSizesView::six_byte() + const { + + if ( has_six_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(15LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +( + backing_ + .template GetOffsetStorage<0, + 15>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_six_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + GenericBcdSizesView::seven_byte() + const { + + if ( has_seven_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(7LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(21LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +( + backing_ + .template GetOffsetStorage<0, + 21>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_seven_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericBcdSizesView::eight_byte() + const { + + if ( has_eight_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(28LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 28>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_eight_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::BcdSizes::GenericEmbossReservedAnonymousField1View>, 32>> + + GenericBcdSizesView::emboss_reserved_anonymous_field_1() + const { + + if ( has_emboss_reserved_anonymous_field_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(36LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::BcdSizes::GenericEmbossReservedAnonymousField1View>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 36>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::BcdSizes::GenericEmbossReservedAnonymousField1View>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_emboss_reserved_anonymous_field_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_four_bit() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_six_bit() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_ten_bit() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericBcdSizesView::has_twelve_bit() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +namespace BcdSizes { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(40LL)).ValueOrDefault(); +} +} // namespace BcdSizes + +template +inline constexpr ::std::int32_t +GenericBcdSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return BcdSizes::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBcdSizesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return BcdSizes::IntrinsicSizeInBytes(); +} + +namespace BcdSizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(40LL)).ValueOrDefault(); +} +} // namespace BcdSizes + +template +inline constexpr ::std::int32_t +GenericBcdSizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return BcdSizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBcdSizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return BcdSizes::MaxSizeInBytes(); +} + +namespace BcdSizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(40LL)).ValueOrDefault(); +} +} // namespace BcdSizes + +template +inline constexpr ::std::int32_t +GenericBcdSizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return BcdSizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBcdSizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return BcdSizes::MinSizeInBytes(); +} +namespace BcdBigEndian { + +} // namespace BcdBigEndian + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericBcdBigEndianView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBcdBigEndianView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace BcdBigEndian { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace BcdBigEndian + +template +inline constexpr ::std::int32_t +GenericBcdBigEndianView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return BcdBigEndian::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBcdBigEndianView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return BcdBigEndian::IntrinsicSizeInBytes(); +} + +namespace BcdBigEndian { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace BcdBigEndian + +template +inline constexpr ::std::int32_t +GenericBcdBigEndianView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return BcdBigEndian::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBcdBigEndianView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return BcdBigEndian::MaxSizeInBytes(); +} + +namespace BcdBigEndian { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace BcdBigEndian + +template +inline constexpr ::std::int32_t +GenericBcdBigEndianView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return BcdBigEndian::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBcdBigEndianView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return BcdBigEndian::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_BCD_EMB_H_ + diff --git a/testdata/golden_cpp/bits.emb.h b/testdata/golden_cpp/bits.emb.h new file mode 100644 index 00000000..e6f29da2 --- /dev/null +++ b/testdata/golden_cpp/bits.emb.h @@ -0,0 +1,5523 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_BITS_EMB_H_ +#define TESTDATA_BITS_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace OneByte { + +} // namespace OneByte + + +template +class GenericOneByteView; + +namespace FourByte { +namespace TwoByteWithGaps { + +} // namespace TwoByteWithGaps + + +template +class GenericTwoByteWithGapsView; + + +} // namespace FourByte + + +template +class GenericFourByteView; + +namespace ArrayInBits { + +} // namespace ArrayInBits + + +template +class GenericArrayInBitsView; + +namespace ArrayInBitsInStruct { + +} // namespace ArrayInBitsInStruct + + +template +class GenericArrayInBitsInStructView; + +namespace StructOfBits { + +} // namespace StructOfBits + + +template +class GenericStructOfBitsView; + +namespace BitArray { + +} // namespace BitArray + + +template +class GenericBitArrayView; + + + + + + + + + +namespace OneByte { + +} // namespace OneByte + + +template +struct EmbossReservedInternalIsGenericOneByteView; + +template +class GenericOneByteView final { + public: + GenericOneByteView() : backing_() {} + explicit GenericOneByteView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericOneByteView( + const GenericOneByteView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericOneByteView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericOneByteView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericOneByteView &operator=( + const GenericOneByteView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_high_bit().Known()) return false; + if (has_high_bit().ValueOrDefault() && !high_bit().Ok()) return false; + + + if (!has_less_high_bit().Known()) return false; + if (has_less_high_bit().ValueOrDefault() && !less_high_bit().Ok()) return false; + + + if (!has_mid_nibble().Known()) return false; + if (has_mid_nibble().ValueOrDefault() && !mid_nibble().Ok()) return false; + + + if (!has_less_low_bit().Known()) return false; + if (has_less_low_bit().ValueOrDefault() && !less_low_bit().Ok()) return false; + + + if (!has_low_bit().Known()) return false; + if (has_low_bit().ValueOrDefault() && !low_bit().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericOneByteView emboss_reserved_local_other) const { + + if (!has_high_bit().Known()) return false; + if (!emboss_reserved_local_other.has_high_bit().Known()) return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOrDefault() && + !has_high_bit().ValueOrDefault()) + return false; + if (has_high_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_high_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOrDefault() && + has_high_bit().ValueOrDefault() && + !high_bit().Equals(emboss_reserved_local_other.high_bit())) + return false; + + + + if (!has_less_high_bit().Known()) return false; + if (!emboss_reserved_local_other.has_less_high_bit().Known()) return false; + + if (emboss_reserved_local_other.has_less_high_bit().ValueOrDefault() && + !has_less_high_bit().ValueOrDefault()) + return false; + if (has_less_high_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_less_high_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_less_high_bit().ValueOrDefault() && + has_less_high_bit().ValueOrDefault() && + !less_high_bit().Equals(emboss_reserved_local_other.less_high_bit())) + return false; + + + + if (!has_mid_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_mid_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_mid_nibble().ValueOrDefault() && + !has_mid_nibble().ValueOrDefault()) + return false; + if (has_mid_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_mid_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_mid_nibble().ValueOrDefault() && + has_mid_nibble().ValueOrDefault() && + !mid_nibble().Equals(emboss_reserved_local_other.mid_nibble())) + return false; + + + + if (!has_less_low_bit().Known()) return false; + if (!emboss_reserved_local_other.has_less_low_bit().Known()) return false; + + if (emboss_reserved_local_other.has_less_low_bit().ValueOrDefault() && + !has_less_low_bit().ValueOrDefault()) + return false; + if (has_less_low_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_less_low_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_less_low_bit().ValueOrDefault() && + has_less_low_bit().ValueOrDefault() && + !less_low_bit().Equals(emboss_reserved_local_other.less_low_bit())) + return false; + + + + if (!has_low_bit().Known()) return false; + if (!emboss_reserved_local_other.has_low_bit().Known()) return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOrDefault() && + !has_low_bit().ValueOrDefault()) + return false; + if (has_low_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_low_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOrDefault() && + has_low_bit().ValueOrDefault() && + !low_bit().Equals(emboss_reserved_local_other.low_bit())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericOneByteView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && + !has_high_bit().ValueOr(false)) + return false; + if (has_high_bit().ValueOr(false) && + !emboss_reserved_local_other.has_high_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && + has_high_bit().ValueOr(false) && + !high_bit().UncheckedEquals(emboss_reserved_local_other.high_bit())) + return false; + + + + if (emboss_reserved_local_other.has_less_high_bit().ValueOr(false) && + !has_less_high_bit().ValueOr(false)) + return false; + if (has_less_high_bit().ValueOr(false) && + !emboss_reserved_local_other.has_less_high_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_less_high_bit().ValueOr(false) && + has_less_high_bit().ValueOr(false) && + !less_high_bit().UncheckedEquals(emboss_reserved_local_other.less_high_bit())) + return false; + + + + if (emboss_reserved_local_other.has_mid_nibble().ValueOr(false) && + !has_mid_nibble().ValueOr(false)) + return false; + if (has_mid_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_mid_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_mid_nibble().ValueOr(false) && + has_mid_nibble().ValueOr(false) && + !mid_nibble().UncheckedEquals(emboss_reserved_local_other.mid_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_less_low_bit().ValueOr(false) && + !has_less_low_bit().ValueOr(false)) + return false; + if (has_less_low_bit().ValueOr(false) && + !emboss_reserved_local_other.has_less_low_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_less_low_bit().ValueOr(false) && + has_less_low_bit().ValueOr(false) && + !less_low_bit().UncheckedEquals(emboss_reserved_local_other.less_low_bit())) + return false; + + + + if (emboss_reserved_local_other.has_low_bit().ValueOr(false) && + !has_low_bit().ValueOr(false)) + return false; + if (has_low_bit().ValueOr(false) && + !emboss_reserved_local_other.has_low_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOr(false) && + has_low_bit().ValueOr(false) && + !low_bit().UncheckedEquals(emboss_reserved_local_other.low_bit())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericOneByteView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericOneByteView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericOneByteView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "high_bit") { + if (!high_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "less_high_bit") { + if (!less_high_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "mid_nibble") { + if (!mid_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "less_low_bit") { + if (!less_low_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "low_bit") { + if (!low_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_high_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + high_bit().IsAggregate() || high_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("high_bit: "); + high_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !high_bit().IsAggregate() && !high_bit().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("# high_bit: UNREADABLE\n"); + } + } + + if (has_less_high_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + less_high_bit().IsAggregate() || less_high_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("less_high_bit: "); + less_high_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !less_high_bit().IsAggregate() && !less_high_bit().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("# less_high_bit: UNREADABLE\n"); + } + } + + if (has_mid_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + mid_nibble().IsAggregate() || mid_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("mid_nibble: "); + mid_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !mid_nibble().IsAggregate() && !mid_nibble().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("# mid_nibble: UNREADABLE\n"); + } + } + + if (has_less_low_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + less_low_bit().IsAggregate() || less_low_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("less_low_bit: "); + less_low_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !less_low_bit().IsAggregate() && !less_low_bit().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("# less_low_bit: UNREADABLE\n"); + } + } + + if (has_low_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + low_bit().IsAggregate() || low_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("low_bit: "); + low_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !low_bit().IsAggregate() && !low_bit().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("# low_bit: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + high_bit() const; + ::emboss::support::Maybe has_high_bit() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + less_high_bit() const; + ::emboss::support::Maybe has_less_high_bit() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + mid_nibble() const; + ::emboss::support::Maybe has_mid_nibble() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + less_low_bit() const; + ::emboss::support::Maybe has_less_low_bit() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + low_bit() const; + ::emboss::support::Maybe has_low_bit() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericOneByteView; +}; +using OneByteView = + GenericOneByteView; +using OneByteWriter = + GenericOneByteView; + +template +struct EmbossReservedInternalIsGenericOneByteView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericOneByteView< + GenericOneByteView> { + static constexpr const bool value = true; +}; + +template +inline GenericOneByteView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeOneByteView( T &&emboss_reserved_local_arg) { + return GenericOneByteView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericOneByteView> +MakeOneByteView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOneByteView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericOneByteView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedOneByteView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOneByteView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace FourByte { +struct EmbossReservedValidatorForRawLowNibble { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(15LL))))).ValueOrDefault(); + } +}; + + +} // namespace FourByte + + + + + + +namespace FourByte { + + + + + +namespace TwoByteWithGaps { + +} // namespace TwoByteWithGaps + + +template +struct EmbossReservedInternalIsGenericTwoByteWithGapsView; + +template +class GenericTwoByteWithGapsView final { + public: + GenericTwoByteWithGapsView() : backing_() {} + explicit GenericTwoByteWithGapsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericTwoByteWithGapsView( + const GenericTwoByteWithGapsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericTwoByteWithGapsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericTwoByteWithGapsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericTwoByteWithGapsView &operator=( + const GenericTwoByteWithGapsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_high_bit().Known()) return false; + if (has_high_bit().ValueOrDefault() && !high_bit().Ok()) return false; + + + if (!has_mid_nibble().Known()) return false; + if (has_mid_nibble().ValueOrDefault() && !mid_nibble().Ok()) return false; + + + if (!has_low_bit().Known()) return false; + if (has_low_bit().ValueOrDefault() && !low_bit().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericTwoByteWithGapsView emboss_reserved_local_other) const { + + if (!has_high_bit().Known()) return false; + if (!emboss_reserved_local_other.has_high_bit().Known()) return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOrDefault() && + !has_high_bit().ValueOrDefault()) + return false; + if (has_high_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_high_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOrDefault() && + has_high_bit().ValueOrDefault() && + !high_bit().Equals(emboss_reserved_local_other.high_bit())) + return false; + + + + if (!has_mid_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_mid_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_mid_nibble().ValueOrDefault() && + !has_mid_nibble().ValueOrDefault()) + return false; + if (has_mid_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_mid_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_mid_nibble().ValueOrDefault() && + has_mid_nibble().ValueOrDefault() && + !mid_nibble().Equals(emboss_reserved_local_other.mid_nibble())) + return false; + + + + if (!has_low_bit().Known()) return false; + if (!emboss_reserved_local_other.has_low_bit().Known()) return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOrDefault() && + !has_low_bit().ValueOrDefault()) + return false; + if (has_low_bit().ValueOrDefault() && + !emboss_reserved_local_other.has_low_bit().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOrDefault() && + has_low_bit().ValueOrDefault() && + !low_bit().Equals(emboss_reserved_local_other.low_bit())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericTwoByteWithGapsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && + !has_high_bit().ValueOr(false)) + return false; + if (has_high_bit().ValueOr(false) && + !emboss_reserved_local_other.has_high_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_high_bit().ValueOr(false) && + has_high_bit().ValueOr(false) && + !high_bit().UncheckedEquals(emboss_reserved_local_other.high_bit())) + return false; + + + + if (emboss_reserved_local_other.has_mid_nibble().ValueOr(false) && + !has_mid_nibble().ValueOr(false)) + return false; + if (has_mid_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_mid_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_mid_nibble().ValueOr(false) && + has_mid_nibble().ValueOr(false) && + !mid_nibble().UncheckedEquals(emboss_reserved_local_other.mid_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_low_bit().ValueOr(false) && + !has_low_bit().ValueOr(false)) + return false; + if (has_low_bit().ValueOr(false) && + !emboss_reserved_local_other.has_low_bit().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_low_bit().ValueOr(false) && + has_low_bit().ValueOr(false) && + !low_bit().UncheckedEquals(emboss_reserved_local_other.low_bit())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericTwoByteWithGapsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericTwoByteWithGapsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericTwoByteWithGapsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "high_bit") { + if (!high_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "mid_nibble") { + if (!mid_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "low_bit") { + if (!low_bit().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_high_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + high_bit().IsAggregate() || high_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("high_bit: "); + high_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !high_bit().IsAggregate() && !high_bit().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("# high_bit: UNREADABLE\n"); + } + } + + if (has_mid_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + mid_nibble().IsAggregate() || mid_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("mid_nibble: "); + mid_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !mid_nibble().IsAggregate() && !mid_nibble().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("# mid_nibble: UNREADABLE\n"); + } + } + + if (has_low_bit().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + low_bit().IsAggregate() || low_bit().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("low_bit: "); + low_bit().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !low_bit().IsAggregate() && !low_bit().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("# low_bit: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + high_bit() const; + ::emboss::support::Maybe has_high_bit() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + mid_nibble() const; + ::emboss::support::Maybe has_mid_nibble() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + low_bit() const; + ::emboss::support::Maybe has_low_bit() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericTwoByteWithGapsView; +}; +using TwoByteWithGapsView = + GenericTwoByteWithGapsView; +using TwoByteWithGapsWriter = + GenericTwoByteWithGapsView; + +template +struct EmbossReservedInternalIsGenericTwoByteWithGapsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericTwoByteWithGapsView< + GenericTwoByteWithGapsView> { + static constexpr const bool value = true; +}; + +template +inline GenericTwoByteWithGapsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeTwoByteWithGapsView( T &&emboss_reserved_local_arg) { + return GenericTwoByteWithGapsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericTwoByteWithGapsView> +MakeTwoByteWithGapsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericTwoByteWithGapsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericTwoByteWithGapsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedTwoByteWithGapsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericTwoByteWithGapsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace FourByte + + +template +struct EmbossReservedInternalIsGenericFourByteView; + +template +class GenericFourByteView final { + public: + GenericFourByteView() : backing_() {} + explicit GenericFourByteView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericFourByteView( + const GenericFourByteView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericFourByteView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericFourByteView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericFourByteView &operator=( + const GenericFourByteView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_high_nibble().Known()) return false; + if (has_high_nibble().ValueOrDefault() && !high_nibble().Ok()) return false; + + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_raw_low_nibble().Known()) return false; + if (has_raw_low_nibble().ValueOrDefault() && !raw_low_nibble().Ok()) return false; + + + if (!has_low_nibble().Known()) return false; + if (has_low_nibble().ValueOrDefault() && !low_nibble().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericFourByteView emboss_reserved_local_other) const { + + if (!has_high_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_high_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_high_nibble().ValueOrDefault() && + !has_high_nibble().ValueOrDefault()) + return false; + if (has_high_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_high_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_high_nibble().ValueOrDefault() && + has_high_nibble().ValueOrDefault() && + !high_nibble().Equals(emboss_reserved_local_other.high_nibble())) + return false; + + + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_raw_low_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_raw_low_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_raw_low_nibble().ValueOrDefault() && + !has_raw_low_nibble().ValueOrDefault()) + return false; + if (has_raw_low_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_raw_low_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_raw_low_nibble().ValueOrDefault() && + has_raw_low_nibble().ValueOrDefault() && + !raw_low_nibble().Equals(emboss_reserved_local_other.raw_low_nibble())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericFourByteView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_high_nibble().ValueOr(false) && + !has_high_nibble().ValueOr(false)) + return false; + if (has_high_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_high_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_high_nibble().ValueOr(false) && + has_high_nibble().ValueOr(false) && + !high_nibble().UncheckedEquals(emboss_reserved_local_other.high_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_raw_low_nibble().ValueOr(false) && + !has_raw_low_nibble().ValueOr(false)) + return false; + if (has_raw_low_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_raw_low_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_raw_low_nibble().ValueOr(false) && + has_raw_low_nibble().ValueOr(false) && + !raw_low_nibble().UncheckedEquals(emboss_reserved_local_other.raw_low_nibble())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericFourByteView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericFourByteView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericFourByteView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "high_nibble") { + if (!high_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "one_byte") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "raw_low_nibble") { + if (!raw_low_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "low_nibble") { + if (!low_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_high_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + high_nibble().IsAggregate() || high_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("high_nibble: "); + high_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !high_nibble().IsAggregate() && !high_nibble().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("# high_nibble: UNREADABLE\n"); + } + } + + if (has_one_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_raw_low_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + raw_low_nibble().IsAggregate() || raw_low_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("raw_low_nibble: "); + raw_low_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !raw_low_nibble().IsAggregate() && !raw_low_nibble().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("# raw_low_nibble: UNREADABLE\n"); + } + } + + if (has_low_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + low_nibble().IsAggregate() || low_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("low_nibble: "); + low_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !low_nibble().IsAggregate() && !low_nibble().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("# low_nibble: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + high_nibble() const; + ::emboss::support::Maybe has_high_nibble() const; + + public: + typename ::emboss::test::GenericOneByteView> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::test::FourByte::GenericTwoByteWithGapsView> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, FourByte::EmbossReservedValidatorForRawLowNibble>, + typename Storage::template OffsetStorageType> + + raw_low_nibble() const; + ::emboss::support::Maybe has_raw_low_nibble() const; + + public: + class EmbossReservedVirtualLowNibbleView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualLowNibbleView( + const GenericFourByteView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualLowNibbleView() = delete; + EmbossReservedVirtualLowNibbleView(const EmbossReservedVirtualLowNibbleView &) = default; + EmbossReservedVirtualLowNibbleView(EmbossReservedVirtualLowNibbleView &&) = default; + EmbossReservedVirtualLowNibbleView &operator=(const EmbossReservedVirtualLowNibbleView &) = + default; + EmbossReservedVirtualLowNibbleView &operator=(EmbossReservedVirtualLowNibbleView &&) = + default; + ~EmbossReservedVirtualLowNibbleView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_low_nibble().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()); + } + template + 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; } + + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.raw_low_nibble().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int32_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { + view_.raw_low_nibble().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL)))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(100LL))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.raw_low_nibble().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.raw_low_nibble(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericFourByteView view_; + }; + EmbossReservedVirtualLowNibbleView low_nibble() const; + ::emboss::support::Maybe has_low_nibble() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericFourByteView; +}; +using FourByteView = + GenericFourByteView; +using FourByteWriter = + GenericFourByteView; + +template +struct EmbossReservedInternalIsGenericFourByteView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericFourByteView< + GenericFourByteView> { + static constexpr const bool value = true; +}; + +template +inline GenericFourByteView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeFourByteView( T &&emboss_reserved_local_arg) { + return GenericFourByteView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericFourByteView> +MakeFourByteView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFourByteView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericFourByteView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedFourByteView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFourByteView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace ArrayInBits { + +} // namespace ArrayInBits + + +template +struct EmbossReservedInternalIsGenericArrayInBitsView; + +template +class GenericArrayInBitsView final { + public: + GenericArrayInBitsView() : backing_() {} + explicit GenericArrayInBitsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericArrayInBitsView( + const GenericArrayInBitsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericArrayInBitsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericArrayInBitsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericArrayInBitsView &operator=( + const GenericArrayInBitsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_lone_flag().Known()) return false; + if (has_lone_flag().ValueOrDefault() && !lone_flag().Ok()) return false; + + + if (!has_flags().Known()) return false; + if (has_flags().ValueOrDefault() && !flags().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericArrayInBitsView emboss_reserved_local_other) const { + + if (!has_lone_flag().Known()) return false; + if (!emboss_reserved_local_other.has_lone_flag().Known()) return false; + + if (emboss_reserved_local_other.has_lone_flag().ValueOrDefault() && + !has_lone_flag().ValueOrDefault()) + return false; + if (has_lone_flag().ValueOrDefault() && + !emboss_reserved_local_other.has_lone_flag().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_lone_flag().ValueOrDefault() && + has_lone_flag().ValueOrDefault() && + !lone_flag().Equals(emboss_reserved_local_other.lone_flag())) + return false; + + + + if (!has_flags().Known()) return false; + if (!emboss_reserved_local_other.has_flags().Known()) return false; + + if (emboss_reserved_local_other.has_flags().ValueOrDefault() && + !has_flags().ValueOrDefault()) + return false; + if (has_flags().ValueOrDefault() && + !emboss_reserved_local_other.has_flags().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_flags().ValueOrDefault() && + has_flags().ValueOrDefault() && + !flags().Equals(emboss_reserved_local_other.flags())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericArrayInBitsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_lone_flag().ValueOr(false) && + !has_lone_flag().ValueOr(false)) + return false; + if (has_lone_flag().ValueOr(false) && + !emboss_reserved_local_other.has_lone_flag().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_lone_flag().ValueOr(false) && + has_lone_flag().ValueOr(false) && + !lone_flag().UncheckedEquals(emboss_reserved_local_other.lone_flag())) + return false; + + + + if (emboss_reserved_local_other.has_flags().ValueOr(false) && + !has_flags().ValueOr(false)) + return false; + if (has_flags().ValueOr(false) && + !emboss_reserved_local_other.has_flags().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_flags().ValueOr(false) && + has_flags().ValueOr(false) && + !flags().UncheckedEquals(emboss_reserved_local_other.flags())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericArrayInBitsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericArrayInBitsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericArrayInBitsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "lone_flag") { + if (!lone_flag().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "flags") { + if (!flags().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_lone_flag().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + lone_flag().IsAggregate() || lone_flag().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("lone_flag: "); + lone_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !lone_flag().IsAggregate() && !lone_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("# lone_flag: UNREADABLE\n"); + } + } + + if (has_flags().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + flags().IsAggregate() || flags().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("flags: "); + flags().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !flags().IsAggregate() && !flags().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("# flags: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + lone_flag() const; + ::emboss::support::Maybe has_lone_flag() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 1 > + + flags() const; + ::emboss::support::Maybe has_flags() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericArrayInBitsView; +}; +using ArrayInBitsView = + GenericArrayInBitsView; +using ArrayInBitsWriter = + GenericArrayInBitsView; + +template +struct EmbossReservedInternalIsGenericArrayInBitsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericArrayInBitsView< + GenericArrayInBitsView> { + static constexpr const bool value = true; +}; + +template +inline GenericArrayInBitsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeArrayInBitsView( T &&emboss_reserved_local_arg) { + return GenericArrayInBitsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericArrayInBitsView> +MakeArrayInBitsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericArrayInBitsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericArrayInBitsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedArrayInBitsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericArrayInBitsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace ArrayInBitsInStruct { + +} // namespace ArrayInBitsInStruct + + +template +struct EmbossReservedInternalIsGenericArrayInBitsInStructView; + +template +class GenericArrayInBitsInStructView final { + public: + GenericArrayInBitsInStructView() : backing_() {} + explicit GenericArrayInBitsInStructView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericArrayInBitsInStructView( + const GenericArrayInBitsInStructView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericArrayInBitsInStructView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericArrayInBitsInStructView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericArrayInBitsInStructView &operator=( + const GenericArrayInBitsInStructView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_array_in_bits().Known()) return false; + if (has_array_in_bits().ValueOrDefault() && !array_in_bits().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericArrayInBitsInStructView emboss_reserved_local_other) const { + + if (!has_array_in_bits().Known()) return false; + if (!emboss_reserved_local_other.has_array_in_bits().Known()) return false; + + if (emboss_reserved_local_other.has_array_in_bits().ValueOrDefault() && + !has_array_in_bits().ValueOrDefault()) + return false; + if (has_array_in_bits().ValueOrDefault() && + !emboss_reserved_local_other.has_array_in_bits().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_array_in_bits().ValueOrDefault() && + has_array_in_bits().ValueOrDefault() && + !array_in_bits().Equals(emboss_reserved_local_other.array_in_bits())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericArrayInBitsInStructView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_array_in_bits().ValueOr(false) && + !has_array_in_bits().ValueOr(false)) + return false; + if (has_array_in_bits().ValueOr(false) && + !emboss_reserved_local_other.has_array_in_bits().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_array_in_bits().ValueOr(false) && + has_array_in_bits().ValueOr(false) && + !array_in_bits().UncheckedEquals(emboss_reserved_local_other.array_in_bits())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericArrayInBitsInStructView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericArrayInBitsInStructView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericArrayInBitsInStructView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "array_in_bits") { + if (!array_in_bits().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_array_in_bits().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + array_in_bits().IsAggregate() || array_in_bits().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("array_in_bits: "); + array_in_bits().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !array_in_bits().IsAggregate() && !array_in_bits().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("# array_in_bits: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericArrayInBitsView>, 16>> + + array_in_bits() const; + ::emboss::support::Maybe has_array_in_bits() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericArrayInBitsInStructView; +}; +using ArrayInBitsInStructView = + GenericArrayInBitsInStructView; +using ArrayInBitsInStructWriter = + GenericArrayInBitsInStructView; + +template +struct EmbossReservedInternalIsGenericArrayInBitsInStructView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericArrayInBitsInStructView< + GenericArrayInBitsInStructView> { + static constexpr const bool value = true; +}; + +template +inline GenericArrayInBitsInStructView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeArrayInBitsInStructView( T &&emboss_reserved_local_arg) { + return GenericArrayInBitsInStructView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericArrayInBitsInStructView> +MakeArrayInBitsInStructView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericArrayInBitsInStructView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericArrayInBitsInStructView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedArrayInBitsInStructView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericArrayInBitsInStructView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + +namespace StructOfBits { + +} // namespace StructOfBits + + +template +struct EmbossReservedInternalIsGenericStructOfBitsView; + +template +class GenericStructOfBitsView final { + public: + GenericStructOfBitsView() : backing_() {} + explicit GenericStructOfBitsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructOfBitsView( + const GenericStructOfBitsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructOfBitsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructOfBitsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructOfBitsView &operator=( + const GenericStructOfBitsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + + if (!has_located_byte().Known()) return false; + if (has_located_byte().ValueOrDefault() && !located_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericStructOfBitsView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (!has_located_byte().Known()) return false; + if (!emboss_reserved_local_other.has_located_byte().Known()) return false; + + if (emboss_reserved_local_other.has_located_byte().ValueOrDefault() && + !has_located_byte().ValueOrDefault()) + return false; + if (has_located_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_located_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_located_byte().ValueOrDefault() && + has_located_byte().ValueOrDefault() && + !located_byte().Equals(emboss_reserved_local_other.located_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructOfBitsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (emboss_reserved_local_other.has_located_byte().ValueOr(false) && + !has_located_byte().ValueOr(false)) + return false; + if (has_located_byte().ValueOr(false) && + !emboss_reserved_local_other.has_located_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_located_byte().ValueOr(false) && + has_located_byte().ValueOr(false) && + !located_byte().UncheckedEquals(emboss_reserved_local_other.located_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructOfBitsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructOfBitsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructOfBitsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "located_byte") { + if (!located_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + if (has_located_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + located_byte().IsAggregate() || located_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("located_byte: "); + located_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !located_byte().IsAggregate() && !located_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("# located_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericOneByteView>, 8>> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::test::FourByte::GenericTwoByteWithGapsView>, 16>> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::test::GenericFourByteView>, 32>> + + four_byte() const; + ::emboss::support::Maybe has_four_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + located_byte() const; + ::emboss::support::Maybe has_located_byte() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericStructOfBitsView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.one_byte().mid_nibble(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(7LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructOfBitsView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructOfBitsView; +}; +using StructOfBitsView = + GenericStructOfBitsView; +using StructOfBitsWriter = + GenericStructOfBitsView; + +template +struct EmbossReservedInternalIsGenericStructOfBitsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructOfBitsView< + GenericStructOfBitsView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructOfBitsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructOfBitsView( T &&emboss_reserved_local_arg) { + return GenericStructOfBitsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructOfBitsView> +MakeStructOfBitsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructOfBitsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructOfBitsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructOfBitsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructOfBitsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace BitArray { + +} // namespace BitArray + + +template +struct EmbossReservedInternalIsGenericBitArrayView; + +template +class GenericBitArrayView final { + public: + GenericBitArrayView() : backing_() {} + explicit GenericBitArrayView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBitArrayView( + const GenericBitArrayView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBitArrayView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBitArrayView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBitArrayView &operator=( + const GenericBitArrayView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericBitArrayView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericBitArrayView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericBitArrayView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBitArrayView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBitArrayView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericOneByteView::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + one_byte() const; + ::emboss::support::Maybe has_one_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBitArrayView; +}; +using BitArrayView = + GenericBitArrayView; +using BitArrayWriter = + GenericBitArrayView; + +template +struct EmbossReservedInternalIsGenericBitArrayView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBitArrayView< + GenericBitArrayView> { + static constexpr const bool value = true; +}; + +template +inline GenericBitArrayView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBitArrayView( T &&emboss_reserved_local_arg) { + return GenericBitArrayView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBitArrayView> +MakeBitArrayView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBitArrayView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBitArrayView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBitArrayView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBitArrayView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace OneByte { + +} // namespace OneByte + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericOneByteView::high_bit() + const { + + if ( has_high_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(7LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 7>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOneByteView::has_high_bit() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericOneByteView::less_high_bit() + const { + + if ( has_less_high_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOneByteView::has_less_high_bit() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericOneByteView::mid_nibble() + const { + + if ( has_mid_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOneByteView::has_mid_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericOneByteView::less_low_bit() + const { + + if ( has_less_low_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOneByteView::has_less_low_bit() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericOneByteView::low_bit() + const { + + if ( has_low_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOneByteView::has_low_bit() const { + return ::emboss::support::Maybe(true); +} + + +namespace OneByte { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace OneByte + +template +inline constexpr ::std::int32_t +GenericOneByteView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return OneByte::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericOneByteView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return OneByte::IntrinsicSizeInBits(); +} + +namespace OneByte { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace OneByte + +template +inline constexpr ::std::int32_t +GenericOneByteView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return OneByte::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericOneByteView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return OneByte::MaxSizeInBits(); +} + +namespace OneByte { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace OneByte + +template +inline constexpr ::std::int32_t +GenericOneByteView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return OneByte::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericOneByteView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return OneByte::MinSizeInBits(); +} +namespace FourByte { +namespace TwoByteWithGaps { + +} // namespace TwoByteWithGaps + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericTwoByteWithGapsView::high_bit() + const { + + if ( has_high_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(15LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 15>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoByteWithGapsView::has_high_bit() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericTwoByteWithGapsView::mid_nibble() + const { + + if ( has_mid_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoByteWithGapsView::has_mid_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericTwoByteWithGapsView::low_bit() + const { + + if ( has_low_bit().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoByteWithGapsView::has_low_bit() const { + return ::emboss::support::Maybe(true); +} + + +namespace TwoByteWithGaps { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace TwoByteWithGaps + +template +inline constexpr ::std::int32_t +GenericTwoByteWithGapsView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return TwoByteWithGaps::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericTwoByteWithGapsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return TwoByteWithGaps::IntrinsicSizeInBits(); +} + +namespace TwoByteWithGaps { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace TwoByteWithGaps + +template +inline constexpr ::std::int32_t +GenericTwoByteWithGapsView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return TwoByteWithGaps::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericTwoByteWithGapsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return TwoByteWithGaps::MaxSizeInBits(); +} + +namespace TwoByteWithGaps { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace TwoByteWithGaps + +template +inline constexpr ::std::int32_t +GenericTwoByteWithGapsView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return TwoByteWithGaps::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericTwoByteWithGapsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return TwoByteWithGaps::MinSizeInBits(); +} + +} // namespace FourByte + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericFourByteView::high_nibble() + const { + + if ( has_high_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(28LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 28>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFourByteView::has_high_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericOneByteView> + + GenericFourByteView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(20LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericOneByteView> + +( + backing_ + .template GetOffsetStorage<0, + 20>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericOneByteView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFourByteView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::FourByte::GenericTwoByteWithGapsView> + + GenericFourByteView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(16LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::FourByte::GenericTwoByteWithGapsView> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::FourByte::GenericTwoByteWithGapsView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFourByteView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, FourByte::EmbossReservedValidatorForRawLowNibble>, + typename Storage::template OffsetStorageType> + + GenericFourByteView::raw_low_nibble() + const { + + if ( has_raw_low_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, FourByte::EmbossReservedValidatorForRawLowNibble>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, FourByte::EmbossReservedValidatorForRawLowNibble>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFourByteView::has_raw_low_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericFourByteView::EmbossReservedVirtualLowNibbleView +GenericFourByteView::low_nibble() const { + return + typename GenericFourByteView::EmbossReservedVirtualLowNibbleView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericFourByteView::has_low_nibble() const { + return ::emboss::support::Maybe(true); +} + + +namespace FourByte { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace FourByte + +template +inline constexpr ::std::int32_t +GenericFourByteView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return FourByte::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericFourByteView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return FourByte::IntrinsicSizeInBits(); +} + +namespace FourByte { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace FourByte + +template +inline constexpr ::std::int32_t +GenericFourByteView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return FourByte::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericFourByteView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return FourByte::MaxSizeInBits(); +} + +namespace FourByte { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace FourByte + +template +inline constexpr ::std::int32_t +GenericFourByteView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return FourByte::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericFourByteView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return FourByte::MinSizeInBits(); +} +namespace ArrayInBits { + +} // namespace ArrayInBits + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericArrayInBitsView::lone_flag() + const { + + if ( has_lone_flag().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(15LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 15>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericArrayInBitsView::has_lone_flag() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 1 > + + GenericArrayInBitsView::flags() + const { + + if ( has_flags().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(12LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArrayInBitsView::has_flags() const { + return ::emboss::support::Maybe(true); +} + + +namespace ArrayInBits { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace ArrayInBits + +template +inline constexpr ::std::int32_t +GenericArrayInBitsView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return ArrayInBits::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericArrayInBitsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return ArrayInBits::IntrinsicSizeInBits(); +} + +namespace ArrayInBits { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace ArrayInBits + +template +inline constexpr ::std::int32_t +GenericArrayInBitsView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return ArrayInBits::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericArrayInBitsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return ArrayInBits::MaxSizeInBits(); +} + +namespace ArrayInBits { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace ArrayInBits + +template +inline constexpr ::std::int32_t +GenericArrayInBitsView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return ArrayInBits::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericArrayInBitsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return ArrayInBits::MinSizeInBits(); +} +namespace ArrayInBitsInStruct { + +} // namespace ArrayInBitsInStruct + + +template +inline typename ::emboss::test::GenericArrayInBitsView>, 16>> + + GenericArrayInBitsInStructView::array_in_bits() + const { + + if ( has_array_in_bits().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericArrayInBitsView>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericArrayInBitsView>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericArrayInBitsInStructView::has_array_in_bits() const { + return ::emboss::support::Maybe(true); +} + + +namespace ArrayInBitsInStruct { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ArrayInBitsInStruct + +template +inline constexpr ::std::int32_t +GenericArrayInBitsInStructView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ArrayInBitsInStruct::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArrayInBitsInStructView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ArrayInBitsInStruct::IntrinsicSizeInBytes(); +} + +namespace ArrayInBitsInStruct { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ArrayInBitsInStruct + +template +inline constexpr ::std::int32_t +GenericArrayInBitsInStructView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ArrayInBitsInStruct::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArrayInBitsInStructView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ArrayInBitsInStruct::MaxSizeInBytes(); +} + +namespace ArrayInBitsInStruct { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ArrayInBitsInStruct + +template +inline constexpr ::std::int32_t +GenericArrayInBitsInStructView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ArrayInBitsInStruct::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArrayInBitsInStructView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ArrayInBitsInStruct::MinSizeInBytes(); +} +namespace StructOfBits { + +} // namespace StructOfBits + + +template +inline typename ::emboss::test::GenericOneByteView>, 8>> + + GenericStructOfBitsView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericOneByteView>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericOneByteView>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructOfBitsView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::FourByte::GenericTwoByteWithGapsView>, 16>> + + GenericStructOfBitsView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::FourByte::GenericTwoByteWithGapsView>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::FourByte::GenericTwoByteWithGapsView>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructOfBitsView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericFourByteView>, 32>> + + GenericStructOfBitsView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericFourByteView>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericFourByteView>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructOfBitsView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericStructOfBitsView::located_byte() + const { + + if ( has_located_byte().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = one_byte().mid_nibble(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructOfBitsView::has_located_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructOfBitsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericStructOfBitsView::IntrinsicSizeInBytes() const { + return + typename GenericStructOfBitsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructOfBitsView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructOfBits { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace StructOfBits + +template +inline constexpr ::std::int32_t +GenericStructOfBitsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructOfBits::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructOfBitsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructOfBits::MaxSizeInBytes(); +} + +namespace StructOfBits { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(7LL)).ValueOrDefault(); +} +} // namespace StructOfBits + +template +inline constexpr ::std::int32_t +GenericStructOfBitsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructOfBits::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructOfBitsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructOfBits::MinSizeInBytes(); +} +namespace BitArray { + +} // namespace BitArray + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericOneByteView::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericBitArrayView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericOneByteView::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericOneByteView::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericBitArrayView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace BitArray { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace BitArray + +template +inline constexpr ::std::int32_t +GenericBitArrayView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return BitArray::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBitArrayView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return BitArray::IntrinsicSizeInBytes(); +} + +namespace BitArray { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace BitArray + +template +inline constexpr ::std::int32_t +GenericBitArrayView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return BitArray::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBitArrayView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return BitArray::MaxSizeInBytes(); +} + +namespace BitArray { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace BitArray + +template +inline constexpr ::std::int32_t +GenericBitArrayView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return BitArray::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBitArrayView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return BitArray::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_BITS_EMB_H_ + diff --git a/testdata/golden_cpp/complex_offset.emb.h b/testdata/golden_cpp/complex_offset.emb.h new file mode 100644 index 00000000..31889b0c --- /dev/null +++ b/testdata/golden_cpp/complex_offset.emb.h @@ -0,0 +1,3689 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_COMPLEX_OFFSET_EMB_H_ +#define TESTDATA_COMPLEX_OFFSET_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Length { + +} // namespace Length + + +template +class GenericLengthView; + +namespace Data { + +} // namespace Data + + +template +class GenericDataView; + +namespace PackedFields { + +} // namespace PackedFields + + +template +class GenericPackedFieldsView; + + + + + +namespace Length { + +} // namespace Length + + +template +struct EmbossReservedInternalIsGenericLengthView; + +template +class GenericLengthView final { + public: + GenericLengthView() : backing_() {} + explicit GenericLengthView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericLengthView( + const GenericLengthView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericLengthView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericLengthView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericLengthView &operator=( + const GenericLengthView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_length().Known()) return false; + if (has_length().ValueOrDefault() && !length().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericLengthView emboss_reserved_local_other) const { + + if (!has_length().Known()) return false; + if (!emboss_reserved_local_other.has_length().Known()) return false; + + if (emboss_reserved_local_other.has_length().ValueOrDefault() && + !has_length().ValueOrDefault()) + return false; + if (has_length().ValueOrDefault() && + !emboss_reserved_local_other.has_length().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_length().ValueOrDefault() && + has_length().ValueOrDefault() && + !length().Equals(emboss_reserved_local_other.length())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericLengthView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_length().ValueOr(false) && + !has_length().ValueOr(false)) + return false; + if (has_length().ValueOr(false) && + !emboss_reserved_local_other.has_length().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_length().ValueOr(false) && + has_length().ValueOr(false) && + !length().UncheckedEquals(emboss_reserved_local_other.length())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericLengthView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericLengthView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericLengthView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "length") { + if (!length().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_length().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + length().IsAggregate() || length().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("length: "); + length().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !length().IsAggregate() && !length().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("# length: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + length() const; + ::emboss::support::Maybe has_length() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericLengthView; +}; +using LengthView = + GenericLengthView; +using LengthWriter = + GenericLengthView; + +template +struct EmbossReservedInternalIsGenericLengthView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericLengthView< + GenericLengthView> { + static constexpr const bool value = true; +}; + +template +inline GenericLengthView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeLengthView( T &&emboss_reserved_local_arg) { + return GenericLengthView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericLengthView> +MakeLengthView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericLengthView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericLengthView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedLengthView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericLengthView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace Data { + +} // namespace Data + + +template +struct EmbossReservedInternalIsGenericDataView; + +template +class GenericDataView final { + public: + GenericDataView() : backing_() {} + explicit GenericDataView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericDataView( + const GenericDataView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericDataView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericDataView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericDataView &operator=( + const GenericDataView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_length().Known()) return false; + if (has_length().ValueOrDefault() && !length().Ok()) return false; + + + if (!has_data().Known()) return false; + if (has_data().ValueOrDefault() && !data().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericDataView emboss_reserved_local_other) const { + + if (!has_length().Known()) return false; + if (!emboss_reserved_local_other.has_length().Known()) return false; + + if (emboss_reserved_local_other.has_length().ValueOrDefault() && + !has_length().ValueOrDefault()) + return false; + if (has_length().ValueOrDefault() && + !emboss_reserved_local_other.has_length().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_length().ValueOrDefault() && + has_length().ValueOrDefault() && + !length().Equals(emboss_reserved_local_other.length())) + return false; + + + + if (!has_data().Known()) return false; + if (!emboss_reserved_local_other.has_data().Known()) return false; + + if (emboss_reserved_local_other.has_data().ValueOrDefault() && + !has_data().ValueOrDefault()) + return false; + if (has_data().ValueOrDefault() && + !emboss_reserved_local_other.has_data().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_data().ValueOrDefault() && + has_data().ValueOrDefault() && + !data().Equals(emboss_reserved_local_other.data())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericDataView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_length().ValueOr(false) && + !has_length().ValueOr(false)) + return false; + if (has_length().ValueOr(false) && + !emboss_reserved_local_other.has_length().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_length().ValueOr(false) && + has_length().ValueOr(false) && + !length().UncheckedEquals(emboss_reserved_local_other.length())) + return false; + + + + if (emboss_reserved_local_other.has_data().ValueOr(false) && + !has_data().ValueOr(false)) + return false; + if (has_data().ValueOr(false) && + !emboss_reserved_local_other.has_data().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_data().ValueOr(false) && + has_data().ValueOr(false) && + !data().UncheckedEquals(emboss_reserved_local_other.data())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericDataView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericDataView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericDataView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "length") { + if (!length().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "data") { + if (!data().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_length().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + length().IsAggregate() || length().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("length: "); + length().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !length().IsAggregate() && !length().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("# length: UNREADABLE\n"); + } + } + + if (has_data().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + data().IsAggregate() || data().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("data: "); + data().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !data().IsAggregate() && !data().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("# data: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericLengthView> + + length() const; + ::emboss::support::Maybe has_length() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + data() const; + ::emboss::support::Maybe has_data() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericDataView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.length().length(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericDataView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericDataView; +}; +using DataView = + GenericDataView; +using DataWriter = + GenericDataView; + +template +struct EmbossReservedInternalIsGenericDataView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericDataView< + GenericDataView> { + static constexpr const bool value = true; +}; + +template +inline GenericDataView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeDataView( T &&emboss_reserved_local_arg) { + return GenericDataView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericDataView> +MakeDataView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDataView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericDataView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedDataView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDataView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + + + + + + + + + + + + +namespace PackedFields { + +} // namespace PackedFields + + +template +struct EmbossReservedInternalIsGenericPackedFieldsView; + +template +class GenericPackedFieldsView final { + public: + GenericPackedFieldsView() : backing_() {} + explicit GenericPackedFieldsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericPackedFieldsView( + const GenericPackedFieldsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericPackedFieldsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericPackedFieldsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericPackedFieldsView &operator=( + const GenericPackedFieldsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_length1().Known()) return false; + if (has_length1().ValueOrDefault() && !length1().Ok()) return false; + + + if (!has_data1().Known()) return false; + if (has_data1().ValueOrDefault() && !data1().Ok()) return false; + + + if (!has_o1().Known()) return false; + if (has_o1().ValueOrDefault() && !o1().Ok()) return false; + + + if (!has_length2().Known()) return false; + if (has_length2().ValueOrDefault() && !length2().Ok()) return false; + + + if (!has_data2().Known()) return false; + if (has_data2().ValueOrDefault() && !data2().Ok()) return false; + + + if (!has_o2().Known()) return false; + if (has_o2().ValueOrDefault() && !o2().Ok()) return false; + + + if (!has_length3().Known()) return false; + if (has_length3().ValueOrDefault() && !length3().Ok()) return false; + + + if (!has_data3().Known()) return false; + if (has_data3().ValueOrDefault() && !data3().Ok()) return false; + + + if (!has_o3().Known()) return false; + if (has_o3().ValueOrDefault() && !o3().Ok()) return false; + + + if (!has_length4().Known()) return false; + if (has_length4().ValueOrDefault() && !length4().Ok()) return false; + + + if (!has_data4().Known()) return false; + if (has_data4().ValueOrDefault() && !data4().Ok()) return false; + + + if (!has_o4().Known()) return false; + if (has_o4().ValueOrDefault() && !o4().Ok()) return false; + + + if (!has_length5().Known()) return false; + if (has_length5().ValueOrDefault() && !length5().Ok()) return false; + + + if (!has_data5().Known()) return false; + if (has_data5().ValueOrDefault() && !data5().Ok()) return false; + + + if (!has_o5().Known()) return false; + if (has_o5().ValueOrDefault() && !o5().Ok()) return false; + + + if (!has_length6().Known()) return false; + if (has_length6().ValueOrDefault() && !length6().Ok()) return false; + + + if (!has_data6().Known()) return false; + if (has_data6().ValueOrDefault() && !data6().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericPackedFieldsView emboss_reserved_local_other) const { + + if (!has_length1().Known()) return false; + if (!emboss_reserved_local_other.has_length1().Known()) return false; + + if (emboss_reserved_local_other.has_length1().ValueOrDefault() && + !has_length1().ValueOrDefault()) + return false; + if (has_length1().ValueOrDefault() && + !emboss_reserved_local_other.has_length1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_length1().ValueOrDefault() && + has_length1().ValueOrDefault() && + !length1().Equals(emboss_reserved_local_other.length1())) + return false; + + + + if (!has_data1().Known()) return false; + if (!emboss_reserved_local_other.has_data1().Known()) return false; + + if (emboss_reserved_local_other.has_data1().ValueOrDefault() && + !has_data1().ValueOrDefault()) + return false; + if (has_data1().ValueOrDefault() && + !emboss_reserved_local_other.has_data1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_data1().ValueOrDefault() && + has_data1().ValueOrDefault() && + !data1().Equals(emboss_reserved_local_other.data1())) + return false; + + + + if (!has_length2().Known()) return false; + if (!emboss_reserved_local_other.has_length2().Known()) return false; + + if (emboss_reserved_local_other.has_length2().ValueOrDefault() && + !has_length2().ValueOrDefault()) + return false; + if (has_length2().ValueOrDefault() && + !emboss_reserved_local_other.has_length2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_length2().ValueOrDefault() && + has_length2().ValueOrDefault() && + !length2().Equals(emboss_reserved_local_other.length2())) + return false; + + + + if (!has_data2().Known()) return false; + if (!emboss_reserved_local_other.has_data2().Known()) return false; + + if (emboss_reserved_local_other.has_data2().ValueOrDefault() && + !has_data2().ValueOrDefault()) + return false; + if (has_data2().ValueOrDefault() && + !emboss_reserved_local_other.has_data2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_data2().ValueOrDefault() && + has_data2().ValueOrDefault() && + !data2().Equals(emboss_reserved_local_other.data2())) + return false; + + + + if (!has_length3().Known()) return false; + if (!emboss_reserved_local_other.has_length3().Known()) return false; + + if (emboss_reserved_local_other.has_length3().ValueOrDefault() && + !has_length3().ValueOrDefault()) + return false; + if (has_length3().ValueOrDefault() && + !emboss_reserved_local_other.has_length3().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_length3().ValueOrDefault() && + has_length3().ValueOrDefault() && + !length3().Equals(emboss_reserved_local_other.length3())) + return false; + + + + if (!has_data3().Known()) return false; + if (!emboss_reserved_local_other.has_data3().Known()) return false; + + if (emboss_reserved_local_other.has_data3().ValueOrDefault() && + !has_data3().ValueOrDefault()) + return false; + if (has_data3().ValueOrDefault() && + !emboss_reserved_local_other.has_data3().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_data3().ValueOrDefault() && + has_data3().ValueOrDefault() && + !data3().Equals(emboss_reserved_local_other.data3())) + return false; + + + + if (!has_length4().Known()) return false; + if (!emboss_reserved_local_other.has_length4().Known()) return false; + + if (emboss_reserved_local_other.has_length4().ValueOrDefault() && + !has_length4().ValueOrDefault()) + return false; + if (has_length4().ValueOrDefault() && + !emboss_reserved_local_other.has_length4().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_length4().ValueOrDefault() && + has_length4().ValueOrDefault() && + !length4().Equals(emboss_reserved_local_other.length4())) + return false; + + + + if (!has_data4().Known()) return false; + if (!emboss_reserved_local_other.has_data4().Known()) return false; + + if (emboss_reserved_local_other.has_data4().ValueOrDefault() && + !has_data4().ValueOrDefault()) + return false; + if (has_data4().ValueOrDefault() && + !emboss_reserved_local_other.has_data4().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_data4().ValueOrDefault() && + has_data4().ValueOrDefault() && + !data4().Equals(emboss_reserved_local_other.data4())) + return false; + + + + if (!has_length5().Known()) return false; + if (!emboss_reserved_local_other.has_length5().Known()) return false; + + if (emboss_reserved_local_other.has_length5().ValueOrDefault() && + !has_length5().ValueOrDefault()) + return false; + if (has_length5().ValueOrDefault() && + !emboss_reserved_local_other.has_length5().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_length5().ValueOrDefault() && + has_length5().ValueOrDefault() && + !length5().Equals(emboss_reserved_local_other.length5())) + return false; + + + + if (!has_data5().Known()) return false; + if (!emboss_reserved_local_other.has_data5().Known()) return false; + + if (emboss_reserved_local_other.has_data5().ValueOrDefault() && + !has_data5().ValueOrDefault()) + return false; + if (has_data5().ValueOrDefault() && + !emboss_reserved_local_other.has_data5().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_data5().ValueOrDefault() && + has_data5().ValueOrDefault() && + !data5().Equals(emboss_reserved_local_other.data5())) + return false; + + + + if (!has_length6().Known()) return false; + if (!emboss_reserved_local_other.has_length6().Known()) return false; + + if (emboss_reserved_local_other.has_length6().ValueOrDefault() && + !has_length6().ValueOrDefault()) + return false; + if (has_length6().ValueOrDefault() && + !emboss_reserved_local_other.has_length6().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_length6().ValueOrDefault() && + has_length6().ValueOrDefault() && + !length6().Equals(emboss_reserved_local_other.length6())) + return false; + + + + if (!has_data6().Known()) return false; + if (!emboss_reserved_local_other.has_data6().Known()) return false; + + if (emboss_reserved_local_other.has_data6().ValueOrDefault() && + !has_data6().ValueOrDefault()) + return false; + if (has_data6().ValueOrDefault() && + !emboss_reserved_local_other.has_data6().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_data6().ValueOrDefault() && + has_data6().ValueOrDefault() && + !data6().Equals(emboss_reserved_local_other.data6())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericPackedFieldsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_length1().ValueOr(false) && + !has_length1().ValueOr(false)) + return false; + if (has_length1().ValueOr(false) && + !emboss_reserved_local_other.has_length1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_length1().ValueOr(false) && + has_length1().ValueOr(false) && + !length1().UncheckedEquals(emboss_reserved_local_other.length1())) + return false; + + + + if (emboss_reserved_local_other.has_data1().ValueOr(false) && + !has_data1().ValueOr(false)) + return false; + if (has_data1().ValueOr(false) && + !emboss_reserved_local_other.has_data1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_data1().ValueOr(false) && + has_data1().ValueOr(false) && + !data1().UncheckedEquals(emboss_reserved_local_other.data1())) + return false; + + + + if (emboss_reserved_local_other.has_length2().ValueOr(false) && + !has_length2().ValueOr(false)) + return false; + if (has_length2().ValueOr(false) && + !emboss_reserved_local_other.has_length2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_length2().ValueOr(false) && + has_length2().ValueOr(false) && + !length2().UncheckedEquals(emboss_reserved_local_other.length2())) + return false; + + + + if (emboss_reserved_local_other.has_data2().ValueOr(false) && + !has_data2().ValueOr(false)) + return false; + if (has_data2().ValueOr(false) && + !emboss_reserved_local_other.has_data2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_data2().ValueOr(false) && + has_data2().ValueOr(false) && + !data2().UncheckedEquals(emboss_reserved_local_other.data2())) + return false; + + + + if (emboss_reserved_local_other.has_length3().ValueOr(false) && + !has_length3().ValueOr(false)) + return false; + if (has_length3().ValueOr(false) && + !emboss_reserved_local_other.has_length3().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_length3().ValueOr(false) && + has_length3().ValueOr(false) && + !length3().UncheckedEquals(emboss_reserved_local_other.length3())) + return false; + + + + if (emboss_reserved_local_other.has_data3().ValueOr(false) && + !has_data3().ValueOr(false)) + return false; + if (has_data3().ValueOr(false) && + !emboss_reserved_local_other.has_data3().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_data3().ValueOr(false) && + has_data3().ValueOr(false) && + !data3().UncheckedEquals(emboss_reserved_local_other.data3())) + return false; + + + + if (emboss_reserved_local_other.has_length4().ValueOr(false) && + !has_length4().ValueOr(false)) + return false; + if (has_length4().ValueOr(false) && + !emboss_reserved_local_other.has_length4().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_length4().ValueOr(false) && + has_length4().ValueOr(false) && + !length4().UncheckedEquals(emboss_reserved_local_other.length4())) + return false; + + + + if (emboss_reserved_local_other.has_data4().ValueOr(false) && + !has_data4().ValueOr(false)) + return false; + if (has_data4().ValueOr(false) && + !emboss_reserved_local_other.has_data4().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_data4().ValueOr(false) && + has_data4().ValueOr(false) && + !data4().UncheckedEquals(emboss_reserved_local_other.data4())) + return false; + + + + if (emboss_reserved_local_other.has_length5().ValueOr(false) && + !has_length5().ValueOr(false)) + return false; + if (has_length5().ValueOr(false) && + !emboss_reserved_local_other.has_length5().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_length5().ValueOr(false) && + has_length5().ValueOr(false) && + !length5().UncheckedEquals(emboss_reserved_local_other.length5())) + return false; + + + + if (emboss_reserved_local_other.has_data5().ValueOr(false) && + !has_data5().ValueOr(false)) + return false; + if (has_data5().ValueOr(false) && + !emboss_reserved_local_other.has_data5().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_data5().ValueOr(false) && + has_data5().ValueOr(false) && + !data5().UncheckedEquals(emboss_reserved_local_other.data5())) + return false; + + + + if (emboss_reserved_local_other.has_length6().ValueOr(false) && + !has_length6().ValueOr(false)) + return false; + if (has_length6().ValueOr(false) && + !emboss_reserved_local_other.has_length6().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_length6().ValueOr(false) && + has_length6().ValueOr(false) && + !length6().UncheckedEquals(emboss_reserved_local_other.length6())) + return false; + + + + if (emboss_reserved_local_other.has_data6().ValueOr(false) && + !has_data6().ValueOr(false)) + return false; + if (has_data6().ValueOr(false) && + !emboss_reserved_local_other.has_data6().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_data6().ValueOr(false) && + has_data6().ValueOr(false) && + !data6().UncheckedEquals(emboss_reserved_local_other.data6())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericPackedFieldsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericPackedFieldsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericPackedFieldsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "length1") { + if (!length1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "data1") { + if (!data1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "length2") { + if (!length2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "data2") { + if (!data2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "length3") { + if (!length3().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "data3") { + if (!data3().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "length4") { + if (!length4().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "data4") { + if (!data4().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "length5") { + if (!length5().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "data5") { + if (!data5().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "length6") { + if (!length6().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "data6") { + if (!data6().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_length1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + length1().IsAggregate() || length1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("length1: "); + length1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !length1().IsAggregate() && !length1().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("# length1: UNREADABLE\n"); + } + } + + if (has_data1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + data1().IsAggregate() || data1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("data1: "); + data1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !data1().IsAggregate() && !data1().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("# data1: UNREADABLE\n"); + } + } + + if (has_o1().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + o1().IsAggregate() || o1().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# o1: "); + o1().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("# o1: UNREADABLE\n"); + } + } + + if (has_length2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + length2().IsAggregate() || length2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("length2: "); + length2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !length2().IsAggregate() && !length2().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("# length2: UNREADABLE\n"); + } + } + + if (has_data2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + data2().IsAggregate() || data2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("data2: "); + data2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !data2().IsAggregate() && !data2().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("# data2: UNREADABLE\n"); + } + } + + if (has_o2().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + o2().IsAggregate() || o2().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# o2: "); + o2().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("# o2: UNREADABLE\n"); + } + } + + if (has_length3().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + length3().IsAggregate() || length3().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("length3: "); + length3().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !length3().IsAggregate() && !length3().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("# length3: UNREADABLE\n"); + } + } + + if (has_data3().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + data3().IsAggregate() || data3().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("data3: "); + data3().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !data3().IsAggregate() && !data3().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("# data3: UNREADABLE\n"); + } + } + + if (has_o3().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + o3().IsAggregate() || o3().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# o3: "); + o3().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("# o3: UNREADABLE\n"); + } + } + + if (has_length4().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + length4().IsAggregate() || length4().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("length4: "); + length4().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !length4().IsAggregate() && !length4().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("# length4: UNREADABLE\n"); + } + } + + if (has_data4().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + data4().IsAggregate() || data4().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("data4: "); + data4().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !data4().IsAggregate() && !data4().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("# data4: UNREADABLE\n"); + } + } + + if (has_o4().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + o4().IsAggregate() || o4().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# o4: "); + o4().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("# o4: UNREADABLE\n"); + } + } + + if (has_length5().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + length5().IsAggregate() || length5().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("length5: "); + length5().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !length5().IsAggregate() && !length5().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("# length5: UNREADABLE\n"); + } + } + + if (has_data5().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + data5().IsAggregate() || data5().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("data5: "); + data5().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !data5().IsAggregate() && !data5().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("# data5: UNREADABLE\n"); + } + } + + if (has_o5().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + o5().IsAggregate() || o5().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# o5: "); + o5().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("# o5: UNREADABLE\n"); + } + } + + if (has_length6().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + length6().IsAggregate() || length6().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("length6: "); + length6().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !length6().IsAggregate() && !length6().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("# length6: UNREADABLE\n"); + } + } + + if (has_data6().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + data6().IsAggregate() || data6().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("data6: "); + data6().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !data6().IsAggregate() && !data6().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("# data6: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericLengthView> + + length1() const; + ::emboss::support::Maybe has_length1() const; + + public: + typename ::emboss::test::GenericDataView> + + data1() const; + ::emboss::support::Maybe has_data1() const; + + public: + class EmbossReservedVirtualO1View final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualO1View( + const GenericPackedFieldsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualO1View() = delete; + EmbossReservedVirtualO1View(const EmbossReservedVirtualO1View &) = default; + EmbossReservedVirtualO1View(EmbossReservedVirtualO1View &&) = default; + EmbossReservedVirtualO1View &operator=(const EmbossReservedVirtualO1View &) = + default; + EmbossReservedVirtualO1View &operator=(EmbossReservedVirtualO1View &&) = + default; + ~EmbossReservedVirtualO1View() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_o1().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.data1().IntrinsicSizeInBytes(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + return emboss_reserved_local_subexpr_2; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericPackedFieldsView view_; + }; + EmbossReservedVirtualO1View o1() const; + ::emboss::support::Maybe has_o1() const; + + public: + typename ::emboss::test::GenericLengthView> + + length2() const; + ::emboss::support::Maybe has_length2() const; + + public: + typename ::emboss::test::GenericDataView> + + data2() const; + ::emboss::support::Maybe has_data2() const; + + public: + class EmbossReservedVirtualO2View final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualO2View( + const GenericPackedFieldsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualO2View() = delete; + EmbossReservedVirtualO2View(const EmbossReservedVirtualO2View &) = default; + EmbossReservedVirtualO2View(EmbossReservedVirtualO2View &&) = default; + EmbossReservedVirtualO2View &operator=(const EmbossReservedVirtualO2View &) = + default; + EmbossReservedVirtualO2View &operator=(EmbossReservedVirtualO2View &&) = + default; + ~EmbossReservedVirtualO2View() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_o2().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.o1(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.data2().IntrinsicSizeInBytes(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericPackedFieldsView view_; + }; + EmbossReservedVirtualO2View o2() const; + ::emboss::support::Maybe has_o2() const; + + public: + typename ::emboss::test::GenericLengthView> + + length3() const; + ::emboss::support::Maybe has_length3() const; + + public: + typename ::emboss::test::GenericDataView> + + data3() const; + ::emboss::support::Maybe has_data3() const; + + public: + class EmbossReservedVirtualO3View final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualO3View( + const GenericPackedFieldsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualO3View() = delete; + EmbossReservedVirtualO3View(const EmbossReservedVirtualO3View &) = default; + EmbossReservedVirtualO3View(EmbossReservedVirtualO3View &&) = default; + EmbossReservedVirtualO3View &operator=(const EmbossReservedVirtualO3View &) = + default; + EmbossReservedVirtualO3View &operator=(EmbossReservedVirtualO3View &&) = + default; + ~EmbossReservedVirtualO3View() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_o3().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.o2(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.data3().IntrinsicSizeInBytes(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericPackedFieldsView view_; + }; + EmbossReservedVirtualO3View o3() const; + ::emboss::support::Maybe has_o3() const; + + public: + typename ::emboss::test::GenericLengthView> + + length4() const; + ::emboss::support::Maybe has_length4() const; + + public: + typename ::emboss::test::GenericDataView> + + data4() const; + ::emboss::support::Maybe has_data4() const; + + public: + class EmbossReservedVirtualO4View final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualO4View( + const GenericPackedFieldsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualO4View() = delete; + EmbossReservedVirtualO4View(const EmbossReservedVirtualO4View &) = default; + EmbossReservedVirtualO4View(EmbossReservedVirtualO4View &&) = default; + EmbossReservedVirtualO4View &operator=(const EmbossReservedVirtualO4View &) = + default; + EmbossReservedVirtualO4View &operator=(EmbossReservedVirtualO4View &&) = + default; + ~EmbossReservedVirtualO4View() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_o4().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.o3(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.data4().IntrinsicSizeInBytes(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericPackedFieldsView view_; + }; + EmbossReservedVirtualO4View o4() const; + ::emboss::support::Maybe has_o4() const; + + public: + typename ::emboss::test::GenericLengthView> + + length5() const; + ::emboss::support::Maybe has_length5() const; + + public: + typename ::emboss::test::GenericDataView> + + data5() const; + ::emboss::support::Maybe has_data5() const; + + public: + class EmbossReservedVirtualO5View final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualO5View( + const GenericPackedFieldsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualO5View() = delete; + EmbossReservedVirtualO5View(const EmbossReservedVirtualO5View &) = default; + EmbossReservedVirtualO5View(EmbossReservedVirtualO5View &&) = default; + EmbossReservedVirtualO5View &operator=(const EmbossReservedVirtualO5View &) = + default; + EmbossReservedVirtualO5View &operator=(EmbossReservedVirtualO5View &&) = + default; + ~EmbossReservedVirtualO5View() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_o5().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.o4(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.data5().IntrinsicSizeInBytes(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericPackedFieldsView view_; + }; + EmbossReservedVirtualO5View o5() const; + ::emboss::support::Maybe has_o5() const; + + public: + typename ::emboss::test::GenericLengthView> + + length6() const; + ::emboss::support::Maybe has_length6() const; + + public: + typename ::emboss::test::GenericDataView> + + data6() const; + ::emboss::support::Maybe has_data6() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericPackedFieldsView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.length1().length(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(0LL)), emboss_reserved_local_subexpr_3); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = view_.o1(); + const auto emboss_reserved_local_subexpr_7 = (emboss_reserved_local_subexpr_6.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_6.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Sum(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_10 = view_.length2().length(); + const auto emboss_reserved_local_subexpr_11 = (emboss_reserved_local_subexpr_10.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_10.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_12 = ::emboss::support::Sum(emboss_reserved_local_subexpr_11, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_13 = ::emboss::support::Sum(emboss_reserved_local_subexpr_7, emboss_reserved_local_subexpr_12); + const auto emboss_reserved_local_subexpr_14 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_13, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_15 = view_.o2(); + const auto emboss_reserved_local_subexpr_16 = (emboss_reserved_local_subexpr_15.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_15.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_17 = ::emboss::support::Sum(emboss_reserved_local_subexpr_16, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_18 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_17, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_19 = view_.length3().length(); + const auto emboss_reserved_local_subexpr_20 = (emboss_reserved_local_subexpr_19.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_19.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_21 = ::emboss::support::Sum(emboss_reserved_local_subexpr_20, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_22 = ::emboss::support::Sum(emboss_reserved_local_subexpr_16, emboss_reserved_local_subexpr_21); + const auto emboss_reserved_local_subexpr_23 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_22, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_24 = view_.o3(); + const auto emboss_reserved_local_subexpr_25 = (emboss_reserved_local_subexpr_24.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_24.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_26 = ::emboss::support::Sum(emboss_reserved_local_subexpr_25, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_27 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_26, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_28 = view_.length4().length(); + const auto emboss_reserved_local_subexpr_29 = (emboss_reserved_local_subexpr_28.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_28.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_30 = ::emboss::support::Sum(emboss_reserved_local_subexpr_29, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_31 = ::emboss::support::Sum(emboss_reserved_local_subexpr_25, emboss_reserved_local_subexpr_30); + const auto emboss_reserved_local_subexpr_32 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_31, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_33 = view_.o4(); + const auto emboss_reserved_local_subexpr_34 = (emboss_reserved_local_subexpr_33.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_33.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_35 = ::emboss::support::Sum(emboss_reserved_local_subexpr_34, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_36 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_35, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_37 = view_.length5().length(); + const auto emboss_reserved_local_subexpr_38 = (emboss_reserved_local_subexpr_37.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_37.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_39 = ::emboss::support::Sum(emboss_reserved_local_subexpr_38, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_40 = ::emboss::support::Sum(emboss_reserved_local_subexpr_34, emboss_reserved_local_subexpr_39); + const auto emboss_reserved_local_subexpr_41 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_40, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_42 = view_.o5(); + const auto emboss_reserved_local_subexpr_43 = (emboss_reserved_local_subexpr_42.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_42.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_44 = ::emboss::support::Sum(emboss_reserved_local_subexpr_43, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_45 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_44, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_46 = view_.length6().length(); + const auto emboss_reserved_local_subexpr_47 = (emboss_reserved_local_subexpr_46.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_46.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_48 = ::emboss::support::Sum(emboss_reserved_local_subexpr_47, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_49 = ::emboss::support::Sum(emboss_reserved_local_subexpr_43, emboss_reserved_local_subexpr_48); + const auto emboss_reserved_local_subexpr_50 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_49, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_51 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_5, emboss_reserved_local_subexpr_9, emboss_reserved_local_subexpr_14, emboss_reserved_local_subexpr_18, emboss_reserved_local_subexpr_23, emboss_reserved_local_subexpr_27, emboss_reserved_local_subexpr_32, emboss_reserved_local_subexpr_36, emboss_reserved_local_subexpr_41, emboss_reserved_local_subexpr_45, emboss_reserved_local_subexpr_50); + + return emboss_reserved_local_subexpr_51; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericPackedFieldsView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericPackedFieldsView; +}; +using PackedFieldsView = + GenericPackedFieldsView; +using PackedFieldsWriter = + GenericPackedFieldsView; + +template +struct EmbossReservedInternalIsGenericPackedFieldsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericPackedFieldsView< + GenericPackedFieldsView> { + static constexpr const bool value = true; +}; + +template +inline GenericPackedFieldsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakePackedFieldsView( T &&emboss_reserved_local_arg) { + return GenericPackedFieldsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericPackedFieldsView> +MakePackedFieldsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericPackedFieldsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericPackedFieldsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedPackedFieldsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericPackedFieldsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Length { + +} // namespace Length + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericLengthView::length() + const { + + if ( has_length().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLengthView::has_length() const { + return ::emboss::support::Maybe(true); +} + + +namespace Length { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Length + +template +inline constexpr ::std::int32_t +GenericLengthView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Length::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLengthView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Length::IntrinsicSizeInBytes(); +} + +namespace Length { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Length + +template +inline constexpr ::std::int32_t +GenericLengthView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Length::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLengthView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Length::MaxSizeInBytes(); +} + +namespace Length { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Length + +template +inline constexpr ::std::int32_t +GenericLengthView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Length::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLengthView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Length::MinSizeInBytes(); +} +namespace Data { + +} // namespace Data + + +template +inline typename ::emboss::test::GenericLengthView> + + GenericDataView::length() + const { + + if ( has_length().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericLengthView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericLengthView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDataView::has_length() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericDataView::data() + const { + + if ( has_data().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = length().length(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_2; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericDataView::has_data() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericDataView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericDataView::IntrinsicSizeInBytes() const { + return + typename GenericDataView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericDataView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace Data { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(256LL)).ValueOrDefault(); +} +} // namespace Data + +template +inline constexpr ::std::int32_t +GenericDataView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Data::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDataView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Data::MaxSizeInBytes(); +} + +namespace Data { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Data + +template +inline constexpr ::std::int32_t +GenericDataView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Data::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDataView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Data::MinSizeInBytes(); +} +namespace PackedFields { + +} // namespace PackedFields + + +template +inline typename ::emboss::test::GenericLengthView> + + GenericPackedFieldsView::length1() + const { + + if ( has_length1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericLengthView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericLengthView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_length1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericDataView> + + GenericPackedFieldsView::data1() + const { + + if ( has_data1().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = length1().length(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericDataView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericDataView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_data1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericPackedFieldsView::EmbossReservedVirtualO1View +GenericPackedFieldsView::o1() const { + return + typename GenericPackedFieldsView::EmbossReservedVirtualO1View( + *this); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_o1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericLengthView> + + GenericPackedFieldsView::length2() + const { + + if ( has_length2().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o1(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericLengthView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericLengthView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_length2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericDataView> + + GenericPackedFieldsView::data2() + const { + + if ( has_data2().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o1(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = length2().length(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(1LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_5; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericDataView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericDataView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_data2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericPackedFieldsView::EmbossReservedVirtualO2View +GenericPackedFieldsView::o2() const { + return + typename GenericPackedFieldsView::EmbossReservedVirtualO2View( + *this); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_o2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericLengthView> + + GenericPackedFieldsView::length3() + const { + + if ( has_length3().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o2(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericLengthView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericLengthView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_length3() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericDataView> + + GenericPackedFieldsView::data3() + const { + + if ( has_data3().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o2(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = length3().length(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(1LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_5; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericDataView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericDataView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_data3() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericPackedFieldsView::EmbossReservedVirtualO3View +GenericPackedFieldsView::o3() const { + return + typename GenericPackedFieldsView::EmbossReservedVirtualO3View( + *this); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_o3() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericLengthView> + + GenericPackedFieldsView::length4() + const { + + if ( has_length4().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o3(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericLengthView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericLengthView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_length4() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericDataView> + + GenericPackedFieldsView::data4() + const { + + if ( has_data4().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o3(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = length4().length(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(1LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_5; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericDataView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericDataView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_data4() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericPackedFieldsView::EmbossReservedVirtualO4View +GenericPackedFieldsView::o4() const { + return + typename GenericPackedFieldsView::EmbossReservedVirtualO4View( + *this); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_o4() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericLengthView> + + GenericPackedFieldsView::length5() + const { + + if ( has_length5().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o4(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericLengthView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericLengthView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_length5() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericDataView> + + GenericPackedFieldsView::data5() + const { + + if ( has_data5().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o4(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = length5().length(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(1LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_5; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericDataView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericDataView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_data5() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericPackedFieldsView::EmbossReservedVirtualO5View +GenericPackedFieldsView::o5() const { + return + typename GenericPackedFieldsView::EmbossReservedVirtualO5View( + *this); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_o5() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericLengthView> + + GenericPackedFieldsView::length6() + const { + + if ( has_length6().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o5(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericLengthView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericLengthView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_length6() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericDataView> + + GenericPackedFieldsView::data6() + const { + + if ( has_data6().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = o5(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = length6().length(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(1LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_5; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericDataView> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericDataView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_data6() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericPackedFieldsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericPackedFieldsView::IntrinsicSizeInBytes() const { + return + typename GenericPackedFieldsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericPackedFieldsView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace PackedFields { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1536LL)).ValueOrDefault(); +} +} // namespace PackedFields + +template +inline constexpr ::std::int32_t +GenericPackedFieldsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return PackedFields::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericPackedFieldsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return PackedFields::MaxSizeInBytes(); +} + +namespace PackedFields { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(6LL)).ValueOrDefault(); +} +} // namespace PackedFields + +template +inline constexpr ::std::int32_t +GenericPackedFieldsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return PackedFields::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericPackedFieldsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return PackedFields::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_COMPLEX_OFFSET_EMB_H_ + diff --git a/testdata/golden_cpp/complex_structure.emb.h b/testdata/golden_cpp/complex_structure.emb.h new file mode 100644 index 00000000..745976a8 --- /dev/null +++ b/testdata/golden_cpp/complex_structure.emb.h @@ -0,0 +1,4502 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_COMPLEX_STRUCTURE_EMB_H_ +#define TESTDATA_COMPLEX_STRUCTURE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss_test { +namespace RegisterLayout { + +} // namespace RegisterLayout + + +template +class GenericRegisterLayoutView; + +namespace ArrayElement { + +} // namespace ArrayElement + + +template +class GenericArrayElementView; + +namespace Complex { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +class GenericEmbossReservedAnonymousField1View; + + +} // namespace Complex + + +template +class GenericComplexView; + + + + + + + +namespace RegisterLayout { + +} // namespace RegisterLayout + + +template +struct EmbossReservedInternalIsGenericRegisterLayoutView; + +template +class GenericRegisterLayoutView final { + public: + GenericRegisterLayoutView() : backing_() {} + explicit GenericRegisterLayoutView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRegisterLayoutView( + const GenericRegisterLayoutView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRegisterLayoutView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRegisterLayoutView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRegisterLayoutView &operator=( + const GenericRegisterLayoutView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_l().Known()) return false; + if (has_l().ValueOrDefault() && !l().Ok()) return false; + + + if (!has_h().Known()) return false; + if (has_h().ValueOrDefault() && !h().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericRegisterLayoutView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_l().Known()) return false; + if (!emboss_reserved_local_other.has_l().Known()) return false; + + if (emboss_reserved_local_other.has_l().ValueOrDefault() && + !has_l().ValueOrDefault()) + return false; + if (has_l().ValueOrDefault() && + !emboss_reserved_local_other.has_l().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_l().ValueOrDefault() && + has_l().ValueOrDefault() && + !l().Equals(emboss_reserved_local_other.l())) + return false; + + + + if (!has_h().Known()) return false; + if (!emboss_reserved_local_other.has_h().Known()) return false; + + if (emboss_reserved_local_other.has_h().ValueOrDefault() && + !has_h().ValueOrDefault()) + return false; + if (has_h().ValueOrDefault() && + !emboss_reserved_local_other.has_h().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_h().ValueOrDefault() && + has_h().ValueOrDefault() && + !h().Equals(emboss_reserved_local_other.h())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericRegisterLayoutView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_l().ValueOr(false) && + !has_l().ValueOr(false)) + return false; + if (has_l().ValueOr(false) && + !emboss_reserved_local_other.has_l().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_l().ValueOr(false) && + has_l().ValueOr(false) && + !l().UncheckedEquals(emboss_reserved_local_other.l())) + return false; + + + + if (emboss_reserved_local_other.has_h().ValueOr(false) && + !has_h().ValueOr(false)) + return false; + if (has_h().ValueOr(false) && + !emboss_reserved_local_other.has_h().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_h().ValueOr(false) && + has_h().ValueOr(false) && + !h().UncheckedEquals(emboss_reserved_local_other.h())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericRegisterLayoutView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericRegisterLayoutView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericRegisterLayoutView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "l") { + if (!l().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "h") { + if (!h().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_l().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + l().IsAggregate() || l().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("l: "); + l().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !l().IsAggregate() && !l().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("# l: UNREADABLE\n"); + } + } + + if (has_h().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + h().IsAggregate() || h().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("h: "); + h().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !h().IsAggregate() && !h().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("# h: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + l() const; + ::emboss::support::Maybe has_l() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + h() const; + ::emboss::support::Maybe has_h() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRegisterLayoutView; +}; +using RegisterLayoutView = + GenericRegisterLayoutView; +using RegisterLayoutWriter = + GenericRegisterLayoutView; + +template +struct EmbossReservedInternalIsGenericRegisterLayoutView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRegisterLayoutView< + GenericRegisterLayoutView> { + static constexpr const bool value = true; +}; + +template +inline GenericRegisterLayoutView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRegisterLayoutView( T &&emboss_reserved_local_arg) { + return GenericRegisterLayoutView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRegisterLayoutView> +MakeRegisterLayoutView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRegisterLayoutView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRegisterLayoutView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRegisterLayoutView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRegisterLayoutView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace ArrayElement { + +} // namespace ArrayElement + + +template +struct EmbossReservedInternalIsGenericArrayElementView; + +template +class GenericArrayElementView final { + public: + GenericArrayElementView() : backing_() {} + explicit GenericArrayElementView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericArrayElementView( + const GenericArrayElementView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericArrayElementView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericArrayElementView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericArrayElementView &operator=( + const GenericArrayElementView &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_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericArrayElementView 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; + + return true; + } + template + bool UncheckedEquals( + GenericArrayElementView 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; + + return true; + } + template + void UncheckedCopyFrom( + GenericArrayElementView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericArrayElementView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericArrayElementView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss_test::GenericRegisterLayoutView>, 8>> + + a() const; + ::emboss::support::Maybe has_a() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericArrayElementView; +}; +using ArrayElementView = + GenericArrayElementView; +using ArrayElementWriter = + GenericArrayElementView; + +template +struct EmbossReservedInternalIsGenericArrayElementView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericArrayElementView< + GenericArrayElementView> { + static constexpr const bool value = true; +}; + +template +inline GenericArrayElementView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeArrayElementView( T &&emboss_reserved_local_arg) { + return GenericArrayElementView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericArrayElementView> +MakeArrayElementView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericArrayElementView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericArrayElementView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedArrayElementView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericArrayElementView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + + + + + + + + + + + + +namespace Complex { + + + + + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; + +template +class GenericEmbossReservedAnonymousField1View final { + public: + GenericEmbossReservedAnonymousField1View() : backing_() {} + explicit GenericEmbossReservedAnonymousField1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField1View( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField1View &operator=( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_a0().Known()) return false; + if (has_a0().ValueOrDefault() && !a0().Ok()) return false; + + + if (!has_s0().Known()) return false; + if (has_s0().ValueOrDefault() && !s0().Ok()) return false; + + + if (!has_l0().Known()) return false; + if (has_l0().ValueOrDefault() && !l0().Ok()) return false; + + + if (!has_h0().Known()) return false; + if (has_h0().ValueOrDefault() && !h0().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (!has_a0().Known()) return false; + if (!emboss_reserved_local_other.has_a0().Known()) return false; + + if (emboss_reserved_local_other.has_a0().ValueOrDefault() && + !has_a0().ValueOrDefault()) + return false; + if (has_a0().ValueOrDefault() && + !emboss_reserved_local_other.has_a0().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a0().ValueOrDefault() && + has_a0().ValueOrDefault() && + !a0().Equals(emboss_reserved_local_other.a0())) + return false; + + + + if (!has_s0().Known()) return false; + if (!emboss_reserved_local_other.has_s0().Known()) return false; + + if (emboss_reserved_local_other.has_s0().ValueOrDefault() && + !has_s0().ValueOrDefault()) + return false; + if (has_s0().ValueOrDefault() && + !emboss_reserved_local_other.has_s0().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_s0().ValueOrDefault() && + has_s0().ValueOrDefault() && + !s0().Equals(emboss_reserved_local_other.s0())) + return false; + + + + if (!has_l0().Known()) return false; + if (!emboss_reserved_local_other.has_l0().Known()) return false; + + if (emboss_reserved_local_other.has_l0().ValueOrDefault() && + !has_l0().ValueOrDefault()) + return false; + if (has_l0().ValueOrDefault() && + !emboss_reserved_local_other.has_l0().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_l0().ValueOrDefault() && + has_l0().ValueOrDefault() && + !l0().Equals(emboss_reserved_local_other.l0())) + return false; + + + + if (!has_h0().Known()) return false; + if (!emboss_reserved_local_other.has_h0().Known()) return false; + + if (emboss_reserved_local_other.has_h0().ValueOrDefault() && + !has_h0().ValueOrDefault()) + return false; + if (has_h0().ValueOrDefault() && + !emboss_reserved_local_other.has_h0().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_h0().ValueOrDefault() && + has_h0().ValueOrDefault() && + !h0().Equals(emboss_reserved_local_other.h0())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_a0().ValueOr(false) && + !has_a0().ValueOr(false)) + return false; + if (has_a0().ValueOr(false) && + !emboss_reserved_local_other.has_a0().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a0().ValueOr(false) && + has_a0().ValueOr(false) && + !a0().UncheckedEquals(emboss_reserved_local_other.a0())) + return false; + + + + if (emboss_reserved_local_other.has_s0().ValueOr(false) && + !has_s0().ValueOr(false)) + return false; + if (has_s0().ValueOr(false) && + !emboss_reserved_local_other.has_s0().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_s0().ValueOr(false) && + has_s0().ValueOr(false) && + !s0().UncheckedEquals(emboss_reserved_local_other.s0())) + return false; + + + + if (emboss_reserved_local_other.has_l0().ValueOr(false) && + !has_l0().ValueOr(false)) + return false; + if (has_l0().ValueOr(false) && + !emboss_reserved_local_other.has_l0().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_l0().ValueOr(false) && + has_l0().ValueOr(false) && + !l0().UncheckedEquals(emboss_reserved_local_other.l0())) + return false; + + + + if (emboss_reserved_local_other.has_h0().ValueOr(false) && + !has_h0().ValueOr(false)) + return false; + if (has_h0().ValueOr(false) && + !emboss_reserved_local_other.has_h0().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_h0().ValueOr(false) && + has_h0().ValueOr(false) && + !h0().UncheckedEquals(emboss_reserved_local_other.h0())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "a0") { + if (!a0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "s0") { + if (!s0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "l0") { + if (!l0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "h0") { + if (!h0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_a0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a0().IsAggregate() || a0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a0: "); + a0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a0().IsAggregate() && !a0().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("# a0: UNREADABLE\n"); + } + } + + if (has_s0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + s0().IsAggregate() || s0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("s0: "); + s0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !s0().IsAggregate() && !s0().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("# s0: UNREADABLE\n"); + } + } + + if (has_l0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + l0().IsAggregate() || l0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("l0: "); + l0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !l0().IsAggregate() && !l0().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("# l0: UNREADABLE\n"); + } + } + + if (has_h0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + h0().IsAggregate() || h0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("h0: "); + h0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !h0().IsAggregate() && !h0().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("# h0: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + a0() const; + ::emboss::support::Maybe has_a0() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + s0() const; + ::emboss::support::Maybe has_s0() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + l0() const; + ::emboss::support::Maybe has_l0() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + h0() const; + ::emboss::support::Maybe has_h0() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField1View; +}; +using EmbossReservedAnonymousField1View = + GenericEmbossReservedAnonymousField1View; +using EmbossReservedAnonymousField1Writer = + GenericEmbossReservedAnonymousField1View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< + GenericEmbossReservedAnonymousField1View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField1View> +MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace Complex + + +template +struct EmbossReservedInternalIsGenericComplexView; + +template +class GenericComplexView final { + public: + GenericComplexView() : backing_() {} + explicit GenericComplexView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericComplexView( + const GenericComplexView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericComplexView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericComplexView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericComplexView &operator=( + const GenericComplexView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_s().Known()) return false; + if (has_s().ValueOrDefault() && !s().Ok()) return false; + + + if (!has_u().Known()) return false; + if (has_u().ValueOrDefault() && !u().Ok()) return false; + + + if (!has_i().Known()) return false; + if (has_i().ValueOrDefault() && !i().Ok()) return false; + + + if (!has_b().Known()) return false; + if (has_b().ValueOrDefault() && !b().Ok()) return false; + + + if (!has_a().Known()) return false; + if (has_a().ValueOrDefault() && !a().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_a0().Known()) return false; + if (has_a0().ValueOrDefault() && !a0().Ok()) return false; + + + if (!has_s0().Known()) return false; + if (has_s0().ValueOrDefault() && !s0().Ok()) return false; + + + if (!has_l0().Known()) return false; + if (has_l0().ValueOrDefault() && !l0().Ok()) return false; + + + if (!has_h0().Known()) return false; + if (has_h0().ValueOrDefault() && !h0().Ok()) return false; + + + if (!has_e1().Known()) return false; + if (has_e1().ValueOrDefault() && !e1().Ok()) return false; + + + if (!has_e2().Known()) return false; + if (has_e2().ValueOrDefault() && !e2().Ok()) return false; + + + if (!has_b2().Known()) return false; + if (has_b2().ValueOrDefault() && !b2().Ok()) return false; + + + if (!has_e3().Known()) return false; + if (has_e3().ValueOrDefault() && !e3().Ok()) return false; + + + if (!has_e4().Known()) return false; + if (has_e4().ValueOrDefault() && !e4().Ok()) return false; + + + if (!has_e5().Known()) return false; + if (has_e5().ValueOrDefault() && !e5().Ok()) return false; + + + if (!has_e0().Known()) return false; + if (has_e0().ValueOrDefault() && !e0().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericComplexView emboss_reserved_local_other) const { + + if (!has_s().Known()) return false; + if (!emboss_reserved_local_other.has_s().Known()) return false; + + if (emboss_reserved_local_other.has_s().ValueOrDefault() && + !has_s().ValueOrDefault()) + return false; + if (has_s().ValueOrDefault() && + !emboss_reserved_local_other.has_s().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_s().ValueOrDefault() && + has_s().ValueOrDefault() && + !s().Equals(emboss_reserved_local_other.s())) + return false; + + + + if (!has_u().Known()) return false; + if (!emboss_reserved_local_other.has_u().Known()) return false; + + if (emboss_reserved_local_other.has_u().ValueOrDefault() && + !has_u().ValueOrDefault()) + return false; + if (has_u().ValueOrDefault() && + !emboss_reserved_local_other.has_u().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_u().ValueOrDefault() && + has_u().ValueOrDefault() && + !u().Equals(emboss_reserved_local_other.u())) + return false; + + + + if (!has_i().Known()) return false; + if (!emboss_reserved_local_other.has_i().Known()) return false; + + if (emboss_reserved_local_other.has_i().ValueOrDefault() && + !has_i().ValueOrDefault()) + return false; + if (has_i().ValueOrDefault() && + !emboss_reserved_local_other.has_i().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_i().ValueOrDefault() && + has_i().ValueOrDefault() && + !i().Equals(emboss_reserved_local_other.i())) + 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_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_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_e1().Known()) return false; + if (!emboss_reserved_local_other.has_e1().Known()) return false; + + if (emboss_reserved_local_other.has_e1().ValueOrDefault() && + !has_e1().ValueOrDefault()) + return false; + if (has_e1().ValueOrDefault() && + !emboss_reserved_local_other.has_e1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_e1().ValueOrDefault() && + has_e1().ValueOrDefault() && + !e1().Equals(emboss_reserved_local_other.e1())) + return false; + + + + if (!has_e2().Known()) return false; + if (!emboss_reserved_local_other.has_e2().Known()) return false; + + if (emboss_reserved_local_other.has_e2().ValueOrDefault() && + !has_e2().ValueOrDefault()) + return false; + if (has_e2().ValueOrDefault() && + !emboss_reserved_local_other.has_e2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_e2().ValueOrDefault() && + has_e2().ValueOrDefault() && + !e2().Equals(emboss_reserved_local_other.e2())) + return false; + + + + if (!has_b2().Known()) return false; + if (!emboss_reserved_local_other.has_b2().Known()) return false; + + if (emboss_reserved_local_other.has_b2().ValueOrDefault() && + !has_b2().ValueOrDefault()) + return false; + if (has_b2().ValueOrDefault() && + !emboss_reserved_local_other.has_b2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_b2().ValueOrDefault() && + has_b2().ValueOrDefault() && + !b2().Equals(emboss_reserved_local_other.b2())) + return false; + + + + if (!has_e3().Known()) return false; + if (!emboss_reserved_local_other.has_e3().Known()) return false; + + if (emboss_reserved_local_other.has_e3().ValueOrDefault() && + !has_e3().ValueOrDefault()) + return false; + if (has_e3().ValueOrDefault() && + !emboss_reserved_local_other.has_e3().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_e3().ValueOrDefault() && + has_e3().ValueOrDefault() && + !e3().Equals(emboss_reserved_local_other.e3())) + return false; + + + + if (!has_e4().Known()) return false; + if (!emboss_reserved_local_other.has_e4().Known()) return false; + + if (emboss_reserved_local_other.has_e4().ValueOrDefault() && + !has_e4().ValueOrDefault()) + return false; + if (has_e4().ValueOrDefault() && + !emboss_reserved_local_other.has_e4().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_e4().ValueOrDefault() && + has_e4().ValueOrDefault() && + !e4().Equals(emboss_reserved_local_other.e4())) + return false; + + + + if (!has_e5().Known()) return false; + if (!emboss_reserved_local_other.has_e5().Known()) return false; + + if (emboss_reserved_local_other.has_e5().ValueOrDefault() && + !has_e5().ValueOrDefault()) + return false; + if (has_e5().ValueOrDefault() && + !emboss_reserved_local_other.has_e5().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_e5().ValueOrDefault() && + has_e5().ValueOrDefault() && + !e5().Equals(emboss_reserved_local_other.e5())) + return false; + + + + if (!has_e0().Known()) return false; + if (!emboss_reserved_local_other.has_e0().Known()) return false; + + if (emboss_reserved_local_other.has_e0().ValueOrDefault() && + !has_e0().ValueOrDefault()) + return false; + if (has_e0().ValueOrDefault() && + !emboss_reserved_local_other.has_e0().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_e0().ValueOrDefault() && + has_e0().ValueOrDefault() && + !e0().Equals(emboss_reserved_local_other.e0())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericComplexView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_s().ValueOr(false) && + !has_s().ValueOr(false)) + return false; + if (has_s().ValueOr(false) && + !emboss_reserved_local_other.has_s().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_s().ValueOr(false) && + has_s().ValueOr(false) && + !s().UncheckedEquals(emboss_reserved_local_other.s())) + return false; + + + + if (emboss_reserved_local_other.has_u().ValueOr(false) && + !has_u().ValueOr(false)) + return false; + if (has_u().ValueOr(false) && + !emboss_reserved_local_other.has_u().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_u().ValueOr(false) && + has_u().ValueOr(false) && + !u().UncheckedEquals(emboss_reserved_local_other.u())) + return false; + + + + if (emboss_reserved_local_other.has_i().ValueOr(false) && + !has_i().ValueOr(false)) + return false; + if (has_i().ValueOr(false) && + !emboss_reserved_local_other.has_i().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_i().ValueOr(false) && + has_i().ValueOr(false) && + !i().UncheckedEquals(emboss_reserved_local_other.i())) + 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_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_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_e1().ValueOr(false) && + !has_e1().ValueOr(false)) + return false; + if (has_e1().ValueOr(false) && + !emboss_reserved_local_other.has_e1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_e1().ValueOr(false) && + has_e1().ValueOr(false) && + !e1().UncheckedEquals(emboss_reserved_local_other.e1())) + return false; + + + + if (emboss_reserved_local_other.has_e2().ValueOr(false) && + !has_e2().ValueOr(false)) + return false; + if (has_e2().ValueOr(false) && + !emboss_reserved_local_other.has_e2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_e2().ValueOr(false) && + has_e2().ValueOr(false) && + !e2().UncheckedEquals(emboss_reserved_local_other.e2())) + return false; + + + + if (emboss_reserved_local_other.has_b2().ValueOr(false) && + !has_b2().ValueOr(false)) + return false; + if (has_b2().ValueOr(false) && + !emboss_reserved_local_other.has_b2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_b2().ValueOr(false) && + has_b2().ValueOr(false) && + !b2().UncheckedEquals(emboss_reserved_local_other.b2())) + return false; + + + + if (emboss_reserved_local_other.has_e3().ValueOr(false) && + !has_e3().ValueOr(false)) + return false; + if (has_e3().ValueOr(false) && + !emboss_reserved_local_other.has_e3().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_e3().ValueOr(false) && + has_e3().ValueOr(false) && + !e3().UncheckedEquals(emboss_reserved_local_other.e3())) + return false; + + + + if (emboss_reserved_local_other.has_e4().ValueOr(false) && + !has_e4().ValueOr(false)) + return false; + if (has_e4().ValueOr(false) && + !emboss_reserved_local_other.has_e4().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_e4().ValueOr(false) && + has_e4().ValueOr(false) && + !e4().UncheckedEquals(emboss_reserved_local_other.e4())) + return false; + + + + if (emboss_reserved_local_other.has_e5().ValueOr(false) && + !has_e5().ValueOr(false)) + return false; + if (has_e5().ValueOr(false) && + !emboss_reserved_local_other.has_e5().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_e5().ValueOr(false) && + has_e5().ValueOr(false) && + !e5().UncheckedEquals(emboss_reserved_local_other.e5())) + return false; + + + + if (emboss_reserved_local_other.has_e0().ValueOr(false) && + !has_e0().ValueOr(false)) + return false; + if (has_e0().ValueOr(false) && + !emboss_reserved_local_other.has_e0().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_e0().ValueOr(false) && + has_e0().ValueOr(false) && + !e0().UncheckedEquals(emboss_reserved_local_other.e0())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericComplexView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericComplexView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericComplexView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "s") { + if (!s().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "u") { + if (!u().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "i") { + if (!i().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 == "a") { + if (!a().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "a0") { + if (!a0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "s0") { + if (!s0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "l0") { + if (!l0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "h0") { + if (!h0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "e1") { + if (!e1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "e2") { + if (!e2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "b2") { + if (!b2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "e3") { + if (!e3().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "e4") { + if (!e4().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "e5") { + if (!e5().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "e0") { + if (!e0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_s().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + s().IsAggregate() || s().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("s: "); + s().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !s().IsAggregate() && !s().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("# s: UNREADABLE\n"); + } + } + + if (has_u().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + u().IsAggregate() || u().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("u: "); + u().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !u().IsAggregate() && !u().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("# u: UNREADABLE\n"); + } + } + + if (has_i().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + i().IsAggregate() || i().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("i: "); + i().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !i().IsAggregate() && !i().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("# i: UNREADABLE\n"); + } + } + + if (has_b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b().IsAggregate() || b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_a().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a().IsAggregate() || a().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_a0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a0().IsAggregate() || a0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a0: "); + a0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a0().IsAggregate() && !a0().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("# a0: UNREADABLE\n"); + } + } + + if (has_s0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + s0().IsAggregate() || s0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("s0: "); + s0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !s0().IsAggregate() && !s0().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("# s0: UNREADABLE\n"); + } + } + + if (has_l0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + l0().IsAggregate() || l0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("l0: "); + l0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !l0().IsAggregate() && !l0().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("# l0: UNREADABLE\n"); + } + } + + if (has_h0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + h0().IsAggregate() || h0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("h0: "); + h0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !h0().IsAggregate() && !h0().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("# h0: UNREADABLE\n"); + } + } + + if (has_e1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + e1().IsAggregate() || e1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("e1: "); + e1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !e1().IsAggregate() && !e1().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("# e1: UNREADABLE\n"); + } + } + + if (has_e2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + e2().IsAggregate() || e2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("e2: "); + e2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !e2().IsAggregate() && !e2().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("# e2: UNREADABLE\n"); + } + } + + if (has_b2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b2().IsAggregate() || b2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("b2: "); + b2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !b2().IsAggregate() && !b2().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("# b2: UNREADABLE\n"); + } + } + + if (has_e3().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + e3().IsAggregate() || e3().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("e3: "); + e3().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !e3().IsAggregate() && !e3().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("# e3: UNREADABLE\n"); + } + } + + if (has_e4().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + e4().IsAggregate() || e4().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("e4: "); + e4().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !e4().IsAggregate() && !e4().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("# e4: UNREADABLE\n"); + } + } + + if (has_e5().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + e5().IsAggregate() || e5().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("e5: "); + e5().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !e5().IsAggregate() && !e5().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("# e5: UNREADABLE\n"); + } + } + + if (has_e0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + e0().IsAggregate() || e0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("e0: "); + e0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !e0().IsAggregate() && !e0().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("# e0: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + s() const; + ::emboss::support::Maybe has_s() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + u() const; + ::emboss::support::Maybe has_u() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + i() const; + ::emboss::support::Maybe has_i() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss_test::GenericArrayElementView::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType::template OffsetStorageType, 1, + 8 > + +, typename Storage::template OffsetStorageType, 4, + 8 > + + a() const; + ::emboss::support::Maybe has_a() const; + + private: + typename ::emboss_test::Complex::GenericEmbossReservedAnonymousField1View>, 8>> + + emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + + public: + auto a0() const -> decltype(this->emboss_reserved_anonymous_field_1().a0()) { + return has_a0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().a0() + : decltype(this->emboss_reserved_anonymous_field_1().a0())(); + } + ::emboss::support::Maybe has_a0() const; + + public: + auto s0() const -> decltype(this->emboss_reserved_anonymous_field_1().s0()) { + return has_s0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().s0() + : decltype(this->emboss_reserved_anonymous_field_1().s0())(); + } + ::emboss::support::Maybe has_s0() const; + + public: + auto l0() const -> decltype(this->emboss_reserved_anonymous_field_1().l0()) { + return has_l0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().l0() + : decltype(this->emboss_reserved_anonymous_field_1().l0())(); + } + ::emboss::support::Maybe has_l0() const; + + public: + auto h0() const -> decltype(this->emboss_reserved_anonymous_field_1().h0()) { + return has_h0().ValueOrDefault() ? emboss_reserved_anonymous_field_1().h0() + : decltype(this->emboss_reserved_anonymous_field_1().h0())(); + } + ::emboss::support::Maybe has_h0() const; + + public: + typename ::emboss_test::GenericArrayElementView> + + e1() const; + ::emboss::support::Maybe has_e1() const; + + public: + typename ::emboss_test::GenericArrayElementView> + + e2() const; + ::emboss::support::Maybe has_e2() const; + + public: + typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b2() const; + ::emboss::support::Maybe has_b2() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + e3() const; + ::emboss::support::Maybe has_e3() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + e4() const; + ::emboss::support::Maybe has_e4() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + e5() const; + ::emboss::support::Maybe has_e5() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + e0() const; + ::emboss::support::Maybe has_e0() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericComplexView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.s(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_3); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = view_.a0(); + const auto emboss_reserved_local_subexpr_7 = (emboss_reserved_local_subexpr_6.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_6.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(128LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Choice(emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(4LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(128LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Choice(emboss_reserved_local_subexpr_10, ::emboss::support::Maybe(static_cast(4LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_12 = view_.b2(); + const auto emboss_reserved_local_subexpr_13 = (emboss_reserved_local_subexpr_12.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_12.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_14 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_13, ::emboss::support::Maybe(static_cast(25LL))); + const auto emboss_reserved_local_subexpr_15 = ::emboss::support::Choice(emboss_reserved_local_subexpr_14, ::emboss::support::Maybe(static_cast(5LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_16 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_17 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(80LL))); + const auto emboss_reserved_local_subexpr_18 = view_.e3(); + const auto emboss_reserved_local_subexpr_19 = (emboss_reserved_local_subexpr_18.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_18.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_20 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_19, ::emboss::support::Maybe(static_cast(128LL))); + const auto emboss_reserved_local_subexpr_21 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_13, ::emboss::support::Maybe(static_cast(50LL))); + const auto emboss_reserved_local_subexpr_22 = ::emboss::support::Choice(emboss_reserved_local_subexpr_17, emboss_reserved_local_subexpr_20, emboss_reserved_local_subexpr_21); + const auto emboss_reserved_local_subexpr_23 = ::emboss::support::And(emboss_reserved_local_subexpr_16, emboss_reserved_local_subexpr_22); + const auto emboss_reserved_local_subexpr_24 = ::emboss::support::Choice(emboss_reserved_local_subexpr_23, ::emboss::support::Maybe(static_cast(6LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_25 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_26 = view_.e4(); + const auto emboss_reserved_local_subexpr_27 = (emboss_reserved_local_subexpr_26.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_26.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_28 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_27, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_29 = ::emboss::support::And(emboss_reserved_local_subexpr_25, emboss_reserved_local_subexpr_28); + const auto emboss_reserved_local_subexpr_30 = ::emboss::support::Choice(emboss_reserved_local_subexpr_29, ::emboss::support::Maybe(static_cast(7LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_31 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + const auto emboss_reserved_local_subexpr_32 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_33 = ::emboss::support::Or(emboss_reserved_local_subexpr_31, emboss_reserved_local_subexpr_32); + const auto emboss_reserved_local_subexpr_34 = ::emboss::support::Choice(emboss_reserved_local_subexpr_33, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_35 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(9LL)), ::emboss::support::Maybe(static_cast(9LL)), ::emboss::support::Maybe(static_cast(9LL)), emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_9, emboss_reserved_local_subexpr_11, emboss_reserved_local_subexpr_15, emboss_reserved_local_subexpr_24, emboss_reserved_local_subexpr_30, emboss_reserved_local_subexpr_34); + + return emboss_reserved_local_subexpr_35; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericComplexView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericComplexView; +}; +using ComplexView = + GenericComplexView; +using ComplexWriter = + GenericComplexView; + +template +struct EmbossReservedInternalIsGenericComplexView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericComplexView< + GenericComplexView> { + static constexpr const bool value = true; +}; + +template +inline GenericComplexView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeComplexView( T &&emboss_reserved_local_arg) { + return GenericComplexView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericComplexView> +MakeComplexView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericComplexView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericComplexView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedComplexView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericComplexView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace RegisterLayout { + +} // namespace RegisterLayout + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericRegisterLayoutView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRegisterLayoutView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericRegisterLayoutView::l() + const { + + if ( has_l().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRegisterLayoutView::has_l() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericRegisterLayoutView::h() + const { + + if ( has_h().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRegisterLayoutView::has_h() const { + return ::emboss::support::Maybe(true); +} + + +namespace RegisterLayout { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace RegisterLayout + +template +inline constexpr ::std::int32_t +GenericRegisterLayoutView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return RegisterLayout::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericRegisterLayoutView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return RegisterLayout::IntrinsicSizeInBits(); +} + +namespace RegisterLayout { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace RegisterLayout + +template +inline constexpr ::std::int32_t +GenericRegisterLayoutView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return RegisterLayout::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericRegisterLayoutView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return RegisterLayout::MaxSizeInBits(); +} + +namespace RegisterLayout { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace RegisterLayout + +template +inline constexpr ::std::int32_t +GenericRegisterLayoutView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return RegisterLayout::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericRegisterLayoutView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return RegisterLayout::MinSizeInBits(); +} +namespace ArrayElement { + +} // namespace ArrayElement + + +template +inline typename ::emboss_test::GenericRegisterLayoutView>, 8>> + + GenericArrayElementView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss_test::GenericRegisterLayoutView>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss_test::GenericRegisterLayoutView>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericArrayElementView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +namespace ArrayElement { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ArrayElement + +template +inline constexpr ::std::int32_t +GenericArrayElementView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ArrayElement::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArrayElementView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ArrayElement::IntrinsicSizeInBytes(); +} + +namespace ArrayElement { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ArrayElement + +template +inline constexpr ::std::int32_t +GenericArrayElementView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ArrayElement::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArrayElementView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ArrayElement::MaxSizeInBytes(); +} + +namespace ArrayElement { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ArrayElement + +template +inline constexpr ::std::int32_t +GenericArrayElementView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ArrayElement::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArrayElementView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ArrayElement::MinSizeInBytes(); +} +namespace Complex { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::a0() + const { + + if ( has_a0().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_a0() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::s0() + const { + + if ( has_s0().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(7LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 7>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_s0() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::l0() + const { + + if ( has_l0().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_l0() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::h0() + const { + + if ( has_h0().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_h0() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +} // namespace Complex + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericComplexView::s() + const { + + if ( has_s().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_s() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericComplexView::u() + const { + + if ( has_u().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_u() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericComplexView::i() + const { + + if ( has_i().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_i() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericComplexView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss_test::GenericArrayElementView::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType::template OffsetStorageType, 1, + 8 > + +, typename Storage::template OffsetStorageType, 4, + 8 > + + GenericComplexView::a() + const { + + if ( has_a().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = s(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss_test::GenericArrayElementView::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType::template OffsetStorageType, 1, + 8 > + +, typename Storage::template OffsetStorageType, 4, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss_test::GenericArrayElementView::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType::template OffsetStorageType, 1, + 8 > + +, typename Storage::template OffsetStorageType, 4, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss_test::Complex::GenericEmbossReservedAnonymousField1View>, 8>> + + GenericComplexView::emboss_reserved_anonymous_field_1() + const { + + if ( has_emboss_reserved_anonymous_field_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss_test::Complex::GenericEmbossReservedAnonymousField1View>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss_test::Complex::GenericEmbossReservedAnonymousField1View>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_emboss_reserved_anonymous_field_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericComplexView::has_a0() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericComplexView::has_s0() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericComplexView::has_l0() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericComplexView::has_h0() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline typename ::emboss_test::GenericArrayElementView> + + GenericComplexView::e1() + const { + + if ( has_e1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss_test::GenericArrayElementView> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss_test::GenericArrayElementView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_e1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss_test::GenericArrayElementView> + + GenericComplexView::e2() + const { + + if ( has_e2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss_test::GenericArrayElementView> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss_test::GenericArrayElementView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_e2() const { + return ::emboss::support::GreaterThanOrEqual((a0().Ok() ? ::emboss::support::Maybe(static_cast(a0().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))); +} + + +template +inline typename ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericComplexView::b2() + const { + + if ( has_b2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::BcdView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_b2() const { + return ::emboss::support::LessThan((a0().Ok() ? ::emboss::support::Maybe(static_cast(a0().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericComplexView::e3() + const { + + if ( has_e3().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_e3() const { + return ::emboss::support::GreaterThan((b2().Ok() ? ::emboss::support::Maybe(static_cast(b2().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(25LL))); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericComplexView::e4() + const { + + if ( has_e4().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(5LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 5>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_e4() const { + return ::emboss::support::And(::emboss::support::GreaterThanOrEqual((s().Ok() ? ::emboss::support::Maybe(static_cast(s().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(4LL))), ::emboss::support::Choice(::emboss::support::GreaterThanOrEqual((a0().Ok() ? ::emboss::support::Maybe(static_cast(a0().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(80LL))), ::emboss::support::GreaterThanOrEqual((e3().Ok() ? ::emboss::support::Maybe(static_cast(e3().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(128LL))), ::emboss::support::LessThan((b2().Ok() ? ::emboss::support::Maybe(static_cast(b2().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(50LL))))); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericComplexView::e5() + const { + + if ( has_e5().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_e5() const { + return ::emboss::support::And(::emboss::support::GreaterThanOrEqual((s().Ok() ? ::emboss::support::Maybe(static_cast(s().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::GreaterThan((e4().Ok() ? ::emboss::support::Maybe(static_cast(e4().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL)))); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericComplexView::e0() + const { + + if ( has_e0().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_e0() const { + return ::emboss::support::Or(::emboss::support::LessThan((s().Ok() ? ::emboss::support::Maybe(static_cast(s().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2LL))), ::emboss::support::LessThan((a0().Ok() ? ::emboss::support::Maybe(static_cast(a0().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(4LL)))); +} + + +template +inline typename GenericComplexView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericComplexView::IntrinsicSizeInBytes() const { + return + typename GenericComplexView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericComplexView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace Complex { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1021LL)).ValueOrDefault(); +} +} // namespace Complex + +template +inline constexpr ::std::int32_t +GenericComplexView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Complex::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericComplexView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Complex::MaxSizeInBytes(); +} + +namespace Complex { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(9LL)).ValueOrDefault(); +} +} // namespace Complex + +template +inline constexpr ::std::int32_t +GenericComplexView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Complex::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericComplexView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Complex::MinSizeInBytes(); +} + + + +} // namespace emboss_test + + + +/* NOLINTEND */ + +#endif // TESTDATA_COMPLEX_STRUCTURE_EMB_H_ + diff --git a/testdata/golden_cpp/condition.emb.h b/testdata/golden_cpp/condition.emb.h new file mode 100644 index 00000000..9d11fb7c --- /dev/null +++ b/testdata/golden_cpp/condition.emb.h @@ -0,0 +1,24727 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_CONDITION_EMB_H_ +#define TESTDATA_CONDITION_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace BasicConditional { + +} // namespace BasicConditional + + +template +class GenericBasicConditionalView; + +namespace NegativeConditional { + +} // namespace NegativeConditional + + +template +class GenericNegativeConditionalView; + +namespace ConditionalAndUnconditionalOverlappingFinalField { + +} // namespace ConditionalAndUnconditionalOverlappingFinalField + + +template +class GenericConditionalAndUnconditionalOverlappingFinalFieldView; + +namespace ConditionalBasicConditionalFieldFirst { + +} // namespace ConditionalBasicConditionalFieldFirst + + +template +class GenericConditionalBasicConditionalFieldFirstView; + +namespace ConditionalAndDynamicLocation { + +} // namespace ConditionalAndDynamicLocation + + +template +class GenericConditionalAndDynamicLocationView; + +namespace ConditionUsesMinInt { + +} // namespace ConditionUsesMinInt + + +template +class GenericConditionUsesMinIntView; + +namespace NestedConditional { + +} // namespace NestedConditional + + +template +class GenericNestedConditionalView; + +namespace CorrectNestedConditional { + +} // namespace CorrectNestedConditional + + +template +class GenericCorrectNestedConditionalView; + +namespace AlwaysFalseCondition { + +} // namespace AlwaysFalseCondition + + +template +class GenericAlwaysFalseConditionView; + +namespace OnlyAlwaysFalseCondition { + +} // namespace OnlyAlwaysFalseCondition + + +template +class GenericOnlyAlwaysFalseConditionView; + +namespace EmptyStruct { + +} // namespace EmptyStruct + + +template +class GenericEmptyStructView; + +namespace AlwaysFalseConditionDynamicSize { + +} // namespace AlwaysFalseConditionDynamicSize + + +template +class GenericAlwaysFalseConditionDynamicSizeView; + +namespace ConditionDoesNotContributeToSize { + +} // namespace ConditionDoesNotContributeToSize + + +template +class GenericConditionDoesNotContributeToSizeView; + +enum class OnOff : ::std::uint64_t; + +namespace EnumCondition { + +} // namespace EnumCondition + + +template +class GenericEnumConditionView; + +namespace NegativeEnumCondition { + +} // namespace NegativeEnumCondition + + +template +class GenericNegativeEnumConditionView; + +namespace LessThanCondition { + +} // namespace LessThanCondition + + +template +class GenericLessThanConditionView; + +namespace LessThanOrEqualCondition { + +} // namespace LessThanOrEqualCondition + + +template +class GenericLessThanOrEqualConditionView; + +namespace GreaterThanOrEqualCondition { + +} // namespace GreaterThanOrEqualCondition + + +template +class GenericGreaterThanOrEqualConditionView; + +namespace GreaterThanCondition { + +} // namespace GreaterThanCondition + + +template +class GenericGreaterThanConditionView; + +namespace RangeCondition { + +} // namespace RangeCondition + + +template +class GenericRangeConditionView; + +namespace ReverseRangeCondition { + +} // namespace ReverseRangeCondition + + +template +class GenericReverseRangeConditionView; + +namespace AndCondition { + +} // namespace AndCondition + + +template +class GenericAndConditionView; + +namespace OrCondition { + +} // namespace OrCondition + + +template +class GenericOrConditionView; + +namespace ChoiceCondition { +enum class Field : ::std::uint64_t; + + +} // namespace ChoiceCondition + + +template +class GenericChoiceConditionView; + +namespace ContainsBits { +namespace EmbossReservedAnonymousField3 { + +} // namespace EmbossReservedAnonymousField3 + + +template +class GenericEmbossReservedAnonymousField3View; + + +} // namespace ContainsBits + + +template +class GenericContainsBitsView; + +namespace ContainsContainsBits { + +} // namespace ContainsContainsBits + + +template +class GenericContainsContainsBitsView; + +namespace ConditionalInline { +namespace Type0 { + +} // namespace Type0 + + +template +class GenericType0View; + + +namespace Type1 { + +} // namespace Type1 + + +template +class GenericType1View; + + +} // namespace ConditionalInline + + +template +class GenericConditionalInlineView; + +namespace ConditionalAnonymous { +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +class GenericEmbossReservedAnonymousField2View; + + +} // namespace ConditionalAnonymous + + +template +class GenericConditionalAnonymousView; + +namespace ConditionalOnFlag { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +class GenericEmbossReservedAnonymousField1View; + + +} // namespace ConditionalOnFlag + + +template +class GenericConditionalOnFlagView; + + + + + + +namespace BasicConditional { + +} // namespace BasicConditional + + +template +struct EmbossReservedInternalIsGenericBasicConditionalView; + +template +class GenericBasicConditionalView final { + public: + GenericBasicConditionalView() : backing_() {} + explicit GenericBasicConditionalView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBasicConditionalView( + const GenericBasicConditionalView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBasicConditionalView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBasicConditionalView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBasicConditionalView &operator=( + const GenericBasicConditionalView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericBasicConditionalView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericBasicConditionalView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericBasicConditionalView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBasicConditionalView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBasicConditionalView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericBasicConditionalView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericBasicConditionalView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBasicConditionalView; +}; +using BasicConditionalView = + GenericBasicConditionalView; +using BasicConditionalWriter = + GenericBasicConditionalView; + +template +struct EmbossReservedInternalIsGenericBasicConditionalView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBasicConditionalView< + GenericBasicConditionalView> { + static constexpr const bool value = true; +}; + +template +inline GenericBasicConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBasicConditionalView( T &&emboss_reserved_local_arg) { + return GenericBasicConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBasicConditionalView> +MakeBasicConditionalView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBasicConditionalView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBasicConditionalView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBasicConditionalView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBasicConditionalView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace NegativeConditional { + +} // namespace NegativeConditional + + +template +struct EmbossReservedInternalIsGenericNegativeConditionalView; + +template +class GenericNegativeConditionalView final { + public: + GenericNegativeConditionalView() : backing_() {} + explicit GenericNegativeConditionalView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericNegativeConditionalView( + const GenericNegativeConditionalView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericNegativeConditionalView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericNegativeConditionalView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericNegativeConditionalView &operator=( + const GenericNegativeConditionalView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericNegativeConditionalView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericNegativeConditionalView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericNegativeConditionalView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericNegativeConditionalView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericNegativeConditionalView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericNegativeConditionalView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericNegativeConditionalView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericNegativeConditionalView; +}; +using NegativeConditionalView = + GenericNegativeConditionalView; +using NegativeConditionalWriter = + GenericNegativeConditionalView; + +template +struct EmbossReservedInternalIsGenericNegativeConditionalView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericNegativeConditionalView< + GenericNegativeConditionalView> { + static constexpr const bool value = true; +}; + +template +inline GenericNegativeConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeNegativeConditionalView( T &&emboss_reserved_local_arg) { + return GenericNegativeConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericNegativeConditionalView> +MakeNegativeConditionalView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNegativeConditionalView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericNegativeConditionalView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedNegativeConditionalView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNegativeConditionalView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace ConditionalAndUnconditionalOverlappingFinalField { + +} // namespace ConditionalAndUnconditionalOverlappingFinalField + + +template +struct EmbossReservedInternalIsGenericConditionalAndUnconditionalOverlappingFinalFieldView; + +template +class GenericConditionalAndUnconditionalOverlappingFinalFieldView final { + public: + GenericConditionalAndUnconditionalOverlappingFinalFieldView() : backing_() {} + explicit GenericConditionalAndUnconditionalOverlappingFinalFieldView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConditionalAndUnconditionalOverlappingFinalFieldView( + const GenericConditionalAndUnconditionalOverlappingFinalFieldView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConditionalAndUnconditionalOverlappingFinalFieldView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConditionalAndUnconditionalOverlappingFinalFieldView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConditionalAndUnconditionalOverlappingFinalFieldView &operator=( + const GenericConditionalAndUnconditionalOverlappingFinalFieldView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + + if (!has_z().Known()) return false; + if (has_z().ValueOrDefault() && !z().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + + + if (!has_z().Known()) return false; + if (!emboss_reserved_local_other.has_z().Known()) return false; + + if (emboss_reserved_local_other.has_z().ValueOrDefault() && + !has_z().ValueOrDefault()) + return false; + if (has_z().ValueOrDefault() && + !emboss_reserved_local_other.has_z().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_z().ValueOrDefault() && + has_z().ValueOrDefault() && + !z().Equals(emboss_reserved_local_other.z())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + + + if (emboss_reserved_local_other.has_z().ValueOr(false) && + !has_z().ValueOr(false)) + return false; + if (has_z().ValueOr(false) && + !emboss_reserved_local_other.has_z().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_z().ValueOr(false) && + has_z().ValueOr(false) && + !z().UncheckedEquals(emboss_reserved_local_other.z())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConditionalAndUnconditionalOverlappingFinalFieldView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "z") { + if (!z().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + if (has_z().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + z().IsAggregate() || z().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("z: "); + z().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !z().IsAggregate() && !z().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("# z: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + z() const; + ::emboss::support::Maybe has_z() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConditionalAndUnconditionalOverlappingFinalFieldView; +}; +using ConditionalAndUnconditionalOverlappingFinalFieldView = + GenericConditionalAndUnconditionalOverlappingFinalFieldView; +using ConditionalAndUnconditionalOverlappingFinalFieldWriter = + GenericConditionalAndUnconditionalOverlappingFinalFieldView; + +template +struct EmbossReservedInternalIsGenericConditionalAndUnconditionalOverlappingFinalFieldView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConditionalAndUnconditionalOverlappingFinalFieldView< + GenericConditionalAndUnconditionalOverlappingFinalFieldView> { + static constexpr const bool value = true; +}; + +template +inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConditionalAndUnconditionalOverlappingFinalFieldView( T &&emboss_reserved_local_arg) { + return GenericConditionalAndUnconditionalOverlappingFinalFieldView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConditionalAndUnconditionalOverlappingFinalFieldView> +MakeConditionalAndUnconditionalOverlappingFinalFieldView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalAndUnconditionalOverlappingFinalFieldView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConditionalAndUnconditionalOverlappingFinalFieldView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConditionalAndUnconditionalOverlappingFinalFieldView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalAndUnconditionalOverlappingFinalFieldView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace ConditionalBasicConditionalFieldFirst { + +} // namespace ConditionalBasicConditionalFieldFirst + + +template +struct EmbossReservedInternalIsGenericConditionalBasicConditionalFieldFirstView; + +template +class GenericConditionalBasicConditionalFieldFirstView final { + public: + GenericConditionalBasicConditionalFieldFirstView() : backing_() {} + explicit GenericConditionalBasicConditionalFieldFirstView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConditionalBasicConditionalFieldFirstView( + const GenericConditionalBasicConditionalFieldFirstView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConditionalBasicConditionalFieldFirstView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConditionalBasicConditionalFieldFirstView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConditionalBasicConditionalFieldFirstView &operator=( + const GenericConditionalBasicConditionalFieldFirstView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConditionalBasicConditionalFieldFirstView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConditionalBasicConditionalFieldFirstView; +}; +using ConditionalBasicConditionalFieldFirstView = + GenericConditionalBasicConditionalFieldFirstView; +using ConditionalBasicConditionalFieldFirstWriter = + GenericConditionalBasicConditionalFieldFirstView; + +template +struct EmbossReservedInternalIsGenericConditionalBasicConditionalFieldFirstView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConditionalBasicConditionalFieldFirstView< + GenericConditionalBasicConditionalFieldFirstView> { + static constexpr const bool value = true; +}; + +template +inline GenericConditionalBasicConditionalFieldFirstView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConditionalBasicConditionalFieldFirstView( T &&emboss_reserved_local_arg) { + return GenericConditionalBasicConditionalFieldFirstView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConditionalBasicConditionalFieldFirstView> +MakeConditionalBasicConditionalFieldFirstView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalBasicConditionalFieldFirstView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConditionalBasicConditionalFieldFirstView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConditionalBasicConditionalFieldFirstView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalBasicConditionalFieldFirstView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace ConditionalAndDynamicLocation { + +} // namespace ConditionalAndDynamicLocation + + +template +struct EmbossReservedInternalIsGenericConditionalAndDynamicLocationView; + +template +class GenericConditionalAndDynamicLocationView final { + public: + GenericConditionalAndDynamicLocationView() : backing_() {} + explicit GenericConditionalAndDynamicLocationView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConditionalAndDynamicLocationView( + const GenericConditionalAndDynamicLocationView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConditionalAndDynamicLocationView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConditionalAndDynamicLocationView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConditionalAndDynamicLocationView &operator=( + const GenericConditionalAndDynamicLocationView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConditionalAndDynamicLocationView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericConditionalAndDynamicLocationView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = view_.y(); + const auto emboss_reserved_local_subexpr_5 = (emboss_reserved_local_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Sum(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(3LL)), 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(true).ValueOr(false); + } + + const GenericConditionalAndDynamicLocationView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConditionalAndDynamicLocationView; +}; +using ConditionalAndDynamicLocationView = + GenericConditionalAndDynamicLocationView; +using ConditionalAndDynamicLocationWriter = + GenericConditionalAndDynamicLocationView; + +template +struct EmbossReservedInternalIsGenericConditionalAndDynamicLocationView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConditionalAndDynamicLocationView< + GenericConditionalAndDynamicLocationView> { + static constexpr const bool value = true; +}; + +template +inline GenericConditionalAndDynamicLocationView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConditionalAndDynamicLocationView( T &&emboss_reserved_local_arg) { + return GenericConditionalAndDynamicLocationView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConditionalAndDynamicLocationView> +MakeConditionalAndDynamicLocationView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalAndDynamicLocationView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConditionalAndDynamicLocationView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConditionalAndDynamicLocationView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalAndDynamicLocationView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace ConditionUsesMinInt { + +} // namespace ConditionUsesMinInt + + +template +struct EmbossReservedInternalIsGenericConditionUsesMinIntView; + +template +class GenericConditionUsesMinIntView final { + public: + GenericConditionUsesMinIntView() : backing_() {} + explicit GenericConditionUsesMinIntView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConditionUsesMinIntView( + const GenericConditionUsesMinIntView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConditionUsesMinIntView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConditionUsesMinIntView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConditionUsesMinIntView &operator=( + const GenericConditionUsesMinIntView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericConditionUsesMinIntView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConditionUsesMinIntView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConditionUsesMinIntView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConditionUsesMinIntView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConditionUsesMinIntView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericConditionUsesMinIntView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(9223372036854775680LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Equal(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(-9223372036854775807LL - 1))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_5); + + return emboss_reserved_local_subexpr_6; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericConditionUsesMinIntView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConditionUsesMinIntView; +}; +using ConditionUsesMinIntView = + GenericConditionUsesMinIntView; +using ConditionUsesMinIntWriter = + GenericConditionUsesMinIntView; + +template +struct EmbossReservedInternalIsGenericConditionUsesMinIntView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConditionUsesMinIntView< + GenericConditionUsesMinIntView> { + static constexpr const bool value = true; +}; + +template +inline GenericConditionUsesMinIntView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConditionUsesMinIntView( T &&emboss_reserved_local_arg) { + return GenericConditionUsesMinIntView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConditionUsesMinIntView> +MakeConditionUsesMinIntView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionUsesMinIntView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConditionUsesMinIntView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConditionUsesMinIntView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionUsesMinIntView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace NestedConditional { + +} // namespace NestedConditional + + +template +struct EmbossReservedInternalIsGenericNestedConditionalView; + +template +class GenericNestedConditionalView final { + public: + GenericNestedConditionalView() : backing_() {} + explicit GenericNestedConditionalView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericNestedConditionalView( + const GenericNestedConditionalView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericNestedConditionalView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericNestedConditionalView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericNestedConditionalView &operator=( + const GenericNestedConditionalView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + + if (!has_xcc().Known()) return false; + if (has_xcc().ValueOrDefault() && !xcc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericNestedConditionalView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + + + if (!has_xcc().Known()) return false; + if (!emboss_reserved_local_other.has_xcc().Known()) return false; + + if (emboss_reserved_local_other.has_xcc().ValueOrDefault() && + !has_xcc().ValueOrDefault()) + return false; + if (has_xcc().ValueOrDefault() && + !emboss_reserved_local_other.has_xcc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xcc().ValueOrDefault() && + has_xcc().ValueOrDefault() && + !xcc().Equals(emboss_reserved_local_other.xcc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericNestedConditionalView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + + + if (emboss_reserved_local_other.has_xcc().ValueOr(false) && + !has_xcc().ValueOr(false)) + return false; + if (has_xcc().ValueOr(false) && + !emboss_reserved_local_other.has_xcc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xcc().ValueOr(false) && + has_xcc().ValueOr(false) && + !xcc().UncheckedEquals(emboss_reserved_local_other.xcc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericNestedConditionalView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericNestedConditionalView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericNestedConditionalView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xcc") { + if (!xcc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + if (has_xcc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xcc().IsAggregate() || xcc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xcc: "); + xcc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xcc().IsAggregate() && !xcc().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("# xcc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xcc() const; + ::emboss::support::Maybe has_xcc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericNestedConditionalView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = view_.xc(); + const auto emboss_reserved_local_subexpr_6 = (emboss_reserved_local_subexpr_5.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_5.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Equal(emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_8); + + return emboss_reserved_local_subexpr_9; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericNestedConditionalView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericNestedConditionalView; +}; +using NestedConditionalView = + GenericNestedConditionalView; +using NestedConditionalWriter = + GenericNestedConditionalView; + +template +struct EmbossReservedInternalIsGenericNestedConditionalView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericNestedConditionalView< + GenericNestedConditionalView> { + static constexpr const bool value = true; +}; + +template +inline GenericNestedConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeNestedConditionalView( T &&emboss_reserved_local_arg) { + return GenericNestedConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericNestedConditionalView> +MakeNestedConditionalView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNestedConditionalView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericNestedConditionalView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedNestedConditionalView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNestedConditionalView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace CorrectNestedConditional { + +} // namespace CorrectNestedConditional + + +template +struct EmbossReservedInternalIsGenericCorrectNestedConditionalView; + +template +class GenericCorrectNestedConditionalView final { + public: + GenericCorrectNestedConditionalView() : backing_() {} + explicit GenericCorrectNestedConditionalView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericCorrectNestedConditionalView( + const GenericCorrectNestedConditionalView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericCorrectNestedConditionalView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericCorrectNestedConditionalView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericCorrectNestedConditionalView &operator=( + const GenericCorrectNestedConditionalView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + + if (!has_xcc().Known()) return false; + if (has_xcc().ValueOrDefault() && !xcc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericCorrectNestedConditionalView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + + + if (!has_xcc().Known()) return false; + if (!emboss_reserved_local_other.has_xcc().Known()) return false; + + if (emboss_reserved_local_other.has_xcc().ValueOrDefault() && + !has_xcc().ValueOrDefault()) + return false; + if (has_xcc().ValueOrDefault() && + !emboss_reserved_local_other.has_xcc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xcc().ValueOrDefault() && + has_xcc().ValueOrDefault() && + !xcc().Equals(emboss_reserved_local_other.xcc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericCorrectNestedConditionalView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + + + if (emboss_reserved_local_other.has_xcc().ValueOr(false) && + !has_xcc().ValueOr(false)) + return false; + if (has_xcc().ValueOr(false) && + !emboss_reserved_local_other.has_xcc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xcc().ValueOr(false) && + has_xcc().ValueOr(false) && + !xcc().UncheckedEquals(emboss_reserved_local_other.xcc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericCorrectNestedConditionalView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericCorrectNestedConditionalView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericCorrectNestedConditionalView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xcc") { + if (!xcc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + if (has_xcc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xcc().IsAggregate() || xcc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xcc: "); + xcc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xcc().IsAggregate() && !xcc().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("# xcc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xcc() const; + ::emboss::support::Maybe has_xcc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericCorrectNestedConditionalView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = view_.xc(); + const auto emboss_reserved_local_subexpr_6 = (emboss_reserved_local_subexpr_5.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_5.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Equal(emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::And(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_7); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Choice(emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_9); + + return emboss_reserved_local_subexpr_10; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericCorrectNestedConditionalView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericCorrectNestedConditionalView; +}; +using CorrectNestedConditionalView = + GenericCorrectNestedConditionalView; +using CorrectNestedConditionalWriter = + GenericCorrectNestedConditionalView; + +template +struct EmbossReservedInternalIsGenericCorrectNestedConditionalView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericCorrectNestedConditionalView< + GenericCorrectNestedConditionalView> { + static constexpr const bool value = true; +}; + +template +inline GenericCorrectNestedConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeCorrectNestedConditionalView( T &&emboss_reserved_local_arg) { + return GenericCorrectNestedConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericCorrectNestedConditionalView> +MakeCorrectNestedConditionalView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericCorrectNestedConditionalView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericCorrectNestedConditionalView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedCorrectNestedConditionalView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericCorrectNestedConditionalView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace AlwaysFalseCondition { + +} // namespace AlwaysFalseCondition + + +template +struct EmbossReservedInternalIsGenericAlwaysFalseConditionView; + +template +class GenericAlwaysFalseConditionView final { + public: + GenericAlwaysFalseConditionView() : backing_() {} + explicit GenericAlwaysFalseConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericAlwaysFalseConditionView( + const GenericAlwaysFalseConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericAlwaysFalseConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericAlwaysFalseConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericAlwaysFalseConditionView &operator=( + const GenericAlwaysFalseConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericAlwaysFalseConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAlwaysFalseConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAlwaysFalseConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAlwaysFalseConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAlwaysFalseConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericAlwaysFalseConditionView; +}; +using AlwaysFalseConditionView = + GenericAlwaysFalseConditionView; +using AlwaysFalseConditionWriter = + GenericAlwaysFalseConditionView; + +template +struct EmbossReservedInternalIsGenericAlwaysFalseConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAlwaysFalseConditionView< + GenericAlwaysFalseConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericAlwaysFalseConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAlwaysFalseConditionView( T &&emboss_reserved_local_arg) { + return GenericAlwaysFalseConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAlwaysFalseConditionView> +MakeAlwaysFalseConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAlwaysFalseConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAlwaysFalseConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAlwaysFalseConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAlwaysFalseConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace OnlyAlwaysFalseCondition { + +} // namespace OnlyAlwaysFalseCondition + + +template +struct EmbossReservedInternalIsGenericOnlyAlwaysFalseConditionView; + +template +class GenericOnlyAlwaysFalseConditionView final { + public: + GenericOnlyAlwaysFalseConditionView() : backing_() {} + explicit GenericOnlyAlwaysFalseConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericOnlyAlwaysFalseConditionView( + const GenericOnlyAlwaysFalseConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericOnlyAlwaysFalseConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericOnlyAlwaysFalseConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericOnlyAlwaysFalseConditionView &operator=( + const GenericOnlyAlwaysFalseConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericOnlyAlwaysFalseConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericOnlyAlwaysFalseConditionView; +}; +using OnlyAlwaysFalseConditionView = + GenericOnlyAlwaysFalseConditionView; +using OnlyAlwaysFalseConditionWriter = + GenericOnlyAlwaysFalseConditionView; + +template +struct EmbossReservedInternalIsGenericOnlyAlwaysFalseConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericOnlyAlwaysFalseConditionView< + GenericOnlyAlwaysFalseConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericOnlyAlwaysFalseConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeOnlyAlwaysFalseConditionView( T &&emboss_reserved_local_arg) { + return GenericOnlyAlwaysFalseConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericOnlyAlwaysFalseConditionView> +MakeOnlyAlwaysFalseConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOnlyAlwaysFalseConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericOnlyAlwaysFalseConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedOnlyAlwaysFalseConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOnlyAlwaysFalseConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + +namespace EmptyStruct { + +} // namespace EmptyStruct + + +template +struct EmbossReservedInternalIsGenericEmptyStructView; + +template +class GenericEmptyStructView final { + public: + GenericEmptyStructView() : backing_() {} + explicit GenericEmptyStructView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmptyStructView( + const GenericEmptyStructView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmptyStructView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmptyStructView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmptyStructView &operator=( + const GenericEmptyStructView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) 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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericEmptyStructView emboss_reserved_local_other) const { + return true; + } + template + bool UncheckedEquals( + GenericEmptyStructView emboss_reserved_local_other) const { + return true; + } + template + void UncheckedCopyFrom( + GenericEmptyStructView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmptyStructView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericEmptyStructView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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; + + return false; + } + } + + template + 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; + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmptyStructView; +}; +using EmptyStructView = + GenericEmptyStructView; +using EmptyStructWriter = + GenericEmptyStructView; + +template +struct EmbossReservedInternalIsGenericEmptyStructView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmptyStructView< + GenericEmptyStructView> { + static constexpr const bool value = true; +}; + +template +inline GenericEmptyStructView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmptyStructView( T &&emboss_reserved_local_arg) { + return GenericEmptyStructView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmptyStructView> +MakeEmptyStructView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmptyStructView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmptyStructView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmptyStructView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmptyStructView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace AlwaysFalseConditionDynamicSize { + +} // namespace AlwaysFalseConditionDynamicSize + + +template +struct EmbossReservedInternalIsGenericAlwaysFalseConditionDynamicSizeView; + +template +class GenericAlwaysFalseConditionDynamicSizeView final { + public: + GenericAlwaysFalseConditionDynamicSizeView() : backing_() {} + explicit GenericAlwaysFalseConditionDynamicSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericAlwaysFalseConditionDynamicSizeView( + const GenericAlwaysFalseConditionDynamicSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericAlwaysFalseConditionDynamicSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericAlwaysFalseConditionDynamicSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericAlwaysFalseConditionDynamicSizeView &operator=( + const GenericAlwaysFalseConditionDynamicSizeView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAlwaysFalseConditionDynamicSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericAlwaysFalseConditionDynamicSizeView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericAlwaysFalseConditionDynamicSizeView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericAlwaysFalseConditionDynamicSizeView; +}; +using AlwaysFalseConditionDynamicSizeView = + GenericAlwaysFalseConditionDynamicSizeView; +using AlwaysFalseConditionDynamicSizeWriter = + GenericAlwaysFalseConditionDynamicSizeView; + +template +struct EmbossReservedInternalIsGenericAlwaysFalseConditionDynamicSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAlwaysFalseConditionDynamicSizeView< + GenericAlwaysFalseConditionDynamicSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericAlwaysFalseConditionDynamicSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAlwaysFalseConditionDynamicSizeView( T &&emboss_reserved_local_arg) { + return GenericAlwaysFalseConditionDynamicSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAlwaysFalseConditionDynamicSizeView> +MakeAlwaysFalseConditionDynamicSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAlwaysFalseConditionDynamicSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAlwaysFalseConditionDynamicSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAlwaysFalseConditionDynamicSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAlwaysFalseConditionDynamicSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace ConditionDoesNotContributeToSize { + +} // namespace ConditionDoesNotContributeToSize + + +template +struct EmbossReservedInternalIsGenericConditionDoesNotContributeToSizeView; + +template +class GenericConditionDoesNotContributeToSizeView final { + public: + GenericConditionDoesNotContributeToSizeView() : backing_() {} + explicit GenericConditionDoesNotContributeToSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConditionDoesNotContributeToSizeView( + const GenericConditionDoesNotContributeToSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConditionDoesNotContributeToSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConditionDoesNotContributeToSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConditionDoesNotContributeToSizeView &operator=( + const GenericConditionDoesNotContributeToSizeView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConditionDoesNotContributeToSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConditionDoesNotContributeToSizeView; +}; +using ConditionDoesNotContributeToSizeView = + GenericConditionDoesNotContributeToSizeView; +using ConditionDoesNotContributeToSizeWriter = + GenericConditionDoesNotContributeToSizeView; + +template +struct EmbossReservedInternalIsGenericConditionDoesNotContributeToSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConditionDoesNotContributeToSizeView< + GenericConditionDoesNotContributeToSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericConditionDoesNotContributeToSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConditionDoesNotContributeToSizeView( T &&emboss_reserved_local_arg) { + return GenericConditionDoesNotContributeToSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConditionDoesNotContributeToSizeView> +MakeConditionDoesNotContributeToSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionDoesNotContributeToSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConditionDoesNotContributeToSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConditionDoesNotContributeToSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionDoesNotContributeToSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} +enum class OnOff : ::std::uint64_t { + OFF = static_cast(0LL), + ON = static_cast(1LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + OnOff *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("OFF", emboss_reserved_local_name)) { + *emboss_reserved_local_result = OnOff::OFF; + return true; + } + + if (!strcmp("ON", emboss_reserved_local_name)) { + *emboss_reserved_local_result = OnOff::ON; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + OnOff emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case OnOff::OFF: return "OFF"; + + case OnOff::ON: return "ON"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(OnOff emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case OnOff::OFF: return true; + + case OnOff::ON: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + OnOff 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::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, + OnOff *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + OnOff emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(OnOff emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + OnOff emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + + +namespace EnumCondition { + +} // namespace EnumCondition + + +template +struct EmbossReservedInternalIsGenericEnumConditionView; + +template +class GenericEnumConditionView final { + public: + GenericEnumConditionView() : backing_() {} + explicit GenericEnumConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEnumConditionView( + const GenericEnumConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEnumConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEnumConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEnumConditionView &operator=( + const GenericEnumConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + + if (!has_xc2().Known()) return false; + if (has_xc2().ValueOrDefault() && !xc2().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericEnumConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + + + if (!has_xc2().Known()) return false; + if (!emboss_reserved_local_other.has_xc2().Known()) return false; + + if (emboss_reserved_local_other.has_xc2().ValueOrDefault() && + !has_xc2().ValueOrDefault()) + return false; + if (has_xc2().ValueOrDefault() && + !emboss_reserved_local_other.has_xc2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc2().ValueOrDefault() && + has_xc2().ValueOrDefault() && + !xc2().Equals(emboss_reserved_local_other.xc2())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEnumConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + + + if (emboss_reserved_local_other.has_xc2().ValueOr(false) && + !has_xc2().ValueOr(false)) + return false; + if (has_xc2().ValueOr(false) && + !emboss_reserved_local_other.has_xc2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc2().ValueOr(false) && + has_xc2().ValueOr(false) && + !xc2().UncheckedEquals(emboss_reserved_local_other.xc2())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEnumConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericEnumConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericEnumConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc2") { + if (!xc2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + if (has_xc2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc2().IsAggregate() || xc2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc2: "); + xc2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc2().IsAggregate() && !xc2().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("# xc2: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::OnOff, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc2() const; + ::emboss::support::Maybe has_xc2() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericEnumConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Choice(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6); + + return emboss_reserved_local_subexpr_7; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericEnumConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEnumConditionView; +}; +using EnumConditionView = + GenericEnumConditionView; +using EnumConditionWriter = + GenericEnumConditionView; + +template +struct EmbossReservedInternalIsGenericEnumConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEnumConditionView< + GenericEnumConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericEnumConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEnumConditionView( T &&emboss_reserved_local_arg) { + return GenericEnumConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEnumConditionView> +MakeEnumConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEnumConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEnumConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEnumConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEnumConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace NegativeEnumCondition { + +} // namespace NegativeEnumCondition + + +template +struct EmbossReservedInternalIsGenericNegativeEnumConditionView; + +template +class GenericNegativeEnumConditionView final { + public: + GenericNegativeEnumConditionView() : backing_() {} + explicit GenericNegativeEnumConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericNegativeEnumConditionView( + const GenericNegativeEnumConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericNegativeEnumConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericNegativeEnumConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericNegativeEnumConditionView &operator=( + const GenericNegativeEnumConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericNegativeEnumConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericNegativeEnumConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericNegativeEnumConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericNegativeEnumConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericNegativeEnumConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::OnOff, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericNegativeEnumConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::NotEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericNegativeEnumConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericNegativeEnumConditionView; +}; +using NegativeEnumConditionView = + GenericNegativeEnumConditionView; +using NegativeEnumConditionWriter = + GenericNegativeEnumConditionView; + +template +struct EmbossReservedInternalIsGenericNegativeEnumConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericNegativeEnumConditionView< + GenericNegativeEnumConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericNegativeEnumConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeNegativeEnumConditionView( T &&emboss_reserved_local_arg) { + return GenericNegativeEnumConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericNegativeEnumConditionView> +MakeNegativeEnumConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNegativeEnumConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericNegativeEnumConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedNegativeEnumConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNegativeEnumConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace LessThanCondition { + +} // namespace LessThanCondition + + +template +struct EmbossReservedInternalIsGenericLessThanConditionView; + +template +class GenericLessThanConditionView final { + public: + GenericLessThanConditionView() : backing_() {} + explicit GenericLessThanConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericLessThanConditionView( + const GenericLessThanConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericLessThanConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericLessThanConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericLessThanConditionView &operator=( + const GenericLessThanConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericLessThanConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericLessThanConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericLessThanConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericLessThanConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericLessThanConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericLessThanConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericLessThanConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericLessThanConditionView; +}; +using LessThanConditionView = + GenericLessThanConditionView; +using LessThanConditionWriter = + GenericLessThanConditionView; + +template +struct EmbossReservedInternalIsGenericLessThanConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericLessThanConditionView< + GenericLessThanConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericLessThanConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeLessThanConditionView( T &&emboss_reserved_local_arg) { + return GenericLessThanConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericLessThanConditionView> +MakeLessThanConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericLessThanConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericLessThanConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedLessThanConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericLessThanConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace LessThanOrEqualCondition { + +} // namespace LessThanOrEqualCondition + + +template +struct EmbossReservedInternalIsGenericLessThanOrEqualConditionView; + +template +class GenericLessThanOrEqualConditionView final { + public: + GenericLessThanOrEqualConditionView() : backing_() {} + explicit GenericLessThanOrEqualConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericLessThanOrEqualConditionView( + const GenericLessThanOrEqualConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericLessThanOrEqualConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericLessThanOrEqualConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericLessThanOrEqualConditionView &operator=( + const GenericLessThanOrEqualConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericLessThanOrEqualConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericLessThanOrEqualConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThanOrEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericLessThanOrEqualConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericLessThanOrEqualConditionView; +}; +using LessThanOrEqualConditionView = + GenericLessThanOrEqualConditionView; +using LessThanOrEqualConditionWriter = + GenericLessThanOrEqualConditionView; + +template +struct EmbossReservedInternalIsGenericLessThanOrEqualConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericLessThanOrEqualConditionView< + GenericLessThanOrEqualConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericLessThanOrEqualConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeLessThanOrEqualConditionView( T &&emboss_reserved_local_arg) { + return GenericLessThanOrEqualConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericLessThanOrEqualConditionView> +MakeLessThanOrEqualConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericLessThanOrEqualConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericLessThanOrEqualConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedLessThanOrEqualConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericLessThanOrEqualConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace GreaterThanOrEqualCondition { + +} // namespace GreaterThanOrEqualCondition + + +template +struct EmbossReservedInternalIsGenericGreaterThanOrEqualConditionView; + +template +class GenericGreaterThanOrEqualConditionView final { + public: + GenericGreaterThanOrEqualConditionView() : backing_() {} + explicit GenericGreaterThanOrEqualConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericGreaterThanOrEqualConditionView( + const GenericGreaterThanOrEqualConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericGreaterThanOrEqualConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericGreaterThanOrEqualConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericGreaterThanOrEqualConditionView &operator=( + const GenericGreaterThanOrEqualConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericGreaterThanOrEqualConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericGreaterThanOrEqualConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericGreaterThanOrEqualConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericGreaterThanOrEqualConditionView; +}; +using GreaterThanOrEqualConditionView = + GenericGreaterThanOrEqualConditionView; +using GreaterThanOrEqualConditionWriter = + GenericGreaterThanOrEqualConditionView; + +template +struct EmbossReservedInternalIsGenericGreaterThanOrEqualConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericGreaterThanOrEqualConditionView< + GenericGreaterThanOrEqualConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericGreaterThanOrEqualConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeGreaterThanOrEqualConditionView( T &&emboss_reserved_local_arg) { + return GenericGreaterThanOrEqualConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericGreaterThanOrEqualConditionView> +MakeGreaterThanOrEqualConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericGreaterThanOrEqualConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericGreaterThanOrEqualConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedGreaterThanOrEqualConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericGreaterThanOrEqualConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace GreaterThanCondition { + +} // namespace GreaterThanCondition + + +template +struct EmbossReservedInternalIsGenericGreaterThanConditionView; + +template +class GenericGreaterThanConditionView final { + public: + GenericGreaterThanConditionView() : backing_() {} + explicit GenericGreaterThanConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericGreaterThanConditionView( + const GenericGreaterThanConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericGreaterThanConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericGreaterThanConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericGreaterThanConditionView &operator=( + const GenericGreaterThanConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericGreaterThanConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericGreaterThanConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericGreaterThanConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericGreaterThanConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericGreaterThanConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericGreaterThanConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericGreaterThanConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericGreaterThanConditionView; +}; +using GreaterThanConditionView = + GenericGreaterThanConditionView; +using GreaterThanConditionWriter = + GenericGreaterThanConditionView; + +template +struct EmbossReservedInternalIsGenericGreaterThanConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericGreaterThanConditionView< + GenericGreaterThanConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericGreaterThanConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeGreaterThanConditionView( T &&emboss_reserved_local_arg) { + return GenericGreaterThanConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericGreaterThanConditionView> +MakeGreaterThanConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericGreaterThanConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericGreaterThanConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedGreaterThanConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericGreaterThanConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace RangeCondition { + +} // namespace RangeCondition + + +template +struct EmbossReservedInternalIsGenericRangeConditionView; + +template +class GenericRangeConditionView final { + public: + GenericRangeConditionView() : backing_() {} + explicit GenericRangeConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRangeConditionView( + const GenericRangeConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRangeConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRangeConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRangeConditionView &operator=( + const GenericRangeConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericRangeConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericRangeConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericRangeConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericRangeConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericRangeConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericRangeConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(::emboss::support::Maybe(static_cast(5LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = view_.y(); + const auto emboss_reserved_local_subexpr_5 = (emboss_reserved_local_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::LessThanOrEqual(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_5); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::And(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_6); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(10LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::And(emboss_reserved_local_subexpr_7, emboss_reserved_local_subexpr_8); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Choice(emboss_reserved_local_subexpr_9, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_10); + + return emboss_reserved_local_subexpr_11; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericRangeConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRangeConditionView; +}; +using RangeConditionView = + GenericRangeConditionView; +using RangeConditionWriter = + GenericRangeConditionView; + +template +struct EmbossReservedInternalIsGenericRangeConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRangeConditionView< + GenericRangeConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericRangeConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRangeConditionView( T &&emboss_reserved_local_arg) { + return GenericRangeConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRangeConditionView> +MakeRangeConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRangeConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRangeConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRangeConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRangeConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace ReverseRangeCondition { + +} // namespace ReverseRangeCondition + + +template +struct EmbossReservedInternalIsGenericReverseRangeConditionView; + +template +class GenericReverseRangeConditionView final { + public: + GenericReverseRangeConditionView() : backing_() {} + explicit GenericReverseRangeConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericReverseRangeConditionView( + const GenericReverseRangeConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericReverseRangeConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericReverseRangeConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericReverseRangeConditionView &operator=( + const GenericReverseRangeConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericReverseRangeConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericReverseRangeConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericReverseRangeConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericReverseRangeConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericReverseRangeConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericReverseRangeConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.y(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = view_.x(); + const auto emboss_reserved_local_subexpr_5 = (emboss_reserved_local_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::GreaterThanOrEqual(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_5); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::And(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_6); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::And(emboss_reserved_local_subexpr_7, emboss_reserved_local_subexpr_8); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Choice(emboss_reserved_local_subexpr_9, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_10); + + return emboss_reserved_local_subexpr_11; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericReverseRangeConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericReverseRangeConditionView; +}; +using ReverseRangeConditionView = + GenericReverseRangeConditionView; +using ReverseRangeConditionWriter = + GenericReverseRangeConditionView; + +template +struct EmbossReservedInternalIsGenericReverseRangeConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericReverseRangeConditionView< + GenericReverseRangeConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericReverseRangeConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeReverseRangeConditionView( T &&emboss_reserved_local_arg) { + return GenericReverseRangeConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericReverseRangeConditionView> +MakeReverseRangeConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericReverseRangeConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericReverseRangeConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedReverseRangeConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericReverseRangeConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace AndCondition { + +} // namespace AndCondition + + +template +struct EmbossReservedInternalIsGenericAndConditionView; + +template +class GenericAndConditionView final { + public: + GenericAndConditionView() : backing_() {} + explicit GenericAndConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericAndConditionView( + const GenericAndConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericAndConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericAndConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericAndConditionView &operator=( + const GenericAndConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericAndConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAndConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAndConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAndConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAndConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericAndConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_4 = view_.y(); + const auto emboss_reserved_local_subexpr_5 = (emboss_reserved_local_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::And(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_6); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_8); + + return emboss_reserved_local_subexpr_9; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericAndConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericAndConditionView; +}; +using AndConditionView = + GenericAndConditionView; +using AndConditionWriter = + GenericAndConditionView; + +template +struct EmbossReservedInternalIsGenericAndConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAndConditionView< + GenericAndConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericAndConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAndConditionView( T &&emboss_reserved_local_arg) { + return GenericAndConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAndConditionView> +MakeAndConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAndConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAndConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAndConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAndConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace OrCondition { + +} // namespace OrCondition + + +template +struct EmbossReservedInternalIsGenericOrConditionView; + +template +class GenericOrConditionView final { + public: + GenericOrConditionView() : backing_() {} + explicit GenericOrConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericOrConditionView( + const GenericOrConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericOrConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericOrConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericOrConditionView &operator=( + const GenericOrConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericOrConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericOrConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericOrConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericOrConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericOrConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericOrConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_4 = view_.y(); + const auto emboss_reserved_local_subexpr_5 = (emboss_reserved_local_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Or(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_6); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_8); + + return emboss_reserved_local_subexpr_9; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericOrConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericOrConditionView; +}; +using OrConditionView = + GenericOrConditionView; +using OrConditionWriter = + GenericOrConditionView; + +template +struct EmbossReservedInternalIsGenericOrConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericOrConditionView< + GenericOrConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericOrConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeOrConditionView( T &&emboss_reserved_local_arg) { + return GenericOrConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericOrConditionView> +MakeOrConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOrConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericOrConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedOrConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOrConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + +namespace ChoiceCondition { +enum class Field : ::std::uint64_t { + USE_X = static_cast(1LL), + USE_Y = static_cast(2LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Field *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("USE_X", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Field::USE_X; + return true; + } + + if (!strcmp("USE_Y", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Field::USE_Y; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Field emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Field::USE_X: return "USE_X"; + + case Field::USE_Y: return "USE_Y"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Field emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Field::USE_X: return true; + + case Field::USE_Y: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Field 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::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, + Field *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Field emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Field emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Field emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +} // namespace ChoiceCondition + + +template +struct EmbossReservedInternalIsGenericChoiceConditionView; + +template +class GenericChoiceConditionView final { + public: + GenericChoiceConditionView() : backing_() {} + explicit GenericChoiceConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericChoiceConditionView( + const GenericChoiceConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericChoiceConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericChoiceConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericChoiceConditionView &operator=( + const GenericChoiceConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + using Field = ::emboss::test::ChoiceCondition::Field; + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_field().Known()) return false; + if (has_field().ValueOrDefault() && !field().Ok()) return false; + + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_xyc().Known()) return false; + if (has_xyc().ValueOrDefault() && !xyc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericChoiceConditionView emboss_reserved_local_other) const { + + if (!has_field().Known()) return false; + if (!emboss_reserved_local_other.has_field().Known()) return false; + + if (emboss_reserved_local_other.has_field().ValueOrDefault() && + !has_field().ValueOrDefault()) + return false; + if (has_field().ValueOrDefault() && + !emboss_reserved_local_other.has_field().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_field().ValueOrDefault() && + has_field().ValueOrDefault() && + !field().Equals(emboss_reserved_local_other.field())) + return false; + + + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_xyc().Known()) return false; + if (!emboss_reserved_local_other.has_xyc().Known()) return false; + + if (emboss_reserved_local_other.has_xyc().ValueOrDefault() && + !has_xyc().ValueOrDefault()) + return false; + if (has_xyc().ValueOrDefault() && + !emboss_reserved_local_other.has_xyc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xyc().ValueOrDefault() && + has_xyc().ValueOrDefault() && + !xyc().Equals(emboss_reserved_local_other.xyc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericChoiceConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_field().ValueOr(false) && + !has_field().ValueOr(false)) + return false; + if (has_field().ValueOr(false) && + !emboss_reserved_local_other.has_field().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_field().ValueOr(false) && + has_field().ValueOr(false) && + !field().UncheckedEquals(emboss_reserved_local_other.field())) + return false; + + + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_xyc().ValueOr(false) && + !has_xyc().ValueOr(false)) + return false; + if (has_xyc().ValueOr(false) && + !emboss_reserved_local_other.has_xyc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xyc().ValueOr(false) && + has_xyc().ValueOr(false) && + !xyc().UncheckedEquals(emboss_reserved_local_other.xyc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericChoiceConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericChoiceConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericChoiceConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "field") { + if (!field().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xyc") { + if (!xyc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + field().IsAggregate() || field().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("field: "); + field().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !field().IsAggregate() && !field().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("# field: UNREADABLE\n"); + } + } + + if (has_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_xyc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xyc().IsAggregate() || xyc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xyc: "); + xyc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xyc().IsAggregate() && !xyc().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("# xyc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::ChoiceCondition::Field, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + field() const; + ::emboss::support::Maybe has_field() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xyc() const; + ::emboss::support::Maybe has_xyc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericChoiceConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.field(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); + const auto emboss_reserved_local_subexpr_4 = view_.x(); + const auto emboss_reserved_local_subexpr_5 = (emboss_reserved_local_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_6 = view_.y(); + const auto emboss_reserved_local_subexpr_7 = (emboss_reserved_local_subexpr_6.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_6.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_5, emboss_reserved_local_subexpr_7); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Equal(emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(5LL))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Choice(emboss_reserved_local_subexpr_9, ::emboss::support::Maybe(static_cast(4LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_10); + + return emboss_reserved_local_subexpr_11; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericChoiceConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericChoiceConditionView; +}; +using ChoiceConditionView = + GenericChoiceConditionView; +using ChoiceConditionWriter = + GenericChoiceConditionView; + +template +struct EmbossReservedInternalIsGenericChoiceConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericChoiceConditionView< + GenericChoiceConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericChoiceConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeChoiceConditionView( T &&emboss_reserved_local_arg) { + return GenericChoiceConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericChoiceConditionView> +MakeChoiceConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericChoiceConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericChoiceConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedChoiceConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericChoiceConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace ContainsBits { + + + + +namespace EmbossReservedAnonymousField3 { + +} // namespace EmbossReservedAnonymousField3 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField3View; + +template +class GenericEmbossReservedAnonymousField3View final { + public: + GenericEmbossReservedAnonymousField3View() : backing_() {} + explicit GenericEmbossReservedAnonymousField3View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField3View( + const GenericEmbossReservedAnonymousField3View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField3View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField3View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField3View &operator=( + const GenericEmbossReservedAnonymousField3View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_has_top().Known()) return false; + if (has_has_top().ValueOrDefault() && !has_top().Ok()) return false; + + + if (!has_has_bottom().Known()) return false; + if (has_has_bottom().ValueOrDefault() && !has_bottom().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { + + if (!has_has_top().Known()) return false; + if (!emboss_reserved_local_other.has_has_top().Known()) return false; + + if (emboss_reserved_local_other.has_has_top().ValueOrDefault() && + !has_has_top().ValueOrDefault()) + return false; + if (has_has_top().ValueOrDefault() && + !emboss_reserved_local_other.has_has_top().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_has_top().ValueOrDefault() && + has_has_top().ValueOrDefault() && + !has_top().Equals(emboss_reserved_local_other.has_top())) + return false; + + + + if (!has_has_bottom().Known()) return false; + if (!emboss_reserved_local_other.has_has_bottom().Known()) return false; + + if (emboss_reserved_local_other.has_has_bottom().ValueOrDefault() && + !has_has_bottom().ValueOrDefault()) + return false; + if (has_has_bottom().ValueOrDefault() && + !emboss_reserved_local_other.has_has_bottom().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_has_bottom().ValueOrDefault() && + has_has_bottom().ValueOrDefault() && + !has_bottom().Equals(emboss_reserved_local_other.has_bottom())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_has_top().ValueOr(false) && + !has_has_top().ValueOr(false)) + return false; + if (has_has_top().ValueOr(false) && + !emboss_reserved_local_other.has_has_top().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_has_top().ValueOr(false) && + has_has_top().ValueOr(false) && + !has_top().UncheckedEquals(emboss_reserved_local_other.has_top())) + return false; + + + + if (emboss_reserved_local_other.has_has_bottom().ValueOr(false) && + !has_has_bottom().ValueOr(false)) + return false; + if (has_has_bottom().ValueOr(false) && + !emboss_reserved_local_other.has_has_bottom().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_has_bottom().ValueOr(false) && + has_has_bottom().ValueOr(false) && + !has_bottom().UncheckedEquals(emboss_reserved_local_other.has_bottom())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField3View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "has_top") { + if (!has_top().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "has_bottom") { + if (!has_bottom().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_has_top().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + has_top().IsAggregate() || has_top().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("has_top: "); + has_top().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !has_top().IsAggregate() && !has_top().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("# has_top: UNREADABLE\n"); + } + } + + if (has_has_bottom().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + has_bottom().IsAggregate() || has_bottom().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("has_bottom: "); + has_bottom().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !has_bottom().IsAggregate() && !has_bottom().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("# has_bottom: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + has_top() const; + ::emboss::support::Maybe has_has_top() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + has_bottom() const; + ::emboss::support::Maybe has_has_bottom() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField3View; +}; +using EmbossReservedAnonymousField3View = + GenericEmbossReservedAnonymousField3View; +using EmbossReservedAnonymousField3Writer = + GenericEmbossReservedAnonymousField3View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField3View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField3View< + GenericEmbossReservedAnonymousField3View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField3View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField3View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField3View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField3View> +MakeEmbossReservedAnonymousField3View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField3View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField3View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField3View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField3View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace ContainsBits + + +template +struct EmbossReservedInternalIsGenericContainsBitsView; + +template +class GenericContainsBitsView final { + public: + GenericContainsBitsView() : backing_() {} + explicit GenericContainsBitsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericContainsBitsView( + const GenericContainsBitsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericContainsBitsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericContainsBitsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericContainsBitsView &operator=( + const GenericContainsBitsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_emboss_reserved_anonymous_field_3().Known()) return false; + if (has_emboss_reserved_anonymous_field_3().ValueOrDefault() && !emboss_reserved_anonymous_field_3().Ok()) return false; + + + if (!has_has_top().Known()) return false; + if (has_has_top().ValueOrDefault() && !has_top().Ok()) return false; + + + if (!has_has_bottom().Known()) return false; + if (has_has_bottom().ValueOrDefault() && !has_bottom().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericContainsBitsView emboss_reserved_local_other) const { + + if (!has_emboss_reserved_anonymous_field_3().Known()) return false; + if (!emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().Known()) return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().ValueOrDefault() && + !has_emboss_reserved_anonymous_field_3().ValueOrDefault()) + return false; + if (has_emboss_reserved_anonymous_field_3().ValueOrDefault() && + !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().ValueOrDefault() && + has_emboss_reserved_anonymous_field_3().ValueOrDefault() && + !emboss_reserved_anonymous_field_3().Equals(emboss_reserved_local_other.emboss_reserved_anonymous_field_3())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericContainsBitsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().ValueOr(false) && + !has_emboss_reserved_anonymous_field_3().ValueOr(false)) + return false; + if (has_emboss_reserved_anonymous_field_3().ValueOr(false) && + !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_3().ValueOr(false) && + has_emboss_reserved_anonymous_field_3().ValueOr(false) && + !emboss_reserved_anonymous_field_3().UncheckedEquals(emboss_reserved_local_other.emboss_reserved_anonymous_field_3())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericContainsBitsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericContainsBitsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericContainsBitsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "has_top") { + if (!has_top().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "has_bottom") { + if (!has_bottom().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_has_top().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + has_top().IsAggregate() || has_top().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("has_top: "); + has_top().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !has_top().IsAggregate() && !has_top().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("# has_top: UNREADABLE\n"); + } + } + + if (has_has_bottom().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + has_bottom().IsAggregate() || has_bottom().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("has_bottom: "); + has_bottom().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !has_bottom().IsAggregate() && !has_bottom().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("# has_bottom: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + typename ::emboss::test::ContainsBits::GenericEmbossReservedAnonymousField3View>, 8>> + + emboss_reserved_anonymous_field_3() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_3() const; + + public: + auto has_top() const -> decltype(this->emboss_reserved_anonymous_field_3().has_top()) { + return has_has_top().ValueOrDefault() ? emboss_reserved_anonymous_field_3().has_top() + : decltype(this->emboss_reserved_anonymous_field_3().has_top())(); + } + ::emboss::support::Maybe has_has_top() const; + + public: + auto has_bottom() const -> decltype(this->emboss_reserved_anonymous_field_3().has_bottom()) { + return has_has_bottom().ValueOrDefault() ? emboss_reserved_anonymous_field_3().has_bottom() + : decltype(this->emboss_reserved_anonymous_field_3().has_bottom())(); + } + ::emboss::support::Maybe has_has_bottom() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericContainsBitsView; +}; +using ContainsBitsView = + GenericContainsBitsView; +using ContainsBitsWriter = + GenericContainsBitsView; + +template +struct EmbossReservedInternalIsGenericContainsBitsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericContainsBitsView< + GenericContainsBitsView> { + static constexpr const bool value = true; +}; + +template +inline GenericContainsBitsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeContainsBitsView( T &&emboss_reserved_local_arg) { + return GenericContainsBitsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericContainsBitsView> +MakeContainsBitsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericContainsBitsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericContainsBitsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedContainsBitsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericContainsBitsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace ContainsContainsBits { + +} // namespace ContainsContainsBits + + +template +struct EmbossReservedInternalIsGenericContainsContainsBitsView; + +template +class GenericContainsContainsBitsView final { + public: + GenericContainsContainsBitsView() : backing_() {} + explicit GenericContainsContainsBitsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericContainsContainsBitsView( + const GenericContainsContainsBitsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericContainsContainsBitsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericContainsContainsBitsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericContainsContainsBitsView &operator=( + const GenericContainsContainsBitsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_condition().Known()) return false; + if (has_condition().ValueOrDefault() && !condition().Ok()) return false; + + + if (!has_top().Known()) return false; + if (has_top().ValueOrDefault() && !top().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericContainsContainsBitsView emboss_reserved_local_other) const { + + if (!has_condition().Known()) return false; + if (!emboss_reserved_local_other.has_condition().Known()) return false; + + if (emboss_reserved_local_other.has_condition().ValueOrDefault() && + !has_condition().ValueOrDefault()) + return false; + if (has_condition().ValueOrDefault() && + !emboss_reserved_local_other.has_condition().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_condition().ValueOrDefault() && + has_condition().ValueOrDefault() && + !condition().Equals(emboss_reserved_local_other.condition())) + return false; + + + + if (!has_top().Known()) return false; + if (!emboss_reserved_local_other.has_top().Known()) return false; + + if (emboss_reserved_local_other.has_top().ValueOrDefault() && + !has_top().ValueOrDefault()) + return false; + if (has_top().ValueOrDefault() && + !emboss_reserved_local_other.has_top().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_top().ValueOrDefault() && + has_top().ValueOrDefault() && + !top().Equals(emboss_reserved_local_other.top())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericContainsContainsBitsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_condition().ValueOr(false) && + !has_condition().ValueOr(false)) + return false; + if (has_condition().ValueOr(false) && + !emboss_reserved_local_other.has_condition().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_condition().ValueOr(false) && + has_condition().ValueOr(false) && + !condition().UncheckedEquals(emboss_reserved_local_other.condition())) + return false; + + + + if (emboss_reserved_local_other.has_top().ValueOr(false) && + !has_top().ValueOr(false)) + return false; + if (has_top().ValueOr(false) && + !emboss_reserved_local_other.has_top().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_top().ValueOr(false) && + has_top().ValueOr(false) && + !top().UncheckedEquals(emboss_reserved_local_other.top())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericContainsContainsBitsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericContainsContainsBitsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericContainsContainsBitsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "condition") { + if (!condition().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "top") { + if (!top().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_condition().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + condition().IsAggregate() || condition().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("condition: "); + condition().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !condition().IsAggregate() && !condition().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("# condition: UNREADABLE\n"); + } + } + + if (has_top().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + top().IsAggregate() || top().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("top: "); + top().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !top().IsAggregate() && !top().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("# top: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericContainsBitsView> + + condition() const; + ::emboss::support::Maybe has_condition() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + top() const; + ::emboss::support::Maybe has_top() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericContainsContainsBitsView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.condition().has_top(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericContainsContainsBitsView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericContainsContainsBitsView; +}; +using ContainsContainsBitsView = + GenericContainsContainsBitsView; +using ContainsContainsBitsWriter = + GenericContainsContainsBitsView; + +template +struct EmbossReservedInternalIsGenericContainsContainsBitsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericContainsContainsBitsView< + GenericContainsContainsBitsView> { + static constexpr const bool value = true; +}; + +template +inline GenericContainsContainsBitsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeContainsContainsBitsView( T &&emboss_reserved_local_arg) { + return GenericContainsContainsBitsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericContainsContainsBitsView> +MakeContainsContainsBitsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericContainsContainsBitsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericContainsContainsBitsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedContainsContainsBitsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericContainsContainsBitsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace ConditionalInline { + + + + + +namespace Type0 { + +} // namespace Type0 + + +template +struct EmbossReservedInternalIsGenericType0View; + +template +class GenericType0View final { + public: + GenericType0View() : backing_() {} + explicit GenericType0View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericType0View( + const GenericType0View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericType0View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericType0View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericType0View &operator=( + const GenericType0View &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericType0View 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 + bool UncheckedEquals( + GenericType0View 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 + void UncheckedCopyFrom( + GenericType0View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericType0View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericType0View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + c().IsAggregate() || c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + c() const; + ::emboss::support::Maybe 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericType0View; +}; +using Type0View = + GenericType0View; +using Type0Writer = + GenericType0View; + +template +struct EmbossReservedInternalIsGenericType0View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericType0View< + GenericType0View> { + static constexpr const bool value = true; +}; + +template +inline GenericType0View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeType0View( T &&emboss_reserved_local_arg) { + return GenericType0View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericType0View> +MakeType0View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericType0View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericType0View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedType0View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericType0View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + +namespace Type1 { + +} // namespace Type1 + + +template +struct EmbossReservedInternalIsGenericType1View; + +template +class GenericType1View final { + public: + GenericType1View() : backing_() {} + explicit GenericType1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericType1View( + const GenericType1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericType1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericType1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericType1View &operator=( + const GenericType1View &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericType1View 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 + bool UncheckedEquals( + GenericType1View 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 + void UncheckedCopyFrom( + GenericType1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericType1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericType1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + c().IsAggregate() || c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + c() const; + ::emboss::support::Maybe 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericType1View; +}; +using Type1View = + GenericType1View; +using Type1Writer = + GenericType1View; + +template +struct EmbossReservedInternalIsGenericType1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericType1View< + GenericType1View> { + static constexpr const bool value = true; +}; + +template +inline GenericType1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeType1View( T &&emboss_reserved_local_arg) { + return GenericType1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericType1View> +MakeType1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericType1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericType1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedType1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericType1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace ConditionalInline + + +template +struct EmbossReservedInternalIsGenericConditionalInlineView; + +template +class GenericConditionalInlineView final { + public: + GenericConditionalInlineView() : backing_() {} + explicit GenericConditionalInlineView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConditionalInlineView( + const GenericConditionalInlineView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConditionalInlineView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConditionalInlineView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConditionalInlineView &operator=( + const GenericConditionalInlineView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_payload_id().Known()) return false; + if (has_payload_id().ValueOrDefault() && !payload_id().Ok()) return false; + + + if (!has_type_0().Known()) return false; + if (has_type_0().ValueOrDefault() && !type_0().Ok()) return false; + + + if (!has_type_1().Known()) return false; + if (has_type_1().ValueOrDefault() && !type_1().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericConditionalInlineView emboss_reserved_local_other) const { + + if (!has_payload_id().Known()) return false; + if (!emboss_reserved_local_other.has_payload_id().Known()) return false; + + if (emboss_reserved_local_other.has_payload_id().ValueOrDefault() && + !has_payload_id().ValueOrDefault()) + return false; + if (has_payload_id().ValueOrDefault() && + !emboss_reserved_local_other.has_payload_id().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_payload_id().ValueOrDefault() && + has_payload_id().ValueOrDefault() && + !payload_id().Equals(emboss_reserved_local_other.payload_id())) + return false; + + + + if (!has_type_0().Known()) return false; + if (!emboss_reserved_local_other.has_type_0().Known()) return false; + + if (emboss_reserved_local_other.has_type_0().ValueOrDefault() && + !has_type_0().ValueOrDefault()) + return false; + if (has_type_0().ValueOrDefault() && + !emboss_reserved_local_other.has_type_0().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_type_0().ValueOrDefault() && + has_type_0().ValueOrDefault() && + !type_0().Equals(emboss_reserved_local_other.type_0())) + return false; + + + + if (!has_type_1().Known()) return false; + if (!emboss_reserved_local_other.has_type_1().Known()) return false; + + if (emboss_reserved_local_other.has_type_1().ValueOrDefault() && + !has_type_1().ValueOrDefault()) + return false; + if (has_type_1().ValueOrDefault() && + !emboss_reserved_local_other.has_type_1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_type_1().ValueOrDefault() && + has_type_1().ValueOrDefault() && + !type_1().Equals(emboss_reserved_local_other.type_1())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConditionalInlineView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_payload_id().ValueOr(false) && + !has_payload_id().ValueOr(false)) + return false; + if (has_payload_id().ValueOr(false) && + !emboss_reserved_local_other.has_payload_id().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_payload_id().ValueOr(false) && + has_payload_id().ValueOr(false) && + !payload_id().UncheckedEquals(emboss_reserved_local_other.payload_id())) + return false; + + + + if (emboss_reserved_local_other.has_type_0().ValueOr(false) && + !has_type_0().ValueOr(false)) + return false; + if (has_type_0().ValueOr(false) && + !emboss_reserved_local_other.has_type_0().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_type_0().ValueOr(false) && + has_type_0().ValueOr(false) && + !type_0().UncheckedEquals(emboss_reserved_local_other.type_0())) + return false; + + + + if (emboss_reserved_local_other.has_type_1().ValueOr(false) && + !has_type_1().ValueOr(false)) + return false; + if (has_type_1().ValueOr(false) && + !emboss_reserved_local_other.has_type_1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_type_1().ValueOr(false) && + has_type_1().ValueOr(false) && + !type_1().UncheckedEquals(emboss_reserved_local_other.type_1())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConditionalInlineView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConditionalInlineView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConditionalInlineView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "payload_id") { + if (!payload_id().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "type_0") { + if (!type_0().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "type_1") { + if (!type_1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_payload_id().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + payload_id().IsAggregate() || payload_id().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("payload_id: "); + payload_id().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !payload_id().IsAggregate() && !payload_id().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("# payload_id: UNREADABLE\n"); + } + } + + if (has_type_0().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + type_0().IsAggregate() || type_0().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("type_0: "); + type_0().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !type_0().IsAggregate() && !type_0().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("# type_0: UNREADABLE\n"); + } + } + + if (has_type_1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + type_1().IsAggregate() || type_1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("type_1: "); + type_1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !type_1().IsAggregate() && !type_1().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("# type_1: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + payload_id() const; + ::emboss::support::Maybe has_payload_id() const; + + public: + typename ::emboss::test::ConditionalInline::GenericType0View> + + type_0() const; + ::emboss::support::Maybe has_type_0() const; + + public: + typename ::emboss::test::ConditionalInline::GenericType1View> + + type_1() const; + ::emboss::support::Maybe has_type_1() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericConditionalInlineView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.payload_id(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(4LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Choice(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(4LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6); + + return emboss_reserved_local_subexpr_7; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericConditionalInlineView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConditionalInlineView; +}; +using ConditionalInlineView = + GenericConditionalInlineView; +using ConditionalInlineWriter = + GenericConditionalInlineView; + +template +struct EmbossReservedInternalIsGenericConditionalInlineView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConditionalInlineView< + GenericConditionalInlineView> { + static constexpr const bool value = true; +}; + +template +inline GenericConditionalInlineView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConditionalInlineView( T &&emboss_reserved_local_arg) { + return GenericConditionalInlineView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConditionalInlineView> +MakeConditionalInlineView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalInlineView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConditionalInlineView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConditionalInlineView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalInlineView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + +namespace ConditionalAnonymous { + + + + + +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View; + +template +class GenericEmbossReservedAnonymousField2View final { + public: + GenericEmbossReservedAnonymousField2View() : backing_() {} + explicit GenericEmbossReservedAnonymousField2View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField2View( + const GenericEmbossReservedAnonymousField2View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField2View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField2View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField2View &operator=( + const GenericEmbossReservedAnonymousField2View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_low().Known()) return false; + if (has_low().ValueOrDefault() && !low().Ok()) return false; + + + if (!has_mid().Known()) return false; + if (has_mid().ValueOrDefault() && !mid().Ok()) return false; + + + if (!has_high().Known()) return false; + if (has_high().ValueOrDefault() && !high().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + + if (!has_low().Known()) return false; + if (!emboss_reserved_local_other.has_low().Known()) return false; + + if (emboss_reserved_local_other.has_low().ValueOrDefault() && + !has_low().ValueOrDefault()) + return false; + if (has_low().ValueOrDefault() && + !emboss_reserved_local_other.has_low().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_low().ValueOrDefault() && + has_low().ValueOrDefault() && + !low().Equals(emboss_reserved_local_other.low())) + return false; + + + + if (!has_mid().Known()) return false; + if (!emboss_reserved_local_other.has_mid().Known()) return false; + + if (emboss_reserved_local_other.has_mid().ValueOrDefault() && + !has_mid().ValueOrDefault()) + return false; + if (has_mid().ValueOrDefault() && + !emboss_reserved_local_other.has_mid().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_mid().ValueOrDefault() && + has_mid().ValueOrDefault() && + !mid().Equals(emboss_reserved_local_other.mid())) + return false; + + + + if (!has_high().Known()) return false; + if (!emboss_reserved_local_other.has_high().Known()) return false; + + if (emboss_reserved_local_other.has_high().ValueOrDefault() && + !has_high().ValueOrDefault()) + return false; + if (has_high().ValueOrDefault() && + !emboss_reserved_local_other.has_high().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_high().ValueOrDefault() && + has_high().ValueOrDefault() && + !high().Equals(emboss_reserved_local_other.high())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_low().ValueOr(false) && + !has_low().ValueOr(false)) + return false; + if (has_low().ValueOr(false) && + !emboss_reserved_local_other.has_low().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_low().ValueOr(false) && + has_low().ValueOr(false) && + !low().UncheckedEquals(emboss_reserved_local_other.low())) + return false; + + + + if (emboss_reserved_local_other.has_mid().ValueOr(false) && + !has_mid().ValueOr(false)) + return false; + if (has_mid().ValueOr(false) && + !emboss_reserved_local_other.has_mid().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_mid().ValueOr(false) && + has_mid().ValueOr(false) && + !mid().UncheckedEquals(emboss_reserved_local_other.mid())) + return false; + + + + if (emboss_reserved_local_other.has_high().ValueOr(false) && + !has_high().ValueOr(false)) + return false; + if (has_high().ValueOr(false) && + !emboss_reserved_local_other.has_high().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_high().ValueOr(false) && + has_high().ValueOr(false) && + !high().UncheckedEquals(emboss_reserved_local_other.high())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "low") { + if (!low().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "mid") { + if (!mid().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "high") { + if (!high().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_low().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + low().IsAggregate() || low().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("low: "); + low().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !low().IsAggregate() && !low().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("# low: UNREADABLE\n"); + } + } + + if (has_mid().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + mid().IsAggregate() || mid().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("mid: "); + mid().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !mid().IsAggregate() && !mid().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("# mid: UNREADABLE\n"); + } + } + + if (has_high().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + high().IsAggregate() || high().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("high: "); + high().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !high().IsAggregate() && !high().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("# high: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + low() const; + ::emboss::support::Maybe has_low() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<2, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + mid() const; + ::emboss::support::Maybe has_mid() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + high() const; + ::emboss::support::Maybe has_high() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField2View; +}; +using EmbossReservedAnonymousField2View = + GenericEmbossReservedAnonymousField2View; +using EmbossReservedAnonymousField2Writer = + GenericEmbossReservedAnonymousField2View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< + GenericEmbossReservedAnonymousField2View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField2View> +MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField2View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField2View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace ConditionalAnonymous + + +template +struct EmbossReservedInternalIsGenericConditionalAnonymousView; + +template +class GenericConditionalAnonymousView final { + public: + GenericConditionalAnonymousView() : backing_() {} + explicit GenericConditionalAnonymousView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConditionalAnonymousView( + const GenericConditionalAnonymousView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConditionalAnonymousView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConditionalAnonymousView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConditionalAnonymousView &operator=( + const GenericConditionalAnonymousView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_emboss_reserved_anonymous_field_2().Known()) return false; + if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) return false; + + + if (!has_low().Known()) return false; + if (has_low().ValueOrDefault() && !low().Ok()) return false; + + + if (!has_mid().Known()) return false; + if (has_mid().ValueOrDefault() && !mid().Ok()) return false; + + + if (!has_high().Known()) return false; + if (has_high().ValueOrDefault() && !high().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericConditionalAnonymousView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_emboss_reserved_anonymous_field_2().Known()) return false; + if (!emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().Known()) return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !has_emboss_reserved_anonymous_field_2().ValueOrDefault()) + return false; + if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !emboss_reserved_anonymous_field_2().Equals(emboss_reserved_local_other.emboss_reserved_anonymous_field_2())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConditionalAnonymousView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !has_emboss_reserved_anonymous_field_2().ValueOr(false)) + return false; + if (has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && + has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !emboss_reserved_anonymous_field_2().UncheckedEquals(emboss_reserved_local_other.emboss_reserved_anonymous_field_2())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConditionalAnonymousView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConditionalAnonymousView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConditionalAnonymousView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "low") { + if (!low().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "mid") { + if (!mid().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "high") { + if (!high().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_low().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + low().IsAggregate() || low().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("low: "); + low().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !low().IsAggregate() && !low().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("# low: UNREADABLE\n"); + } + } + + if (has_mid().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + mid().IsAggregate() || mid().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("mid: "); + mid().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !mid().IsAggregate() && !mid().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("# mid: UNREADABLE\n"); + } + } + + if (has_high().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + high().IsAggregate() || high().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("high: "); + high().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !high().IsAggregate() && !high().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("# high: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + private: + typename ::emboss::test::ConditionalAnonymous::GenericEmbossReservedAnonymousField2View>, 8>> + + emboss_reserved_anonymous_field_2() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + + public: + auto low() const -> decltype(this->emboss_reserved_anonymous_field_2().low()) { + return has_low().ValueOrDefault() ? emboss_reserved_anonymous_field_2().low() + : decltype(this->emboss_reserved_anonymous_field_2().low())(); + } + ::emboss::support::Maybe has_low() const; + + public: + auto mid() const -> decltype(this->emboss_reserved_anonymous_field_2().mid()) { + return has_mid().ValueOrDefault() ? emboss_reserved_anonymous_field_2().mid() + : decltype(this->emboss_reserved_anonymous_field_2().mid())(); + } + ::emboss::support::Maybe has_mid() const; + + public: + auto high() const -> decltype(this->emboss_reserved_anonymous_field_2().high()) { + return has_high().ValueOrDefault() ? emboss_reserved_anonymous_field_2().high() + : decltype(this->emboss_reserved_anonymous_field_2().high())(); + } + ::emboss::support::Maybe has_high() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericConditionalAnonymousView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericConditionalAnonymousView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConditionalAnonymousView; +}; +using ConditionalAnonymousView = + GenericConditionalAnonymousView; +using ConditionalAnonymousWriter = + GenericConditionalAnonymousView; + +template +struct EmbossReservedInternalIsGenericConditionalAnonymousView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConditionalAnonymousView< + GenericConditionalAnonymousView> { + static constexpr const bool value = true; +}; + +template +inline GenericConditionalAnonymousView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConditionalAnonymousView( T &&emboss_reserved_local_arg) { + return GenericConditionalAnonymousView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConditionalAnonymousView> +MakeConditionalAnonymousView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalAnonymousView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConditionalAnonymousView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConditionalAnonymousView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalAnonymousView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace ConditionalOnFlag { + + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; + +template +class GenericEmbossReservedAnonymousField1View final { + public: + GenericEmbossReservedAnonymousField1View() : backing_() {} + explicit GenericEmbossReservedAnonymousField1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField1View( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField1View &operator=( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_enabled().Known()) return false; + if (has_enabled().ValueOrDefault() && !enabled().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (!has_enabled().Known()) return false; + if (!emboss_reserved_local_other.has_enabled().Known()) return false; + + if (emboss_reserved_local_other.has_enabled().ValueOrDefault() && + !has_enabled().ValueOrDefault()) + return false; + if (has_enabled().ValueOrDefault() && + !emboss_reserved_local_other.has_enabled().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_enabled().ValueOrDefault() && + has_enabled().ValueOrDefault() && + !enabled().Equals(emboss_reserved_local_other.enabled())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_enabled().ValueOr(false) && + !has_enabled().ValueOr(false)) + return false; + if (has_enabled().ValueOr(false) && + !emboss_reserved_local_other.has_enabled().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_enabled().ValueOr(false) && + has_enabled().ValueOr(false) && + !enabled().UncheckedEquals(emboss_reserved_local_other.enabled())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "enabled") { + if (!enabled().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_enabled().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + enabled().IsAggregate() || enabled().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("enabled: "); + enabled().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !enabled().IsAggregate() && !enabled().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("# enabled: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + enabled() const; + ::emboss::support::Maybe has_enabled() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField1View; +}; +using EmbossReservedAnonymousField1View = + GenericEmbossReservedAnonymousField1View; +using EmbossReservedAnonymousField1Writer = + GenericEmbossReservedAnonymousField1View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< + GenericEmbossReservedAnonymousField1View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField1View> +MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace ConditionalOnFlag + + +template +struct EmbossReservedInternalIsGenericConditionalOnFlagView; + +template +class GenericConditionalOnFlagView final { + public: + GenericConditionalOnFlagView() : backing_() {} + explicit GenericConditionalOnFlagView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConditionalOnFlagView( + const GenericConditionalOnFlagView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConditionalOnFlagView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConditionalOnFlagView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConditionalOnFlagView &operator=( + const GenericConditionalOnFlagView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) 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_enabled().Known()) return false; + if (has_enabled().ValueOrDefault() && !enabled().Ok()) return false; + + + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericConditionalOnFlagView emboss_reserved_local_other) const { + + 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_value().Known()) return false; + if (!emboss_reserved_local_other.has_value().Known()) return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + !has_value().ValueOrDefault()) + return false; + if (has_value().ValueOrDefault() && + !emboss_reserved_local_other.has_value().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + has_value().ValueOrDefault() && + !value().Equals(emboss_reserved_local_other.value())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConditionalOnFlagView emboss_reserved_local_other) const { + + 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_value().ValueOr(false) && + !has_value().ValueOr(false)) + return false; + if (has_value().ValueOr(false) && + !emboss_reserved_local_other.has_value().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + has_value().ValueOr(false) && + !value().UncheckedEquals(emboss_reserved_local_other.value())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConditionalOnFlagView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConditionalOnFlagView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConditionalOnFlagView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "enabled") { + if (!enabled().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "value") { + if (!value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_enabled().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + enabled().IsAggregate() || enabled().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("enabled: "); + enabled().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !enabled().IsAggregate() && !enabled().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("# enabled: UNREADABLE\n"); + } + } + + if (has_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value: "); + value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value().IsAggregate() && !value().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("# value: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + typename ::emboss::test::ConditionalOnFlag::GenericEmbossReservedAnonymousField1View>, 8>> + + emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + + public: + auto enabled() const -> decltype(this->emboss_reserved_anonymous_field_1().enabled()) { + return has_enabled().ValueOrDefault() ? emboss_reserved_anonymous_field_1().enabled() + : decltype(this->emboss_reserved_anonymous_field_1().enabled())(); + } + ::emboss::support::Maybe has_enabled() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + value() const; + ::emboss::support::Maybe has_value() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericConditionalOnFlagView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.enabled(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Choice(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_3); + + return emboss_reserved_local_subexpr_4; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericConditionalOnFlagView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConditionalOnFlagView; +}; +using ConditionalOnFlagView = + GenericConditionalOnFlagView; +using ConditionalOnFlagWriter = + GenericConditionalOnFlagView; + +template +struct EmbossReservedInternalIsGenericConditionalOnFlagView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConditionalOnFlagView< + GenericConditionalOnFlagView> { + static constexpr const bool value = true; +}; + +template +inline GenericConditionalOnFlagView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConditionalOnFlagView( T &&emboss_reserved_local_arg) { + return GenericConditionalOnFlagView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConditionalOnFlagView> +MakeConditionalOnFlagView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalOnFlagView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConditionalOnFlagView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConditionalOnFlagView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConditionalOnFlagView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace BasicConditional { + +} // namespace BasicConditional + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericBasicConditionalView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBasicConditionalView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericBasicConditionalView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBasicConditionalView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename GenericBasicConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericBasicConditionalView::IntrinsicSizeInBytes() const { + return + typename GenericBasicConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericBasicConditionalView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace BasicConditional { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace BasicConditional + +template +inline constexpr ::std::int32_t +GenericBasicConditionalView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return BasicConditional::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBasicConditionalView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return BasicConditional::MaxSizeInBytes(); +} + +namespace BasicConditional { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace BasicConditional + +template +inline constexpr ::std::int32_t +GenericBasicConditionalView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return BasicConditional::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBasicConditionalView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return BasicConditional::MinSizeInBytes(); +} +namespace NegativeConditional { + +} // namespace NegativeConditional + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeConditionalView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeConditionalView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeConditionalView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeConditionalView::has_xc() const { + return ::emboss::support::NotEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename GenericNegativeConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericNegativeConditionalView::IntrinsicSizeInBytes() const { + return + typename GenericNegativeConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericNegativeConditionalView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace NegativeConditional { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace NegativeConditional + +template +inline constexpr ::std::int32_t +GenericNegativeConditionalView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return NegativeConditional::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNegativeConditionalView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return NegativeConditional::MaxSizeInBytes(); +} + +namespace NegativeConditional { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace NegativeConditional + +template +inline constexpr ::std::int32_t +GenericNegativeConditionalView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return NegativeConditional::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNegativeConditionalView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return NegativeConditional::MinSizeInBytes(); +} +namespace ConditionalAndUnconditionalOverlappingFinalField { + +} // namespace ConditionalAndUnconditionalOverlappingFinalField + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalAndUnconditionalOverlappingFinalFieldView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAndUnconditionalOverlappingFinalFieldView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalAndUnconditionalOverlappingFinalFieldView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAndUnconditionalOverlappingFinalFieldView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalAndUnconditionalOverlappingFinalFieldView::z() + const { + + if ( has_z().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAndUnconditionalOverlappingFinalFieldView::has_z() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConditionalAndUnconditionalOverlappingFinalField { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionalAndUnconditionalOverlappingFinalField + +template +inline constexpr ::std::int32_t +GenericConditionalAndUnconditionalOverlappingFinalFieldView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ConditionalAndUnconditionalOverlappingFinalField::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalAndUnconditionalOverlappingFinalFieldView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ConditionalAndUnconditionalOverlappingFinalField::IntrinsicSizeInBytes(); +} + +namespace ConditionalAndUnconditionalOverlappingFinalField { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionalAndUnconditionalOverlappingFinalField + +template +inline constexpr ::std::int32_t +GenericConditionalAndUnconditionalOverlappingFinalFieldView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConditionalAndUnconditionalOverlappingFinalField::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalAndUnconditionalOverlappingFinalFieldView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConditionalAndUnconditionalOverlappingFinalField::MaxSizeInBytes(); +} + +namespace ConditionalAndUnconditionalOverlappingFinalField { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionalAndUnconditionalOverlappingFinalField + +template +inline constexpr ::std::int32_t +GenericConditionalAndUnconditionalOverlappingFinalFieldView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConditionalAndUnconditionalOverlappingFinalField::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalAndUnconditionalOverlappingFinalFieldView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConditionalAndUnconditionalOverlappingFinalField::MinSizeInBytes(); +} +namespace ConditionalBasicConditionalFieldFirst { + +} // namespace ConditionalBasicConditionalFieldFirst + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalBasicConditionalFieldFirstView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalBasicConditionalFieldFirstView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalBasicConditionalFieldFirstView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalBasicConditionalFieldFirstView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +namespace ConditionalBasicConditionalFieldFirst { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionalBasicConditionalFieldFirst + +template +inline constexpr ::std::int32_t +GenericConditionalBasicConditionalFieldFirstView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ConditionalBasicConditionalFieldFirst::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalBasicConditionalFieldFirstView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ConditionalBasicConditionalFieldFirst::IntrinsicSizeInBytes(); +} + +namespace ConditionalBasicConditionalFieldFirst { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionalBasicConditionalFieldFirst + +template +inline constexpr ::std::int32_t +GenericConditionalBasicConditionalFieldFirstView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConditionalBasicConditionalFieldFirst::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalBasicConditionalFieldFirstView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConditionalBasicConditionalFieldFirst::MaxSizeInBytes(); +} + +namespace ConditionalBasicConditionalFieldFirst { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionalBasicConditionalFieldFirst + +template +inline constexpr ::std::int32_t +GenericConditionalBasicConditionalFieldFirstView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConditionalBasicConditionalFieldFirst::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalBasicConditionalFieldFirstView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConditionalBasicConditionalFieldFirst::MinSizeInBytes(); +} +namespace ConditionalAndDynamicLocation { + +} // namespace ConditionalAndDynamicLocation + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalAndDynamicLocationView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAndDynamicLocationView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalAndDynamicLocationView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAndDynamicLocationView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalAndDynamicLocationView::xc() + const { + + if ( has_xc().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = y(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAndDynamicLocationView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename GenericConditionalAndDynamicLocationView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericConditionalAndDynamicLocationView::IntrinsicSizeInBytes() const { + return + typename GenericConditionalAndDynamicLocationView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAndDynamicLocationView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConditionalAndDynamicLocation { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(256LL)).ValueOrDefault(); +} +} // namespace ConditionalAndDynamicLocation + +template +inline constexpr ::std::int32_t +GenericConditionalAndDynamicLocationView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConditionalAndDynamicLocation::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalAndDynamicLocationView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConditionalAndDynamicLocation::MaxSizeInBytes(); +} + +namespace ConditionalAndDynamicLocation { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace ConditionalAndDynamicLocation + +template +inline constexpr ::std::int32_t +GenericConditionalAndDynamicLocationView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConditionalAndDynamicLocation::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalAndDynamicLocationView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConditionalAndDynamicLocation::MinSizeInBytes(); +} +namespace ConditionUsesMinInt { + +} // namespace ConditionUsesMinInt + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionUsesMinIntView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionUsesMinIntView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionUsesMinIntView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionUsesMinIntView::has_xc() const { + return ::emboss::support::Equal(::emboss::support::Difference((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(9223372036854775680LL))), ::emboss::support::Maybe(static_cast(-9223372036854775807LL - 1))); +} + + +template +inline typename GenericConditionUsesMinIntView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericConditionUsesMinIntView::IntrinsicSizeInBytes() const { + return + typename GenericConditionUsesMinIntView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericConditionUsesMinIntView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConditionUsesMinInt { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionUsesMinInt + +template +inline constexpr ::std::int32_t +GenericConditionUsesMinIntView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConditionUsesMinInt::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionUsesMinIntView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConditionUsesMinInt::MaxSizeInBytes(); +} + +namespace ConditionUsesMinInt { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ConditionUsesMinInt + +template +inline constexpr ::std::int32_t +GenericConditionUsesMinIntView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConditionUsesMinInt::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionUsesMinIntView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConditionUsesMinInt::MinSizeInBytes(); +} +namespace NestedConditional { + +} // namespace NestedConditional + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNestedConditionalView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNestedConditionalView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNestedConditionalView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNestedConditionalView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNestedConditionalView::xcc() + const { + + if ( has_xcc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNestedConditionalView::has_xcc() const { + return ::emboss::support::Equal((xc().Ok() ? ::emboss::support::Maybe(static_cast(xc().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename GenericNestedConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericNestedConditionalView::IntrinsicSizeInBytes() const { + return + typename GenericNestedConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericNestedConditionalView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace NestedConditional { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace NestedConditional + +template +inline constexpr ::std::int32_t +GenericNestedConditionalView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return NestedConditional::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNestedConditionalView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return NestedConditional::MaxSizeInBytes(); +} + +namespace NestedConditional { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace NestedConditional + +template +inline constexpr ::std::int32_t +GenericNestedConditionalView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return NestedConditional::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNestedConditionalView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return NestedConditional::MinSizeInBytes(); +} +namespace CorrectNestedConditional { + +} // namespace CorrectNestedConditional + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericCorrectNestedConditionalView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericCorrectNestedConditionalView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericCorrectNestedConditionalView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericCorrectNestedConditionalView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericCorrectNestedConditionalView::xcc() + const { + + if ( has_xcc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericCorrectNestedConditionalView::has_xcc() const { + return ::emboss::support::And(::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))), ::emboss::support::Equal((xc().Ok() ? ::emboss::support::Maybe(static_cast(xc().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL)))); +} + + +template +inline typename GenericCorrectNestedConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericCorrectNestedConditionalView::IntrinsicSizeInBytes() const { + return + typename GenericCorrectNestedConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericCorrectNestedConditionalView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace CorrectNestedConditional { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace CorrectNestedConditional + +template +inline constexpr ::std::int32_t +GenericCorrectNestedConditionalView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return CorrectNestedConditional::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericCorrectNestedConditionalView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return CorrectNestedConditional::MaxSizeInBytes(); +} + +namespace CorrectNestedConditional { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace CorrectNestedConditional + +template +inline constexpr ::std::int32_t +GenericCorrectNestedConditionalView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return CorrectNestedConditional::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericCorrectNestedConditionalView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return CorrectNestedConditional::MinSizeInBytes(); +} +namespace AlwaysFalseCondition { + +} // namespace AlwaysFalseCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAlwaysFalseConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlwaysFalseConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAlwaysFalseConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlwaysFalseConditionView::has_xc() const { + return ::emboss::support::Maybe(false); +} + + +namespace AlwaysFalseCondition { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace AlwaysFalseCondition + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return AlwaysFalseCondition::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return AlwaysFalseCondition::IntrinsicSizeInBytes(); +} + +namespace AlwaysFalseCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace AlwaysFalseCondition + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return AlwaysFalseCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return AlwaysFalseCondition::MaxSizeInBytes(); +} + +namespace AlwaysFalseCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace AlwaysFalseCondition + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return AlwaysFalseCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return AlwaysFalseCondition::MinSizeInBytes(); +} +namespace OnlyAlwaysFalseCondition { + +} // namespace OnlyAlwaysFalseCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericOnlyAlwaysFalseConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOnlyAlwaysFalseConditionView::has_xc() const { + return ::emboss::support::Maybe(false); +} + + +namespace OnlyAlwaysFalseCondition { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace OnlyAlwaysFalseCondition + +template +inline constexpr ::std::int32_t +GenericOnlyAlwaysFalseConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return OnlyAlwaysFalseCondition::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOnlyAlwaysFalseConditionView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return OnlyAlwaysFalseCondition::IntrinsicSizeInBytes(); +} + +namespace OnlyAlwaysFalseCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace OnlyAlwaysFalseCondition + +template +inline constexpr ::std::int32_t +GenericOnlyAlwaysFalseConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return OnlyAlwaysFalseCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOnlyAlwaysFalseConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return OnlyAlwaysFalseCondition::MaxSizeInBytes(); +} + +namespace OnlyAlwaysFalseCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace OnlyAlwaysFalseCondition + +template +inline constexpr ::std::int32_t +GenericOnlyAlwaysFalseConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return OnlyAlwaysFalseCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOnlyAlwaysFalseConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return OnlyAlwaysFalseCondition::MinSizeInBytes(); +} +namespace EmptyStruct { + +} // namespace EmptyStruct + + +namespace EmptyStruct { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace EmptyStruct + +template +inline constexpr ::std::int32_t +GenericEmptyStructView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return EmptyStruct::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericEmptyStructView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return EmptyStruct::IntrinsicSizeInBytes(); +} + +namespace EmptyStruct { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace EmptyStruct + +template +inline constexpr ::std::int32_t +GenericEmptyStructView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return EmptyStruct::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericEmptyStructView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return EmptyStruct::MaxSizeInBytes(); +} + +namespace EmptyStruct { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace EmptyStruct + +template +inline constexpr ::std::int32_t +GenericEmptyStructView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return EmptyStruct::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericEmptyStructView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return EmptyStruct::MinSizeInBytes(); +} +namespace AlwaysFalseConditionDynamicSize { + +} // namespace AlwaysFalseConditionDynamicSize + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAlwaysFalseConditionDynamicSizeView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlwaysFalseConditionDynamicSizeView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAlwaysFalseConditionDynamicSizeView::y() + const { + + if ( has_y().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlwaysFalseConditionDynamicSizeView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAlwaysFalseConditionDynamicSizeView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlwaysFalseConditionDynamicSizeView::has_xc() const { + return ::emboss::support::Maybe(false); +} + + +template +inline typename GenericAlwaysFalseConditionDynamicSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericAlwaysFalseConditionDynamicSizeView::IntrinsicSizeInBytes() const { + return + typename GenericAlwaysFalseConditionDynamicSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAlwaysFalseConditionDynamicSizeView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace AlwaysFalseConditionDynamicSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(256LL)).ValueOrDefault(); +} +} // namespace AlwaysFalseConditionDynamicSize + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionDynamicSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return AlwaysFalseConditionDynamicSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionDynamicSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return AlwaysFalseConditionDynamicSize::MaxSizeInBytes(); +} + +namespace AlwaysFalseConditionDynamicSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace AlwaysFalseConditionDynamicSize + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionDynamicSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return AlwaysFalseConditionDynamicSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlwaysFalseConditionDynamicSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return AlwaysFalseConditionDynamicSize::MinSizeInBytes(); +} +namespace ConditionDoesNotContributeToSize { + +} // namespace ConditionDoesNotContributeToSize + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionDoesNotContributeToSizeView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionDoesNotContributeToSizeView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionDoesNotContributeToSizeView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionDoesNotContributeToSizeView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionDoesNotContributeToSizeView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionDoesNotContributeToSizeView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConditionDoesNotContributeToSize { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace ConditionDoesNotContributeToSize + +template +inline constexpr ::std::int32_t +GenericConditionDoesNotContributeToSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ConditionDoesNotContributeToSize::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionDoesNotContributeToSizeView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ConditionDoesNotContributeToSize::IntrinsicSizeInBytes(); +} + +namespace ConditionDoesNotContributeToSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace ConditionDoesNotContributeToSize + +template +inline constexpr ::std::int32_t +GenericConditionDoesNotContributeToSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConditionDoesNotContributeToSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionDoesNotContributeToSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConditionDoesNotContributeToSize::MaxSizeInBytes(); +} + +namespace ConditionDoesNotContributeToSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace ConditionDoesNotContributeToSize + +template +inline constexpr ::std::int32_t +GenericConditionDoesNotContributeToSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConditionDoesNotContributeToSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionDoesNotContributeToSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConditionDoesNotContributeToSize::MinSizeInBytes(); +} +namespace EnumCondition { + +} // namespace EnumCondition + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::OnOff, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericEnumConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::OnOff, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::OnOff, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericEnumConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumConditionView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericEnumConditionView::xc2() + const { + + if ( has_xc2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumConditionView::has_xc2() const { + return ::emboss::support::GreaterThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))); +} + + +template +inline typename GenericEnumConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericEnumConditionView::IntrinsicSizeInBytes() const { + return + typename GenericEnumConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericEnumConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace EnumCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace EnumCondition + +template +inline constexpr ::std::int32_t +GenericEnumConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return EnumCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericEnumConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return EnumCondition::MaxSizeInBytes(); +} + +namespace EnumCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace EnumCondition + +template +inline constexpr ::std::int32_t +GenericEnumConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return EnumCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericEnumConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return EnumCondition::MinSizeInBytes(); +} +namespace NegativeEnumCondition { + +} // namespace NegativeEnumCondition + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::OnOff, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeEnumConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::OnOff, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::OnOff, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeEnumConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeEnumConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeEnumConditionView::has_xc() const { + return ::emboss::support::NotEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); +} + + +template +inline typename GenericNegativeEnumConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericNegativeEnumConditionView::IntrinsicSizeInBytes() const { + return + typename GenericNegativeEnumConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericNegativeEnumConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace NegativeEnumCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace NegativeEnumCondition + +template +inline constexpr ::std::int32_t +GenericNegativeEnumConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return NegativeEnumCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNegativeEnumConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return NegativeEnumCondition::MaxSizeInBytes(); +} + +namespace NegativeEnumCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace NegativeEnumCondition + +template +inline constexpr ::std::int32_t +GenericNegativeEnumConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return NegativeEnumCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNegativeEnumConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return NegativeEnumCondition::MinSizeInBytes(); +} +namespace LessThanCondition { + +} // namespace LessThanCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericLessThanConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLessThanConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericLessThanConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLessThanConditionView::has_xc() const { + return ::emboss::support::LessThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); +} + + +template +inline typename GenericLessThanConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericLessThanConditionView::IntrinsicSizeInBytes() const { + return + typename GenericLessThanConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericLessThanConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace LessThanCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace LessThanCondition + +template +inline constexpr ::std::int32_t +GenericLessThanConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return LessThanCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLessThanConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return LessThanCondition::MaxSizeInBytes(); +} + +namespace LessThanCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace LessThanCondition + +template +inline constexpr ::std::int32_t +GenericLessThanConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return LessThanCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLessThanConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return LessThanCondition::MinSizeInBytes(); +} +namespace LessThanOrEqualCondition { + +} // namespace LessThanOrEqualCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericLessThanOrEqualConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLessThanOrEqualConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericLessThanOrEqualConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericLessThanOrEqualConditionView::has_xc() const { + return ::emboss::support::LessThanOrEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); +} + + +template +inline typename GenericLessThanOrEqualConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericLessThanOrEqualConditionView::IntrinsicSizeInBytes() const { + return + typename GenericLessThanOrEqualConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericLessThanOrEqualConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace LessThanOrEqualCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace LessThanOrEqualCondition + +template +inline constexpr ::std::int32_t +GenericLessThanOrEqualConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return LessThanOrEqualCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLessThanOrEqualConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return LessThanOrEqualCondition::MaxSizeInBytes(); +} + +namespace LessThanOrEqualCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace LessThanOrEqualCondition + +template +inline constexpr ::std::int32_t +GenericLessThanOrEqualConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return LessThanOrEqualCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericLessThanOrEqualConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return LessThanOrEqualCondition::MinSizeInBytes(); +} +namespace GreaterThanOrEqualCondition { + +} // namespace GreaterThanOrEqualCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericGreaterThanOrEqualConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericGreaterThanOrEqualConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericGreaterThanOrEqualConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericGreaterThanOrEqualConditionView::has_xc() const { + return ::emboss::support::GreaterThanOrEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); +} + + +template +inline typename GenericGreaterThanOrEqualConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericGreaterThanOrEqualConditionView::IntrinsicSizeInBytes() const { + return + typename GenericGreaterThanOrEqualConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericGreaterThanOrEqualConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace GreaterThanOrEqualCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace GreaterThanOrEqualCondition + +template +inline constexpr ::std::int32_t +GenericGreaterThanOrEqualConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return GreaterThanOrEqualCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericGreaterThanOrEqualConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return GreaterThanOrEqualCondition::MaxSizeInBytes(); +} + +namespace GreaterThanOrEqualCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace GreaterThanOrEqualCondition + +template +inline constexpr ::std::int32_t +GenericGreaterThanOrEqualConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return GreaterThanOrEqualCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericGreaterThanOrEqualConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return GreaterThanOrEqualCondition::MinSizeInBytes(); +} +namespace GreaterThanCondition { + +} // namespace GreaterThanCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericGreaterThanConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericGreaterThanConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericGreaterThanConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericGreaterThanConditionView::has_xc() const { + return ::emboss::support::GreaterThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))); +} + + +template +inline typename GenericGreaterThanConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericGreaterThanConditionView::IntrinsicSizeInBytes() const { + return + typename GenericGreaterThanConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericGreaterThanConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace GreaterThanCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace GreaterThanCondition + +template +inline constexpr ::std::int32_t +GenericGreaterThanConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return GreaterThanCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericGreaterThanConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return GreaterThanCondition::MaxSizeInBytes(); +} + +namespace GreaterThanCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace GreaterThanCondition + +template +inline constexpr ::std::int32_t +GenericGreaterThanConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return GreaterThanCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericGreaterThanConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return GreaterThanCondition::MinSizeInBytes(); +} +namespace RangeCondition { + +} // namespace RangeCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRangeConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRangeConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRangeConditionView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRangeConditionView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRangeConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRangeConditionView::has_xc() const { + return ::emboss::support::And(::emboss::support::And(::emboss::support::LessThan(::emboss::support::Maybe(static_cast(5LL)), (x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::LessThanOrEqual((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), (y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()))), ::emboss::support::LessThan((y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL)))); +} + + +template +inline typename GenericRangeConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericRangeConditionView::IntrinsicSizeInBytes() const { + return + typename GenericRangeConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRangeConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace RangeCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace RangeCondition + +template +inline constexpr ::std::int32_t +GenericRangeConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return RangeCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRangeConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return RangeCondition::MaxSizeInBytes(); +} + +namespace RangeCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace RangeCondition + +template +inline constexpr ::std::int32_t +GenericRangeConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return RangeCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRangeConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return RangeCondition::MinSizeInBytes(); +} +namespace ReverseRangeCondition { + +} // namespace ReverseRangeCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericReverseRangeConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericReverseRangeConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericReverseRangeConditionView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericReverseRangeConditionView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericReverseRangeConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericReverseRangeConditionView::has_xc() const { + return ::emboss::support::And(::emboss::support::And(::emboss::support::GreaterThan(::emboss::support::Maybe(static_cast(10LL)), (y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::GreaterThanOrEqual((y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()), (x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()))), ::emboss::support::GreaterThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); +} + + +template +inline typename GenericReverseRangeConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericReverseRangeConditionView::IntrinsicSizeInBytes() const { + return + typename GenericReverseRangeConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericReverseRangeConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ReverseRangeCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace ReverseRangeCondition + +template +inline constexpr ::std::int32_t +GenericReverseRangeConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ReverseRangeCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericReverseRangeConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ReverseRangeCondition::MaxSizeInBytes(); +} + +namespace ReverseRangeCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ReverseRangeCondition + +template +inline constexpr ::std::int32_t +GenericReverseRangeConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ReverseRangeCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericReverseRangeConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ReverseRangeCondition::MinSizeInBytes(); +} +namespace AndCondition { + +} // namespace AndCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAndConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAndConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAndConditionView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAndConditionView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAndConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAndConditionView::has_xc() const { + return ::emboss::support::And(::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::Equal((y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); +} + + +template +inline typename GenericAndConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericAndConditionView::IntrinsicSizeInBytes() const { + return + typename GenericAndConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAndConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace AndCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace AndCondition + +template +inline constexpr ::std::int32_t +GenericAndConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return AndCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAndConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return AndCondition::MaxSizeInBytes(); +} + +namespace AndCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace AndCondition + +template +inline constexpr ::std::int32_t +GenericAndConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return AndCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAndConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return AndCondition::MinSizeInBytes(); +} +namespace OrCondition { + +} // namespace OrCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericOrConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOrConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericOrConditionView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOrConditionView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericOrConditionView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOrConditionView::has_xc() const { + return ::emboss::support::Or(::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL))), ::emboss::support::Equal((y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(5LL)))); +} + + +template +inline typename GenericOrConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericOrConditionView::IntrinsicSizeInBytes() const { + return + typename GenericOrConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericOrConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace OrCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace OrCondition + +template +inline constexpr ::std::int32_t +GenericOrConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return OrCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOrConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return OrCondition::MaxSizeInBytes(); +} + +namespace OrCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace OrCondition + +template +inline constexpr ::std::int32_t +GenericOrConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return OrCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOrConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return OrCondition::MinSizeInBytes(); +} +namespace ChoiceCondition { + +} // namespace ChoiceCondition + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::ChoiceCondition::Field, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericChoiceConditionView::field() + const { + + if ( has_field().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::ChoiceCondition::Field, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::ChoiceCondition::Field, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericChoiceConditionView::has_field() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericChoiceConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericChoiceConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericChoiceConditionView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericChoiceConditionView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericChoiceConditionView::xyc() + const { + + if ( has_xyc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericChoiceConditionView::has_xyc() const { + return ::emboss::support::Equal(::emboss::support::Choice(::emboss::support::Equal((field().Ok() ? ::emboss::support::Maybe(static_cast(field().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))), (x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), (y().Ok() ? ::emboss::support::Maybe(static_cast(y().UncheckedRead())) : ::emboss::support::Maybe())), ::emboss::support::Maybe(static_cast(5LL))); +} + + +template +inline typename GenericChoiceConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericChoiceConditionView::IntrinsicSizeInBytes() const { + return + typename GenericChoiceConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericChoiceConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ChoiceCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace ChoiceCondition + +template +inline constexpr ::std::int32_t +GenericChoiceConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ChoiceCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericChoiceConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ChoiceCondition::MaxSizeInBytes(); +} + +namespace ChoiceCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace ChoiceCondition + +template +inline constexpr ::std::int32_t +GenericChoiceConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ChoiceCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericChoiceConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ChoiceCondition::MinSizeInBytes(); +} +namespace ContainsBits { +namespace EmbossReservedAnonymousField3 { + +} // namespace EmbossReservedAnonymousField3 + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField3View::has_top() + const { + + if ( has_has_top().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(7LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 7>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField3View::has_has_top() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField3View::has_bottom() + const { + + if ( has_has_bottom().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField3View::has_has_bottom() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField3 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField3 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField3View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField3::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField3View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField3::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField3 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField3 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField3View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField3::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField3View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField3::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField3 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField3 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField3View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField3::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField3View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField3::MinSizeInBits(); +} + +} // namespace ContainsBits + + +template +inline typename ::emboss::test::ContainsBits::GenericEmbossReservedAnonymousField3View>, 8>> + + GenericContainsBitsView::emboss_reserved_anonymous_field_3() + const { + + if ( has_emboss_reserved_anonymous_field_3().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::ContainsBits::GenericEmbossReservedAnonymousField3View>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::ContainsBits::GenericEmbossReservedAnonymousField3View>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericContainsBitsView::has_emboss_reserved_anonymous_field_3() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericContainsBitsView::has_has_top() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericContainsBitsView::has_has_bottom() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +namespace ContainsBits { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ContainsBits + +template +inline constexpr ::std::int32_t +GenericContainsBitsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ContainsBits::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericContainsBitsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ContainsBits::IntrinsicSizeInBytes(); +} + +namespace ContainsBits { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ContainsBits + +template +inline constexpr ::std::int32_t +GenericContainsBitsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ContainsBits::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericContainsBitsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ContainsBits::MaxSizeInBytes(); +} + +namespace ContainsBits { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ContainsBits + +template +inline constexpr ::std::int32_t +GenericContainsBitsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ContainsBits::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericContainsBitsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ContainsBits::MinSizeInBytes(); +} +namespace ContainsContainsBits { + +} // namespace ContainsContainsBits + + +template +inline typename ::emboss::test::GenericContainsBitsView> + + GenericContainsContainsBitsView::condition() + const { + + if ( has_condition().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericContainsBitsView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericContainsBitsView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericContainsContainsBitsView::has_condition() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericContainsContainsBitsView::top() + const { + + if ( has_top().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericContainsContainsBitsView::has_top() const { + return ::emboss::support::Equal((condition().has_top().Ok() ? ::emboss::support::Maybe(static_cast(condition().has_top().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); +} + + +template +inline typename GenericContainsContainsBitsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericContainsContainsBitsView::IntrinsicSizeInBytes() const { + return + typename GenericContainsContainsBitsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericContainsContainsBitsView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ContainsContainsBits { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ContainsContainsBits + +template +inline constexpr ::std::int32_t +GenericContainsContainsBitsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ContainsContainsBits::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericContainsContainsBitsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ContainsContainsBits::MaxSizeInBytes(); +} + +namespace ContainsContainsBits { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ContainsContainsBits + +template +inline constexpr ::std::int32_t +GenericContainsContainsBitsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ContainsContainsBits::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericContainsContainsBitsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ContainsContainsBits::MinSizeInBytes(); +} +namespace ConditionalInline { +namespace Type0 { + +} // namespace Type0 + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericType0View::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericType0View::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericType0View::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericType0View::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericType0View::c() + const { + + if ( has_c().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericType0View::has_c() const { + return ::emboss::support::Maybe(true); +} + + +namespace Type0 { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace Type0 + +template +inline constexpr ::std::int32_t +GenericType0View::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Type0::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericType0View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Type0::IntrinsicSizeInBytes(); +} + +namespace Type0 { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace Type0 + +template +inline constexpr ::std::int32_t +GenericType0View::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Type0::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericType0View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Type0::MaxSizeInBytes(); +} + +namespace Type0 { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace Type0 + +template +inline constexpr ::std::int32_t +GenericType0View::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Type0::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericType0View< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Type0::MinSizeInBytes(); +} + +namespace Type1 { + +} // namespace Type1 + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericType1View::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericType1View::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericType1View::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericType1View::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericType1View::c() + const { + + if ( has_c().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericType1View::has_c() const { + return ::emboss::support::Maybe(true); +} + + +namespace Type1 { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace Type1 + +template +inline constexpr ::std::int32_t +GenericType1View::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Type1::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericType1View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Type1::IntrinsicSizeInBytes(); +} + +namespace Type1 { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace Type1 + +template +inline constexpr ::std::int32_t +GenericType1View::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Type1::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericType1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Type1::MaxSizeInBytes(); +} + +namespace Type1 { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace Type1 + +template +inline constexpr ::std::int32_t +GenericType1View::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Type1::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericType1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Type1::MinSizeInBytes(); +} + +} // namespace ConditionalInline + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalInlineView::payload_id() + const { + + if ( has_payload_id().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalInlineView::has_payload_id() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::ConditionalInline::GenericType0View> + + GenericConditionalInlineView::type_0() + const { + + if ( has_type_0().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::ConditionalInline::GenericType0View> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::ConditionalInline::GenericType0View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalInlineView::has_type_0() const { + return ::emboss::support::Equal((payload_id().Ok() ? ::emboss::support::Maybe(static_cast(payload_id().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename ::emboss::test::ConditionalInline::GenericType1View> + + GenericConditionalInlineView::type_1() + const { + + if ( has_type_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::ConditionalInline::GenericType1View> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::ConditionalInline::GenericType1View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalInlineView::has_type_1() const { + return ::emboss::support::Equal((payload_id().Ok() ? ::emboss::support::Maybe(static_cast(payload_id().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); +} + + +template +inline typename GenericConditionalInlineView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericConditionalInlineView::IntrinsicSizeInBytes() const { + return + typename GenericConditionalInlineView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericConditionalInlineView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConditionalInline { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace ConditionalInline + +template +inline constexpr ::std::int32_t +GenericConditionalInlineView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConditionalInline::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalInlineView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConditionalInline::MaxSizeInBytes(); +} + +namespace ConditionalInline { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ConditionalInline + +template +inline constexpr ::std::int32_t +GenericConditionalInlineView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConditionalInline::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalInlineView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConditionalInline::MinSizeInBytes(); +} +namespace ConditionalAnonymous { +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::low() + const { + + if ( has_low().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_low() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<2, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::mid() + const { + + if ( has_mid().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<2, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<2, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_mid() const { + return ::emboss::support::Equal((low().Ok() ? ::emboss::support::Maybe(static_cast(low().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::high() + const { + + if ( has_high().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(7LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 7>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_high() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::MinSizeInBits(); +} + +} // namespace ConditionalAnonymous + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalAnonymousView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAnonymousView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::ConditionalAnonymous::GenericEmbossReservedAnonymousField2View>, 8>> + + GenericConditionalAnonymousView::emboss_reserved_anonymous_field_2() + const { + + if ( has_emboss_reserved_anonymous_field_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::ConditionalAnonymous::GenericEmbossReservedAnonymousField2View>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::ConditionalAnonymous::GenericEmbossReservedAnonymousField2View>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAnonymousView::has_emboss_reserved_anonymous_field_2() const { + return ::emboss::support::GreaterThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); +} + + +template +inline ::emboss::support::Maybe +GenericConditionalAnonymousView::has_low() const { + return ::emboss::support::And(has_emboss_reserved_anonymous_field_2(), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericConditionalAnonymousView::has_mid() const { + return ::emboss::support::And(has_emboss_reserved_anonymous_field_2(), emboss_reserved_anonymous_field_2().has_mid()); +} + + +template +inline ::emboss::support::Maybe +GenericConditionalAnonymousView::has_high() const { + return ::emboss::support::And(has_emboss_reserved_anonymous_field_2(), ::emboss::support::Maybe(true)); +} + + +template +inline typename GenericConditionalAnonymousView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericConditionalAnonymousView::IntrinsicSizeInBytes() const { + return + typename GenericConditionalAnonymousView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericConditionalAnonymousView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConditionalAnonymous { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionalAnonymous + +template +inline constexpr ::std::int32_t +GenericConditionalAnonymousView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConditionalAnonymous::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalAnonymousView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConditionalAnonymous::MaxSizeInBytes(); +} + +namespace ConditionalAnonymous { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ConditionalAnonymous + +template +inline constexpr ::std::int32_t +GenericConditionalAnonymousView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConditionalAnonymous::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalAnonymousView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConditionalAnonymous::MinSizeInBytes(); +} +namespace ConditionalOnFlag { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::enabled() + const { + + if ( has_enabled().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_enabled() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +} // namespace ConditionalOnFlag + + +template +inline typename ::emboss::test::ConditionalOnFlag::GenericEmbossReservedAnonymousField1View>, 8>> + + GenericConditionalOnFlagView::emboss_reserved_anonymous_field_1() + const { + + if ( has_emboss_reserved_anonymous_field_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::ConditionalOnFlag::GenericEmbossReservedAnonymousField1View>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::ConditionalOnFlag::GenericEmbossReservedAnonymousField1View>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalOnFlagView::has_emboss_reserved_anonymous_field_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericConditionalOnFlagView::has_enabled() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConditionalOnFlagView::value() + const { + + if ( has_value().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConditionalOnFlagView::has_value() const { + return (enabled().Ok() ? ::emboss::support::Maybe(static_cast(enabled().UncheckedRead())) : ::emboss::support::Maybe()); +} + + +template +inline typename GenericConditionalOnFlagView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericConditionalOnFlagView::IntrinsicSizeInBytes() const { + return + typename GenericConditionalOnFlagView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericConditionalOnFlagView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConditionalOnFlag { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace ConditionalOnFlag + +template +inline constexpr ::std::int32_t +GenericConditionalOnFlagView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConditionalOnFlag::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalOnFlagView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConditionalOnFlag::MaxSizeInBytes(); +} + +namespace ConditionalOnFlag { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ConditionalOnFlag + +template +inline constexpr ::std::int32_t +GenericConditionalOnFlagView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConditionalOnFlag::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConditionalOnFlagView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConditionalOnFlag::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_CONDITION_EMB_H_ + diff --git a/testdata/golden_cpp/cpp_namespace.emb.h b/testdata/golden_cpp/cpp_namespace.emb.h new file mode 100644 index 00000000..9fa38e42 --- /dev/null +++ b/testdata/golden_cpp/cpp_namespace.emb.h @@ -0,0 +1,126 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_CPP_NAMESPACE_EMB_H_ +#define TESTDATA_CPP_NAMESPACE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace no_leading_double_colon { +enum class Foo : ::std::uint64_t; + + +enum class Foo : ::std::uint64_t { + VALUE = static_cast(11LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Foo *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("VALUE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Foo::VALUE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Foo emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Foo::VALUE: return "VALUE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Foo emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Foo::VALUE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Foo 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::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, + Foo *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Foo emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Foo emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Foo emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + +} // namespace no_leading_double_colon + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_CPP_NAMESPACE_EMB_H_ + diff --git a/testdata/golden_cpp/dynamic_size.emb.h b/testdata/golden_cpp/dynamic_size.emb.h new file mode 100644 index 00000000..8c5f5b57 --- /dev/null +++ b/testdata/golden_cpp/dynamic_size.emb.h @@ -0,0 +1,10433 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_DYNAMIC_SIZE_EMB_H_ +#define TESTDATA_DYNAMIC_SIZE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Message { + +} // namespace Message + + +template +class GenericMessageView; + +namespace Image { + +} // namespace Image + + +template +class GenericImageView; + +namespace TwoRegions { + +} // namespace TwoRegions + + +template +class GenericTwoRegionsView; + +namespace MultipliedSize { + +} // namespace MultipliedSize + + +template +class GenericMultipliedSizeView; + +namespace NegativeTermsInSizes { + +} // namespace NegativeTermsInSizes + + +template +class GenericNegativeTermsInSizesView; + +namespace NegativeTermInLocation { + +} // namespace NegativeTermInLocation + + +template +class GenericNegativeTermInLocationView; + +namespace ChainedSize { + +} // namespace ChainedSize + + +template +class GenericChainedSizeView; + +namespace FinalFieldOverlaps { + +} // namespace FinalFieldOverlaps + + +template +class GenericFinalFieldOverlapsView; + +namespace DynamicFinalFieldOverlaps { + +} // namespace DynamicFinalFieldOverlaps + + +template +class GenericDynamicFinalFieldOverlapsView; + +namespace DynamicFieldDependsOnLaterField { + +} // namespace DynamicFieldDependsOnLaterField + + +template +class GenericDynamicFieldDependsOnLaterFieldView; + +namespace DynamicFieldDoesNotAffectSize { + +} // namespace DynamicFieldDoesNotAffectSize + + +template +class GenericDynamicFieldDoesNotAffectSizeView; + + + + + + + + + +namespace Message { + +} // namespace Message + + +template +struct EmbossReservedInternalIsGenericMessageView; + +template +class GenericMessageView final { + public: + GenericMessageView() : backing_() {} + explicit GenericMessageView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericMessageView( + const GenericMessageView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericMessageView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericMessageView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericMessageView &operator=( + const GenericMessageView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_header_length().Known()) return false; + if (has_header_length().ValueOrDefault() && !header_length().Ok()) return false; + + + if (!has_message_length().Known()) return false; + if (has_message_length().ValueOrDefault() && !message_length().Ok()) return false; + + + if (!has_padding().Known()) return false; + if (has_padding().ValueOrDefault() && !padding().Ok()) return false; + + + if (!has_message().Known()) return false; + if (has_message().ValueOrDefault() && !message().Ok()) return false; + + + if (!has_crc32().Known()) return false; + if (has_crc32().ValueOrDefault() && !crc32().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericMessageView emboss_reserved_local_other) const { + + if (!has_header_length().Known()) return false; + if (!emboss_reserved_local_other.has_header_length().Known()) return false; + + if (emboss_reserved_local_other.has_header_length().ValueOrDefault() && + !has_header_length().ValueOrDefault()) + return false; + if (has_header_length().ValueOrDefault() && + !emboss_reserved_local_other.has_header_length().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_header_length().ValueOrDefault() && + has_header_length().ValueOrDefault() && + !header_length().Equals(emboss_reserved_local_other.header_length())) + return false; + + + + if (!has_message_length().Known()) return false; + if (!emboss_reserved_local_other.has_message_length().Known()) return false; + + if (emboss_reserved_local_other.has_message_length().ValueOrDefault() && + !has_message_length().ValueOrDefault()) + return false; + if (has_message_length().ValueOrDefault() && + !emboss_reserved_local_other.has_message_length().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_message_length().ValueOrDefault() && + has_message_length().ValueOrDefault() && + !message_length().Equals(emboss_reserved_local_other.message_length())) + return false; + + + + if (!has_padding().Known()) return false; + if (!emboss_reserved_local_other.has_padding().Known()) return false; + + if (emboss_reserved_local_other.has_padding().ValueOrDefault() && + !has_padding().ValueOrDefault()) + return false; + if (has_padding().ValueOrDefault() && + !emboss_reserved_local_other.has_padding().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_padding().ValueOrDefault() && + has_padding().ValueOrDefault() && + !padding().Equals(emboss_reserved_local_other.padding())) + return false; + + + + if (!has_message().Known()) return false; + if (!emboss_reserved_local_other.has_message().Known()) return false; + + if (emboss_reserved_local_other.has_message().ValueOrDefault() && + !has_message().ValueOrDefault()) + return false; + if (has_message().ValueOrDefault() && + !emboss_reserved_local_other.has_message().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_message().ValueOrDefault() && + has_message().ValueOrDefault() && + !message().Equals(emboss_reserved_local_other.message())) + return false; + + + + if (!has_crc32().Known()) return false; + if (!emboss_reserved_local_other.has_crc32().Known()) return false; + + if (emboss_reserved_local_other.has_crc32().ValueOrDefault() && + !has_crc32().ValueOrDefault()) + return false; + if (has_crc32().ValueOrDefault() && + !emboss_reserved_local_other.has_crc32().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_crc32().ValueOrDefault() && + has_crc32().ValueOrDefault() && + !crc32().Equals(emboss_reserved_local_other.crc32())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericMessageView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_header_length().ValueOr(false) && + !has_header_length().ValueOr(false)) + return false; + if (has_header_length().ValueOr(false) && + !emboss_reserved_local_other.has_header_length().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_header_length().ValueOr(false) && + has_header_length().ValueOr(false) && + !header_length().UncheckedEquals(emboss_reserved_local_other.header_length())) + return false; + + + + if (emboss_reserved_local_other.has_message_length().ValueOr(false) && + !has_message_length().ValueOr(false)) + return false; + if (has_message_length().ValueOr(false) && + !emboss_reserved_local_other.has_message_length().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_message_length().ValueOr(false) && + has_message_length().ValueOr(false) && + !message_length().UncheckedEquals(emboss_reserved_local_other.message_length())) + return false; + + + + if (emboss_reserved_local_other.has_padding().ValueOr(false) && + !has_padding().ValueOr(false)) + return false; + if (has_padding().ValueOr(false) && + !emboss_reserved_local_other.has_padding().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_padding().ValueOr(false) && + has_padding().ValueOr(false) && + !padding().UncheckedEquals(emboss_reserved_local_other.padding())) + return false; + + + + if (emboss_reserved_local_other.has_message().ValueOr(false) && + !has_message().ValueOr(false)) + return false; + if (has_message().ValueOr(false) && + !emboss_reserved_local_other.has_message().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_message().ValueOr(false) && + has_message().ValueOr(false) && + !message().UncheckedEquals(emboss_reserved_local_other.message())) + return false; + + + + if (emboss_reserved_local_other.has_crc32().ValueOr(false) && + !has_crc32().ValueOr(false)) + return false; + if (has_crc32().ValueOr(false) && + !emboss_reserved_local_other.has_crc32().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_crc32().ValueOr(false) && + has_crc32().ValueOr(false) && + !crc32().UncheckedEquals(emboss_reserved_local_other.crc32())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericMessageView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericMessageView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericMessageView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "header_length") { + if (!header_length().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "message_length") { + if (!message_length().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "padding") { + if (!padding().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "message") { + if (!message().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "crc32") { + if (!crc32().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_header_length().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + header_length().IsAggregate() || header_length().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("header_length: "); + header_length().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !header_length().IsAggregate() && !header_length().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("# header_length: UNREADABLE\n"); + } + } + + if (has_message_length().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + message_length().IsAggregate() || message_length().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("message_length: "); + message_length().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !message_length().IsAggregate() && !message_length().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("# message_length: UNREADABLE\n"); + } + } + + if (has_padding().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + padding().IsAggregate() || padding().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("padding: "); + padding().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !padding().IsAggregate() && !padding().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("# padding: UNREADABLE\n"); + } + } + + if (has_message().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + message().IsAggregate() || message().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("message: "); + message().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !message().IsAggregate() && !message().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("# message: UNREADABLE\n"); + } + } + + if (has_crc32().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + crc32().IsAggregate() || crc32().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("crc32: "); + crc32().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !crc32().IsAggregate() && !crc32().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("# crc32: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + header_length() const; + ::emboss::support::Maybe has_header_length() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + message_length() const; + ::emboss::support::Maybe has_message_length() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + padding() const; + ::emboss::support::Maybe has_padding() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + message() const; + ::emboss::support::Maybe has_message() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + crc32() const; + ::emboss::support::Maybe has_crc32() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericMessageView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.header_length(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_3); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = view_.message_length(); + const auto emboss_reserved_local_subexpr_7 = (emboss_reserved_local_subexpr_6.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_6.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_7); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Sum(emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_10, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_12 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_5, emboss_reserved_local_subexpr_9, emboss_reserved_local_subexpr_11); + + return emboss_reserved_local_subexpr_12; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericMessageView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericMessageView; +}; +using MessageView = + GenericMessageView; +using MessageWriter = + GenericMessageView; + +template +struct EmbossReservedInternalIsGenericMessageView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericMessageView< + GenericMessageView> { + static constexpr const bool value = true; +}; + +template +inline GenericMessageView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeMessageView( T &&emboss_reserved_local_arg) { + return GenericMessageView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericMessageView> +MakeMessageView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericMessageView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericMessageView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedMessageView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericMessageView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace Image { + +} // namespace Image + + +template +struct EmbossReservedInternalIsGenericImageView; + +template +class GenericImageView final { + public: + GenericImageView() : backing_() {} + explicit GenericImageView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericImageView( + const GenericImageView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericImageView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericImageView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericImageView &operator=( + const GenericImageView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_size().Known()) return false; + if (has_size().ValueOrDefault() && !size().Ok()) return false; + + + if (!has_pixels().Known()) return false; + if (has_pixels().ValueOrDefault() && !pixels().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericImageView emboss_reserved_local_other) const { + + if (!has_size().Known()) return false; + if (!emboss_reserved_local_other.has_size().Known()) return false; + + if (emboss_reserved_local_other.has_size().ValueOrDefault() && + !has_size().ValueOrDefault()) + return false; + if (has_size().ValueOrDefault() && + !emboss_reserved_local_other.has_size().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_size().ValueOrDefault() && + has_size().ValueOrDefault() && + !size().Equals(emboss_reserved_local_other.size())) + return false; + + + + if (!has_pixels().Known()) return false; + if (!emboss_reserved_local_other.has_pixels().Known()) return false; + + if (emboss_reserved_local_other.has_pixels().ValueOrDefault() && + !has_pixels().ValueOrDefault()) + return false; + if (has_pixels().ValueOrDefault() && + !emboss_reserved_local_other.has_pixels().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_pixels().ValueOrDefault() && + has_pixels().ValueOrDefault() && + !pixels().Equals(emboss_reserved_local_other.pixels())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericImageView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_size().ValueOr(false) && + !has_size().ValueOr(false)) + return false; + if (has_size().ValueOr(false) && + !emboss_reserved_local_other.has_size().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_size().ValueOr(false) && + has_size().ValueOr(false) && + !size().UncheckedEquals(emboss_reserved_local_other.size())) + return false; + + + + if (emboss_reserved_local_other.has_pixels().ValueOr(false) && + !has_pixels().ValueOr(false)) + return false; + if (has_pixels().ValueOr(false) && + !emboss_reserved_local_other.has_pixels().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_pixels().ValueOr(false) && + has_pixels().ValueOr(false) && + !pixels().UncheckedEquals(emboss_reserved_local_other.pixels())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericImageView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericImageView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericImageView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "size") { + if (!size().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "pixels") { + if (!pixels().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_size().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + size().IsAggregate() || size().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("size: "); + size().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !size().IsAggregate() && !size().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("# size: UNREADABLE\n"); + } + } + + if (has_pixels().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + pixels().IsAggregate() || pixels().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("pixels: "); + pixels().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !pixels().IsAggregate() && !pixels().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("# pixels: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + size() const; + ::emboss::support::Maybe has_size() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType::template OffsetStorageType::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType::template OffsetStorageType::template OffsetStorageType, 1, + 8 > + +, typename Storage::template OffsetStorageType::template OffsetStorageType, 3, + 8 > + +, typename Storage::template OffsetStorageType, 15, + 8 > + + pixels() const; + ::emboss::support::Maybe has_pixels() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericImageView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.size(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(15LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_3); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_5); + + return emboss_reserved_local_subexpr_6; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericImageView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericImageView; +}; +using ImageView = + GenericImageView; +using ImageWriter = + GenericImageView; + +template +struct EmbossReservedInternalIsGenericImageView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericImageView< + GenericImageView> { + static constexpr const bool value = true; +}; + +template +inline GenericImageView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeImageView( T &&emboss_reserved_local_arg) { + return GenericImageView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericImageView> +MakeImageView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericImageView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericImageView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedImageView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericImageView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + +namespace TwoRegions { + +} // namespace TwoRegions + + +template +struct EmbossReservedInternalIsGenericTwoRegionsView; + +template +class GenericTwoRegionsView final { + public: + GenericTwoRegionsView() : backing_() {} + explicit GenericTwoRegionsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericTwoRegionsView( + const GenericTwoRegionsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericTwoRegionsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericTwoRegionsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericTwoRegionsView &operator=( + const GenericTwoRegionsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_b_end().Known()) return false; + if (has_b_end().ValueOrDefault() && !b_end().Ok()) return false; + + + if (!has_b_start().Known()) return false; + if (has_b_start().ValueOrDefault() && !b_start().Ok()) return false; + + + if (!has_a_size().Known()) return false; + if (has_a_size().ValueOrDefault() && !a_size().Ok()) return false; + + + if (!has_a_start().Known()) return false; + if (has_a_start().ValueOrDefault() && !a_start().Ok()) return false; + + + if (!has_region_a().Known()) return false; + if (has_region_a().ValueOrDefault() && !region_a().Ok()) return false; + + + if (!has_region_b().Known()) return false; + if (has_region_b().ValueOrDefault() && !region_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericTwoRegionsView emboss_reserved_local_other) const { + + if (!has_b_end().Known()) return false; + if (!emboss_reserved_local_other.has_b_end().Known()) return false; + + if (emboss_reserved_local_other.has_b_end().ValueOrDefault() && + !has_b_end().ValueOrDefault()) + return false; + if (has_b_end().ValueOrDefault() && + !emboss_reserved_local_other.has_b_end().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_b_end().ValueOrDefault() && + has_b_end().ValueOrDefault() && + !b_end().Equals(emboss_reserved_local_other.b_end())) + return false; + + + + if (!has_b_start().Known()) return false; + if (!emboss_reserved_local_other.has_b_start().Known()) return false; + + if (emboss_reserved_local_other.has_b_start().ValueOrDefault() && + !has_b_start().ValueOrDefault()) + return false; + if (has_b_start().ValueOrDefault() && + !emboss_reserved_local_other.has_b_start().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_b_start().ValueOrDefault() && + has_b_start().ValueOrDefault() && + !b_start().Equals(emboss_reserved_local_other.b_start())) + return false; + + + + if (!has_a_size().Known()) return false; + if (!emboss_reserved_local_other.has_a_size().Known()) return false; + + if (emboss_reserved_local_other.has_a_size().ValueOrDefault() && + !has_a_size().ValueOrDefault()) + return false; + if (has_a_size().ValueOrDefault() && + !emboss_reserved_local_other.has_a_size().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a_size().ValueOrDefault() && + has_a_size().ValueOrDefault() && + !a_size().Equals(emboss_reserved_local_other.a_size())) + return false; + + + + if (!has_a_start().Known()) return false; + if (!emboss_reserved_local_other.has_a_start().Known()) return false; + + if (emboss_reserved_local_other.has_a_start().ValueOrDefault() && + !has_a_start().ValueOrDefault()) + return false; + if (has_a_start().ValueOrDefault() && + !emboss_reserved_local_other.has_a_start().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a_start().ValueOrDefault() && + has_a_start().ValueOrDefault() && + !a_start().Equals(emboss_reserved_local_other.a_start())) + return false; + + + + if (!has_region_a().Known()) return false; + if (!emboss_reserved_local_other.has_region_a().Known()) return false; + + if (emboss_reserved_local_other.has_region_a().ValueOrDefault() && + !has_region_a().ValueOrDefault()) + return false; + if (has_region_a().ValueOrDefault() && + !emboss_reserved_local_other.has_region_a().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_region_a().ValueOrDefault() && + has_region_a().ValueOrDefault() && + !region_a().Equals(emboss_reserved_local_other.region_a())) + return false; + + + + if (!has_region_b().Known()) return false; + if (!emboss_reserved_local_other.has_region_b().Known()) return false; + + if (emboss_reserved_local_other.has_region_b().ValueOrDefault() && + !has_region_b().ValueOrDefault()) + return false; + if (has_region_b().ValueOrDefault() && + !emboss_reserved_local_other.has_region_b().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_region_b().ValueOrDefault() && + has_region_b().ValueOrDefault() && + !region_b().Equals(emboss_reserved_local_other.region_b())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericTwoRegionsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_b_end().ValueOr(false) && + !has_b_end().ValueOr(false)) + return false; + if (has_b_end().ValueOr(false) && + !emboss_reserved_local_other.has_b_end().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_b_end().ValueOr(false) && + has_b_end().ValueOr(false) && + !b_end().UncheckedEquals(emboss_reserved_local_other.b_end())) + return false; + + + + if (emboss_reserved_local_other.has_b_start().ValueOr(false) && + !has_b_start().ValueOr(false)) + return false; + if (has_b_start().ValueOr(false) && + !emboss_reserved_local_other.has_b_start().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_b_start().ValueOr(false) && + has_b_start().ValueOr(false) && + !b_start().UncheckedEquals(emboss_reserved_local_other.b_start())) + return false; + + + + if (emboss_reserved_local_other.has_a_size().ValueOr(false) && + !has_a_size().ValueOr(false)) + return false; + if (has_a_size().ValueOr(false) && + !emboss_reserved_local_other.has_a_size().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a_size().ValueOr(false) && + has_a_size().ValueOr(false) && + !a_size().UncheckedEquals(emboss_reserved_local_other.a_size())) + return false; + + + + if (emboss_reserved_local_other.has_a_start().ValueOr(false) && + !has_a_start().ValueOr(false)) + return false; + if (has_a_start().ValueOr(false) && + !emboss_reserved_local_other.has_a_start().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a_start().ValueOr(false) && + has_a_start().ValueOr(false) && + !a_start().UncheckedEquals(emboss_reserved_local_other.a_start())) + return false; + + + + if (emboss_reserved_local_other.has_region_a().ValueOr(false) && + !has_region_a().ValueOr(false)) + return false; + if (has_region_a().ValueOr(false) && + !emboss_reserved_local_other.has_region_a().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_region_a().ValueOr(false) && + has_region_a().ValueOr(false) && + !region_a().UncheckedEquals(emboss_reserved_local_other.region_a())) + return false; + + + + if (emboss_reserved_local_other.has_region_b().ValueOr(false) && + !has_region_b().ValueOr(false)) + return false; + if (has_region_b().ValueOr(false) && + !emboss_reserved_local_other.has_region_b().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_region_b().ValueOr(false) && + has_region_b().ValueOr(false) && + !region_b().UncheckedEquals(emboss_reserved_local_other.region_b())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericTwoRegionsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericTwoRegionsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericTwoRegionsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "b_end") { + if (!b_end().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "b_start") { + if (!b_start().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "a_size") { + if (!a_size().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "a_start") { + if (!a_start().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "region_a") { + if (!region_a().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "region_b") { + if (!region_b().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_b_end().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b_end().IsAggregate() || b_end().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("b_end: "); + b_end().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !b_end().IsAggregate() && !b_end().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_end: UNREADABLE\n"); + } + } + + if (has_b_start().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b_start().IsAggregate() || b_start().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("b_start: "); + b_start().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !b_start().IsAggregate() && !b_start().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_start: UNREADABLE\n"); + } + } + + if (has_a_size().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_size().IsAggregate() || a_size().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_size: "); + a_size().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_size().IsAggregate() && !a_size().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_size: UNREADABLE\n"); + } + } + + if (has_a_start().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_start().IsAggregate() || a_start().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_start: "); + a_start().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_start().IsAggregate() && !a_start().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_start: UNREADABLE\n"); + } + } + + if (has_region_a().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + region_a().IsAggregate() || region_a().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("region_a: "); + region_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !region_a().IsAggregate() && !region_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("# region_a: UNREADABLE\n"); + } + } + + if (has_region_b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + region_b().IsAggregate() || region_b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("region_b: "); + region_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !region_b().IsAggregate() && !region_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("# region_b: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + b_end() const; + ::emboss::support::Maybe has_b_end() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b_start() const; + ::emboss::support::Maybe has_b_start() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + a_size() const; + ::emboss::support::Maybe has_a_size() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + a_start() const; + ::emboss::support::Maybe has_a_start() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + region_a() const; + ::emboss::support::Maybe has_region_a() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + region_b() const; + ::emboss::support::Maybe has_region_b() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericTwoRegionsView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a_start(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.a_size(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = view_.b_start(); + const auto emboss_reserved_local_subexpr_8 = (emboss_reserved_local_subexpr_7.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_7.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_9 = view_.b_end(); + const auto emboss_reserved_local_subexpr_10 = (emboss_reserved_local_subexpr_9.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_9.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Difference(emboss_reserved_local_subexpr_10, emboss_reserved_local_subexpr_8); + const auto emboss_reserved_local_subexpr_12 = ::emboss::support::Sum(emboss_reserved_local_subexpr_8, emboss_reserved_local_subexpr_11); + const auto emboss_reserved_local_subexpr_13 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_12, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_14 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(4LL)), ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_6, emboss_reserved_local_subexpr_13); + + return emboss_reserved_local_subexpr_14; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericTwoRegionsView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericTwoRegionsView; +}; +using TwoRegionsView = + GenericTwoRegionsView; +using TwoRegionsWriter = + GenericTwoRegionsView; + +template +struct EmbossReservedInternalIsGenericTwoRegionsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericTwoRegionsView< + GenericTwoRegionsView> { + static constexpr const bool value = true; +}; + +template +inline GenericTwoRegionsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeTwoRegionsView( T &&emboss_reserved_local_arg) { + return GenericTwoRegionsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericTwoRegionsView> +MakeTwoRegionsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericTwoRegionsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericTwoRegionsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedTwoRegionsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericTwoRegionsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace MultipliedSize { + +} // namespace MultipliedSize + + +template +struct EmbossReservedInternalIsGenericMultipliedSizeView; + +template +class GenericMultipliedSizeView final { + public: + GenericMultipliedSizeView() : backing_() {} + explicit GenericMultipliedSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericMultipliedSizeView( + const GenericMultipliedSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericMultipliedSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericMultipliedSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericMultipliedSizeView &operator=( + const GenericMultipliedSizeView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_width().Known()) return false; + if (has_width().ValueOrDefault() && !width().Ok()) return false; + + + if (!has_height().Known()) return false; + if (has_height().ValueOrDefault() && !height().Ok()) return false; + + + if (!has_data().Known()) return false; + if (has_data().ValueOrDefault() && !data().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericMultipliedSizeView emboss_reserved_local_other) const { + + if (!has_width().Known()) return false; + if (!emboss_reserved_local_other.has_width().Known()) return false; + + if (emboss_reserved_local_other.has_width().ValueOrDefault() && + !has_width().ValueOrDefault()) + return false; + if (has_width().ValueOrDefault() && + !emboss_reserved_local_other.has_width().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_width().ValueOrDefault() && + has_width().ValueOrDefault() && + !width().Equals(emboss_reserved_local_other.width())) + return false; + + + + if (!has_height().Known()) return false; + if (!emboss_reserved_local_other.has_height().Known()) return false; + + if (emboss_reserved_local_other.has_height().ValueOrDefault() && + !has_height().ValueOrDefault()) + return false; + if (has_height().ValueOrDefault() && + !emboss_reserved_local_other.has_height().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_height().ValueOrDefault() && + has_height().ValueOrDefault() && + !height().Equals(emboss_reserved_local_other.height())) + return false; + + + + if (!has_data().Known()) return false; + if (!emboss_reserved_local_other.has_data().Known()) return false; + + if (emboss_reserved_local_other.has_data().ValueOrDefault() && + !has_data().ValueOrDefault()) + return false; + if (has_data().ValueOrDefault() && + !emboss_reserved_local_other.has_data().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_data().ValueOrDefault() && + has_data().ValueOrDefault() && + !data().Equals(emboss_reserved_local_other.data())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericMultipliedSizeView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_width().ValueOr(false) && + !has_width().ValueOr(false)) + return false; + if (has_width().ValueOr(false) && + !emboss_reserved_local_other.has_width().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_width().ValueOr(false) && + has_width().ValueOr(false) && + !width().UncheckedEquals(emboss_reserved_local_other.width())) + return false; + + + + if (emboss_reserved_local_other.has_height().ValueOr(false) && + !has_height().ValueOr(false)) + return false; + if (has_height().ValueOr(false) && + !emboss_reserved_local_other.has_height().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_height().ValueOr(false) && + has_height().ValueOr(false) && + !height().UncheckedEquals(emboss_reserved_local_other.height())) + return false; + + + + if (emboss_reserved_local_other.has_data().ValueOr(false) && + !has_data().ValueOr(false)) + return false; + if (has_data().ValueOr(false) && + !emboss_reserved_local_other.has_data().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_data().ValueOr(false) && + has_data().ValueOr(false) && + !data().UncheckedEquals(emboss_reserved_local_other.data())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericMultipliedSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericMultipliedSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericMultipliedSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "width") { + if (!width().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "height") { + if (!height().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "data") { + if (!data().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_width().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + width().IsAggregate() || width().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("width: "); + width().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !width().IsAggregate() && !width().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("# width: UNREADABLE\n"); + } + } + + if (has_height().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + height().IsAggregate() || height().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("height: "); + height().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !height().IsAggregate() && !height().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("# height: UNREADABLE\n"); + } + } + + if (has_data().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + data().IsAggregate() || data().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("data: "); + data().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !data().IsAggregate() && !data().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("# data: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + width() const; + ::emboss::support::Maybe has_width() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + height() const; + ::emboss::support::Maybe has_height() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + data() const; + ::emboss::support::Maybe has_data() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericMultipliedSizeView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.width(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.height(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_5); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), 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(true).ValueOr(false); + } + + const GenericMultipliedSizeView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericMultipliedSizeView; +}; +using MultipliedSizeView = + GenericMultipliedSizeView; +using MultipliedSizeWriter = + GenericMultipliedSizeView; + +template +struct EmbossReservedInternalIsGenericMultipliedSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericMultipliedSizeView< + GenericMultipliedSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericMultipliedSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeMultipliedSizeView( T &&emboss_reserved_local_arg) { + return GenericMultipliedSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericMultipliedSizeView> +MakeMultipliedSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericMultipliedSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericMultipliedSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedMultipliedSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericMultipliedSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + + + + +namespace NegativeTermsInSizes { + +} // namespace NegativeTermsInSizes + + +template +struct EmbossReservedInternalIsGenericNegativeTermsInSizesView; + +template +class GenericNegativeTermsInSizesView final { + public: + GenericNegativeTermsInSizesView() : backing_() {} + explicit GenericNegativeTermsInSizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericNegativeTermsInSizesView( + const GenericNegativeTermsInSizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericNegativeTermsInSizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericNegativeTermsInSizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericNegativeTermsInSizesView &operator=( + const GenericNegativeTermsInSizesView &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_a_minus_b().Known()) return false; + if (has_a_minus_b().ValueOrDefault() && !a_minus_b().Ok()) return false; + + + if (!has_a_minus_2b().Known()) return false; + if (has_a_minus_2b().ValueOrDefault() && !a_minus_2b().Ok()) return false; + + + if (!has_a_minus_b_minus_c().Known()) return false; + if (has_a_minus_b_minus_c().ValueOrDefault() && !a_minus_b_minus_c().Ok()) return false; + + + if (!has_ten_minus_a().Known()) return false; + if (has_ten_minus_a().ValueOrDefault() && !ten_minus_a().Ok()) return false; + + + if (!has_a_minus_2c().Known()) return false; + if (has_a_minus_2c().ValueOrDefault() && !a_minus_2c().Ok()) return false; + + + if (!has_a_minus_c().Known()) return false; + if (has_a_minus_c().ValueOrDefault() && !a_minus_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericNegativeTermsInSizesView 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; + + + + if (!has_a_minus_b().Known()) return false; + if (!emboss_reserved_local_other.has_a_minus_b().Known()) return false; + + if (emboss_reserved_local_other.has_a_minus_b().ValueOrDefault() && + !has_a_minus_b().ValueOrDefault()) + return false; + if (has_a_minus_b().ValueOrDefault() && + !emboss_reserved_local_other.has_a_minus_b().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a_minus_b().ValueOrDefault() && + has_a_minus_b().ValueOrDefault() && + !a_minus_b().Equals(emboss_reserved_local_other.a_minus_b())) + return false; + + + + if (!has_a_minus_2b().Known()) return false; + if (!emboss_reserved_local_other.has_a_minus_2b().Known()) return false; + + if (emboss_reserved_local_other.has_a_minus_2b().ValueOrDefault() && + !has_a_minus_2b().ValueOrDefault()) + return false; + if (has_a_minus_2b().ValueOrDefault() && + !emboss_reserved_local_other.has_a_minus_2b().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a_minus_2b().ValueOrDefault() && + has_a_minus_2b().ValueOrDefault() && + !a_minus_2b().Equals(emboss_reserved_local_other.a_minus_2b())) + return false; + + + + if (!has_a_minus_b_minus_c().Known()) return false; + if (!emboss_reserved_local_other.has_a_minus_b_minus_c().Known()) return false; + + if (emboss_reserved_local_other.has_a_minus_b_minus_c().ValueOrDefault() && + !has_a_minus_b_minus_c().ValueOrDefault()) + return false; + if (has_a_minus_b_minus_c().ValueOrDefault() && + !emboss_reserved_local_other.has_a_minus_b_minus_c().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a_minus_b_minus_c().ValueOrDefault() && + has_a_minus_b_minus_c().ValueOrDefault() && + !a_minus_b_minus_c().Equals(emboss_reserved_local_other.a_minus_b_minus_c())) + return false; + + + + if (!has_ten_minus_a().Known()) return false; + if (!emboss_reserved_local_other.has_ten_minus_a().Known()) return false; + + if (emboss_reserved_local_other.has_ten_minus_a().ValueOrDefault() && + !has_ten_minus_a().ValueOrDefault()) + return false; + if (has_ten_minus_a().ValueOrDefault() && + !emboss_reserved_local_other.has_ten_minus_a().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_ten_minus_a().ValueOrDefault() && + has_ten_minus_a().ValueOrDefault() && + !ten_minus_a().Equals(emboss_reserved_local_other.ten_minus_a())) + return false; + + + + if (!has_a_minus_2c().Known()) return false; + if (!emboss_reserved_local_other.has_a_minus_2c().Known()) return false; + + if (emboss_reserved_local_other.has_a_minus_2c().ValueOrDefault() && + !has_a_minus_2c().ValueOrDefault()) + return false; + if (has_a_minus_2c().ValueOrDefault() && + !emboss_reserved_local_other.has_a_minus_2c().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a_minus_2c().ValueOrDefault() && + has_a_minus_2c().ValueOrDefault() && + !a_minus_2c().Equals(emboss_reserved_local_other.a_minus_2c())) + return false; + + + + if (!has_a_minus_c().Known()) return false; + if (!emboss_reserved_local_other.has_a_minus_c().Known()) return false; + + if (emboss_reserved_local_other.has_a_minus_c().ValueOrDefault() && + !has_a_minus_c().ValueOrDefault()) + return false; + if (has_a_minus_c().ValueOrDefault() && + !emboss_reserved_local_other.has_a_minus_c().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a_minus_c().ValueOrDefault() && + has_a_minus_c().ValueOrDefault() && + !a_minus_c().Equals(emboss_reserved_local_other.a_minus_c())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericNegativeTermsInSizesView 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; + + + + if (emboss_reserved_local_other.has_a_minus_b().ValueOr(false) && + !has_a_minus_b().ValueOr(false)) + return false; + if (has_a_minus_b().ValueOr(false) && + !emboss_reserved_local_other.has_a_minus_b().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a_minus_b().ValueOr(false) && + has_a_minus_b().ValueOr(false) && + !a_minus_b().UncheckedEquals(emboss_reserved_local_other.a_minus_b())) + return false; + + + + if (emboss_reserved_local_other.has_a_minus_2b().ValueOr(false) && + !has_a_minus_2b().ValueOr(false)) + return false; + if (has_a_minus_2b().ValueOr(false) && + !emboss_reserved_local_other.has_a_minus_2b().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a_minus_2b().ValueOr(false) && + has_a_minus_2b().ValueOr(false) && + !a_minus_2b().UncheckedEquals(emboss_reserved_local_other.a_minus_2b())) + return false; + + + + if (emboss_reserved_local_other.has_a_minus_b_minus_c().ValueOr(false) && + !has_a_minus_b_minus_c().ValueOr(false)) + return false; + if (has_a_minus_b_minus_c().ValueOr(false) && + !emboss_reserved_local_other.has_a_minus_b_minus_c().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a_minus_b_minus_c().ValueOr(false) && + has_a_minus_b_minus_c().ValueOr(false) && + !a_minus_b_minus_c().UncheckedEquals(emboss_reserved_local_other.a_minus_b_minus_c())) + return false; + + + + if (emboss_reserved_local_other.has_ten_minus_a().ValueOr(false) && + !has_ten_minus_a().ValueOr(false)) + return false; + if (has_ten_minus_a().ValueOr(false) && + !emboss_reserved_local_other.has_ten_minus_a().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_ten_minus_a().ValueOr(false) && + has_ten_minus_a().ValueOr(false) && + !ten_minus_a().UncheckedEquals(emboss_reserved_local_other.ten_minus_a())) + return false; + + + + if (emboss_reserved_local_other.has_a_minus_2c().ValueOr(false) && + !has_a_minus_2c().ValueOr(false)) + return false; + if (has_a_minus_2c().ValueOr(false) && + !emboss_reserved_local_other.has_a_minus_2c().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a_minus_2c().ValueOr(false) && + has_a_minus_2c().ValueOr(false) && + !a_minus_2c().UncheckedEquals(emboss_reserved_local_other.a_minus_2c())) + return false; + + + + if (emboss_reserved_local_other.has_a_minus_c().ValueOr(false) && + !has_a_minus_c().ValueOr(false)) + return false; + if (has_a_minus_c().ValueOr(false) && + !emboss_reserved_local_other.has_a_minus_c().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a_minus_c().ValueOr(false) && + has_a_minus_c().ValueOr(false) && + !a_minus_c().UncheckedEquals(emboss_reserved_local_other.a_minus_c())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericNegativeTermsInSizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericNegativeTermsInSizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericNegativeTermsInSizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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; + } + + if (emboss_reserved_local_name == "a_minus_b") { + if (!a_minus_b().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "a_minus_2b") { + if (!a_minus_2b().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "a_minus_b_minus_c") { + if (!a_minus_b_minus_c().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "ten_minus_a") { + if (!ten_minus_a().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "a_minus_2c") { + if (!a_minus_2c().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "a_minus_c") { + if (!a_minus_c().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + c().IsAggregate() || c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_a_minus_b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_minus_b().IsAggregate() || a_minus_b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_minus_b: "); + a_minus_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_minus_b().IsAggregate() && !a_minus_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("# a_minus_b: UNREADABLE\n"); + } + } + + if (has_a_minus_2b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_minus_2b().IsAggregate() || a_minus_2b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_minus_2b: "); + a_minus_2b().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_minus_2b().IsAggregate() && !a_minus_2b().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_minus_2b: UNREADABLE\n"); + } + } + + if (has_a_minus_b_minus_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_minus_b_minus_c().IsAggregate() || a_minus_b_minus_c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_minus_b_minus_c: "); + a_minus_b_minus_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_minus_b_minus_c().IsAggregate() && !a_minus_b_minus_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("# a_minus_b_minus_c: UNREADABLE\n"); + } + } + + if (has_ten_minus_a().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten_minus_a().IsAggregate() || ten_minus_a().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("ten_minus_a: "); + ten_minus_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !ten_minus_a().IsAggregate() && !ten_minus_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("# ten_minus_a: UNREADABLE\n"); + } + } + + if (has_a_minus_2c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_minus_2c().IsAggregate() || a_minus_2c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_minus_2c: "); + a_minus_2c().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_minus_2c().IsAggregate() && !a_minus_2c().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_minus_2c: UNREADABLE\n"); + } + } + + if (has_a_minus_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_minus_c().IsAggregate() || a_minus_c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_minus_c: "); + a_minus_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_minus_c().IsAggregate() && !a_minus_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("# a_minus_c: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + c() const; + ::emboss::support::Maybe has_c() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + a_minus_b() const; + ::emboss::support::Maybe has_a_minus_b() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + a_minus_2b() const; + ::emboss::support::Maybe has_a_minus_2b() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + a_minus_b_minus_c() const; + ::emboss::support::Maybe has_a_minus_b_minus_c() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + ten_minus_a() const; + ::emboss::support::Maybe has_ten_minus_a() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + a_minus_2c() const; + ::emboss::support::Maybe has_a_minus_2c() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + a_minus_c() const; + ::emboss::support::Maybe has_a_minus_c() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericNegativeTermsInSizesView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.b(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Difference(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(3LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_6); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_9); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Difference(emboss_reserved_local_subexpr_10, ::emboss::support::Maybe(static_cast(3LL))); + const auto emboss_reserved_local_subexpr_12 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_11); + const auto emboss_reserved_local_subexpr_13 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_12, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_14 = view_.c(); + const auto emboss_reserved_local_subexpr_15 = (emboss_reserved_local_subexpr_14.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_14.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_16 = ::emboss::support::Difference(emboss_reserved_local_subexpr_5, emboss_reserved_local_subexpr_15); + const auto emboss_reserved_local_subexpr_17 = ::emboss::support::Difference(emboss_reserved_local_subexpr_16, ::emboss::support::Maybe(static_cast(3LL))); + const auto emboss_reserved_local_subexpr_18 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_17); + const auto emboss_reserved_local_subexpr_19 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_18, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_20 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(7LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_21 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_20); + const auto emboss_reserved_local_subexpr_22 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_21, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_23 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_15); + const auto emboss_reserved_local_subexpr_24 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_23); + const auto emboss_reserved_local_subexpr_25 = ::emboss::support::Difference(emboss_reserved_local_subexpr_24, ::emboss::support::Maybe(static_cast(3LL))); + const auto emboss_reserved_local_subexpr_26 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_25); + const auto emboss_reserved_local_subexpr_27 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_26, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_28 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_15); + const auto emboss_reserved_local_subexpr_29 = ::emboss::support::Difference(emboss_reserved_local_subexpr_28, ::emboss::support::Maybe(static_cast(3LL))); + const auto emboss_reserved_local_subexpr_30 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_29); + const auto emboss_reserved_local_subexpr_31 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_30, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_32 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_8, emboss_reserved_local_subexpr_13, emboss_reserved_local_subexpr_19, emboss_reserved_local_subexpr_22, emboss_reserved_local_subexpr_27, emboss_reserved_local_subexpr_31); + + return emboss_reserved_local_subexpr_32; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericNegativeTermsInSizesView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericNegativeTermsInSizesView; +}; +using NegativeTermsInSizesView = + GenericNegativeTermsInSizesView; +using NegativeTermsInSizesWriter = + GenericNegativeTermsInSizesView; + +template +struct EmbossReservedInternalIsGenericNegativeTermsInSizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericNegativeTermsInSizesView< + GenericNegativeTermsInSizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericNegativeTermsInSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeNegativeTermsInSizesView( T &&emboss_reserved_local_arg) { + return GenericNegativeTermsInSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericNegativeTermsInSizesView> +MakeNegativeTermsInSizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNegativeTermsInSizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericNegativeTermsInSizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedNegativeTermsInSizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNegativeTermsInSizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace NegativeTermInLocation { + +} // namespace NegativeTermInLocation + + +template +struct EmbossReservedInternalIsGenericNegativeTermInLocationView; + +template +class GenericNegativeTermInLocationView final { + public: + GenericNegativeTermInLocationView() : backing_() {} + explicit GenericNegativeTermInLocationView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericNegativeTermInLocationView( + const GenericNegativeTermInLocationView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericNegativeTermInLocationView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericNegativeTermInLocationView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericNegativeTermInLocationView &operator=( + const GenericNegativeTermInLocationView &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericNegativeTermInLocationView 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 + bool UncheckedEquals( + GenericNegativeTermInLocationView 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 + void UncheckedCopyFrom( + GenericNegativeTermInLocationView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericNegativeTermInLocationView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericNegativeTermInLocationView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericNegativeTermInLocationView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_5); + + return emboss_reserved_local_subexpr_6; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericNegativeTermInLocationView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericNegativeTermInLocationView; +}; +using NegativeTermInLocationView = + GenericNegativeTermInLocationView; +using NegativeTermInLocationWriter = + GenericNegativeTermInLocationView; + +template +struct EmbossReservedInternalIsGenericNegativeTermInLocationView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericNegativeTermInLocationView< + GenericNegativeTermInLocationView> { + static constexpr const bool value = true; +}; + +template +inline GenericNegativeTermInLocationView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeNegativeTermInLocationView( T &&emboss_reserved_local_arg) { + return GenericNegativeTermInLocationView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericNegativeTermInLocationView> +MakeNegativeTermInLocationView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNegativeTermInLocationView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericNegativeTermInLocationView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedNegativeTermInLocationView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNegativeTermInLocationView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + +namespace ChainedSize { + +} // namespace ChainedSize + + +template +struct EmbossReservedInternalIsGenericChainedSizeView; + +template +class GenericChainedSizeView final { + public: + GenericChainedSizeView() : backing_() {} + explicit GenericChainedSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericChainedSizeView( + const GenericChainedSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericChainedSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericChainedSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericChainedSizeView &operator=( + const GenericChainedSizeView &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_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericChainedSizeView 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; + + + + 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 + bool UncheckedEquals( + GenericChainedSizeView 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; + + + + 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 + void UncheckedCopyFrom( + GenericChainedSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericChainedSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericChainedSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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; + } + + if (emboss_reserved_local_name == "d") { + if (!d().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + c().IsAggregate() || c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_d().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + d().IsAggregate() || d().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + c() const; + ::emboss::support::Maybe has_c() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + d() const; + ::emboss::support::Maybe has_d() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericChainedSizeView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = view_.b(); + const auto emboss_reserved_local_subexpr_6 = (emboss_reserved_local_subexpr_5.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_5.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Sum(emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_9 = view_.c(); + const auto emboss_reserved_local_subexpr_10 = (emboss_reserved_local_subexpr_9.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_9.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Sum(emboss_reserved_local_subexpr_10, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_12 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_11, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_13 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_8, emboss_reserved_local_subexpr_12); + + return emboss_reserved_local_subexpr_13; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericChainedSizeView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericChainedSizeView; +}; +using ChainedSizeView = + GenericChainedSizeView; +using ChainedSizeWriter = + GenericChainedSizeView; + +template +struct EmbossReservedInternalIsGenericChainedSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericChainedSizeView< + GenericChainedSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericChainedSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeChainedSizeView( T &&emboss_reserved_local_arg) { + return GenericChainedSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericChainedSizeView> +MakeChainedSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericChainedSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericChainedSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedChainedSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericChainedSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace FinalFieldOverlaps { + +} // namespace FinalFieldOverlaps + + +template +struct EmbossReservedInternalIsGenericFinalFieldOverlapsView; + +template +class GenericFinalFieldOverlapsView final { + public: + GenericFinalFieldOverlapsView() : backing_() {} + explicit GenericFinalFieldOverlapsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericFinalFieldOverlapsView( + const GenericFinalFieldOverlapsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericFinalFieldOverlapsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericFinalFieldOverlapsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericFinalFieldOverlapsView &operator=( + const GenericFinalFieldOverlapsView &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericFinalFieldOverlapsView 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 + bool UncheckedEquals( + GenericFinalFieldOverlapsView 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 + void UncheckedCopyFrom( + GenericFinalFieldOverlapsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericFinalFieldOverlapsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericFinalFieldOverlapsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + c().IsAggregate() || c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + c() const; + ::emboss::support::Maybe 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericFinalFieldOverlapsView; +}; +using FinalFieldOverlapsView = + GenericFinalFieldOverlapsView; +using FinalFieldOverlapsWriter = + GenericFinalFieldOverlapsView; + +template +struct EmbossReservedInternalIsGenericFinalFieldOverlapsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericFinalFieldOverlapsView< + GenericFinalFieldOverlapsView> { + static constexpr const bool value = true; +}; + +template +inline GenericFinalFieldOverlapsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeFinalFieldOverlapsView( T &&emboss_reserved_local_arg) { + return GenericFinalFieldOverlapsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericFinalFieldOverlapsView> +MakeFinalFieldOverlapsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFinalFieldOverlapsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericFinalFieldOverlapsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedFinalFieldOverlapsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFinalFieldOverlapsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + +namespace DynamicFinalFieldOverlaps { + +} // namespace DynamicFinalFieldOverlaps + + +template +struct EmbossReservedInternalIsGenericDynamicFinalFieldOverlapsView; + +template +class GenericDynamicFinalFieldOverlapsView final { + public: + GenericDynamicFinalFieldOverlapsView() : backing_() {} + explicit GenericDynamicFinalFieldOverlapsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericDynamicFinalFieldOverlapsView( + const GenericDynamicFinalFieldOverlapsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericDynamicFinalFieldOverlapsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericDynamicFinalFieldOverlapsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericDynamicFinalFieldOverlapsView &operator=( + const GenericDynamicFinalFieldOverlapsView &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_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericDynamicFinalFieldOverlapsView 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; + + + + 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 + bool UncheckedEquals( + GenericDynamicFinalFieldOverlapsView 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; + + + + 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 + void UncheckedCopyFrom( + GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericDynamicFinalFieldOverlapsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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; + } + + if (emboss_reserved_local_name == "d") { + if (!d().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + c().IsAggregate() || c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_d().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + d().IsAggregate() || d().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + c() const; + ::emboss::support::Maybe has_c() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + d() const; + ::emboss::support::Maybe has_d() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericDynamicFinalFieldOverlapsView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Sum(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(10LL)), 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(true).ValueOr(false); + } + + const GenericDynamicFinalFieldOverlapsView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericDynamicFinalFieldOverlapsView; +}; +using DynamicFinalFieldOverlapsView = + GenericDynamicFinalFieldOverlapsView; +using DynamicFinalFieldOverlapsWriter = + GenericDynamicFinalFieldOverlapsView; + +template +struct EmbossReservedInternalIsGenericDynamicFinalFieldOverlapsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericDynamicFinalFieldOverlapsView< + GenericDynamicFinalFieldOverlapsView> { + static constexpr const bool value = true; +}; + +template +inline GenericDynamicFinalFieldOverlapsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeDynamicFinalFieldOverlapsView( T &&emboss_reserved_local_arg) { + return GenericDynamicFinalFieldOverlapsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericDynamicFinalFieldOverlapsView> +MakeDynamicFinalFieldOverlapsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDynamicFinalFieldOverlapsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericDynamicFinalFieldOverlapsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedDynamicFinalFieldOverlapsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDynamicFinalFieldOverlapsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace DynamicFieldDependsOnLaterField { + +} // namespace DynamicFieldDependsOnLaterField + + +template +struct EmbossReservedInternalIsGenericDynamicFieldDependsOnLaterFieldView; + +template +class GenericDynamicFieldDependsOnLaterFieldView final { + public: + GenericDynamicFieldDependsOnLaterFieldView() : backing_() {} + explicit GenericDynamicFieldDependsOnLaterFieldView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericDynamicFieldDependsOnLaterFieldView( + const GenericDynamicFieldDependsOnLaterFieldView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericDynamicFieldDependsOnLaterFieldView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericDynamicFieldDependsOnLaterFieldView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericDynamicFieldDependsOnLaterFieldView &operator=( + const GenericDynamicFieldDependsOnLaterFieldView &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericDynamicFieldDependsOnLaterFieldView 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 + bool UncheckedEquals( + GenericDynamicFieldDependsOnLaterFieldView 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 + void UncheckedCopyFrom( + GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericDynamicFieldDependsOnLaterFieldView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericDynamicFieldDependsOnLaterFieldView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(5LL))); + + return emboss_reserved_local_subexpr_6; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericDynamicFieldDependsOnLaterFieldView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericDynamicFieldDependsOnLaterFieldView; +}; +using DynamicFieldDependsOnLaterFieldView = + GenericDynamicFieldDependsOnLaterFieldView; +using DynamicFieldDependsOnLaterFieldWriter = + GenericDynamicFieldDependsOnLaterFieldView; + +template +struct EmbossReservedInternalIsGenericDynamicFieldDependsOnLaterFieldView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericDynamicFieldDependsOnLaterFieldView< + GenericDynamicFieldDependsOnLaterFieldView> { + static constexpr const bool value = true; +}; + +template +inline GenericDynamicFieldDependsOnLaterFieldView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeDynamicFieldDependsOnLaterFieldView( T &&emboss_reserved_local_arg) { + return GenericDynamicFieldDependsOnLaterFieldView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericDynamicFieldDependsOnLaterFieldView> +MakeDynamicFieldDependsOnLaterFieldView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDynamicFieldDependsOnLaterFieldView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericDynamicFieldDependsOnLaterFieldView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedDynamicFieldDependsOnLaterFieldView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDynamicFieldDependsOnLaterFieldView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace DynamicFieldDoesNotAffectSize { + +} // namespace DynamicFieldDoesNotAffectSize + + +template +struct EmbossReservedInternalIsGenericDynamicFieldDoesNotAffectSizeView; + +template +class GenericDynamicFieldDoesNotAffectSizeView final { + public: + GenericDynamicFieldDoesNotAffectSizeView() : backing_() {} + explicit GenericDynamicFieldDoesNotAffectSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericDynamicFieldDoesNotAffectSizeView( + const GenericDynamicFieldDoesNotAffectSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericDynamicFieldDoesNotAffectSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericDynamicFieldDoesNotAffectSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericDynamicFieldDoesNotAffectSizeView &operator=( + const GenericDynamicFieldDoesNotAffectSizeView &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericDynamicFieldDoesNotAffectSizeView 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 + bool UncheckedEquals( + GenericDynamicFieldDoesNotAffectSizeView 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 + void UncheckedCopyFrom( + GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericDynamicFieldDoesNotAffectSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + c().IsAggregate() || c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + c() const; + ::emboss::support::Maybe 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericDynamicFieldDoesNotAffectSizeView; +}; +using DynamicFieldDoesNotAffectSizeView = + GenericDynamicFieldDoesNotAffectSizeView; +using DynamicFieldDoesNotAffectSizeWriter = + GenericDynamicFieldDoesNotAffectSizeView; + +template +struct EmbossReservedInternalIsGenericDynamicFieldDoesNotAffectSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericDynamicFieldDoesNotAffectSizeView< + GenericDynamicFieldDoesNotAffectSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericDynamicFieldDoesNotAffectSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeDynamicFieldDoesNotAffectSizeView( T &&emboss_reserved_local_arg) { + return GenericDynamicFieldDoesNotAffectSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericDynamicFieldDoesNotAffectSizeView> +MakeDynamicFieldDoesNotAffectSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDynamicFieldDoesNotAffectSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericDynamicFieldDoesNotAffectSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedDynamicFieldDoesNotAffectSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDynamicFieldDoesNotAffectSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Message { + +} // namespace Message + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericMessageView::header_length() + const { + + if ( has_header_length().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMessageView::has_header_length() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericMessageView::message_length() + const { + + if ( has_message_length().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMessageView::has_message_length() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericMessageView::padding() + const { + + if ( has_padding().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = header_length(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericMessageView::has_padding() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericMessageView::message() + const { + + if ( has_message().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = header_length(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = message_length(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_4; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericMessageView::has_message() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericMessageView::crc32() + const { + + if ( has_crc32().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = header_length(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = message_length(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_5; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMessageView::has_crc32() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericMessageView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericMessageView::IntrinsicSizeInBytes() const { + return + typename GenericMessageView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericMessageView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace Message { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(514LL)).ValueOrDefault(); +} +} // namespace Message + +template +inline constexpr ::std::int32_t +GenericMessageView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Message::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericMessageView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Message::MaxSizeInBytes(); +} + +namespace Message { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Message + +template +inline constexpr ::std::int32_t +GenericMessageView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Message::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericMessageView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Message::MinSizeInBytes(); +} +namespace Image { + +} // namespace Image + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericImageView::size() + const { + + if ( has_size().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericImageView::has_size() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType::template OffsetStorageType::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType::template OffsetStorageType::template OffsetStorageType, 1, + 8 > + +, typename Storage::template OffsetStorageType::template OffsetStorageType, 3, + 8 > + +, typename Storage::template OffsetStorageType, 15, + 8 > + + GenericImageView::pixels() + const { + + if ( has_pixels().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = size(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(15LL)), emboss_reserved_local_subexpr_2); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType::template OffsetStorageType::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType::template OffsetStorageType::template OffsetStorageType, 1, + 8 > + +, typename Storage::template OffsetStorageType::template OffsetStorageType, 3, + 8 > + +, typename Storage::template OffsetStorageType, 15, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType::template OffsetStorageType::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType::template OffsetStorageType::template OffsetStorageType, 1, + 8 > + +, typename Storage::template OffsetStorageType::template OffsetStorageType, 3, + 8 > + +, typename Storage::template OffsetStorageType, 15, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericImageView::has_pixels() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericImageView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericImageView::IntrinsicSizeInBytes() const { + return + typename GenericImageView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericImageView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace Image { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3826LL)).ValueOrDefault(); +} +} // namespace Image + +template +inline constexpr ::std::int32_t +GenericImageView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Image::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericImageView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Image::MaxSizeInBytes(); +} + +namespace Image { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Image + +template +inline constexpr ::std::int32_t +GenericImageView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Image::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericImageView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Image::MinSizeInBytes(); +} +namespace TwoRegions { + +} // namespace TwoRegions + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericTwoRegionsView::b_end() + const { + + if ( has_b_end().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoRegionsView::has_b_end() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericTwoRegionsView::b_start() + const { + + if ( has_b_start().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoRegionsView::has_b_start() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericTwoRegionsView::a_size() + const { + + if ( has_a_size().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoRegionsView::has_a_size() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericTwoRegionsView::a_start() + const { + + if ( has_a_start().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoRegionsView::has_a_start() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericTwoRegionsView::region_a() + const { + + if ( has_region_a().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a_start(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = a_size(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_4; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoRegionsView::has_region_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericTwoRegionsView::region_b() + const { + + if ( has_region_b().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = b_start(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = b_end(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Difference(emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_2); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_5; + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericTwoRegionsView::has_region_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericTwoRegionsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericTwoRegionsView::IntrinsicSizeInBytes() const { + return + typename GenericTwoRegionsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericTwoRegionsView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace TwoRegions { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(510LL)).ValueOrDefault(); +} +} // namespace TwoRegions + +template +inline constexpr ::std::int32_t +GenericTwoRegionsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return TwoRegions::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericTwoRegionsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return TwoRegions::MaxSizeInBytes(); +} + +namespace TwoRegions { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace TwoRegions + +template +inline constexpr ::std::int32_t +GenericTwoRegionsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return TwoRegions::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericTwoRegionsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return TwoRegions::MinSizeInBytes(); +} +namespace MultipliedSize { + +} // namespace MultipliedSize + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericMultipliedSizeView::width() + const { + + if ( has_width().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMultipliedSizeView::has_width() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericMultipliedSizeView::height() + const { + + if ( has_height().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMultipliedSizeView::has_height() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericMultipliedSizeView::data() + const { + + if ( has_data().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = width(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = height(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_5; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericMultipliedSizeView::has_data() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericMultipliedSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericMultipliedSizeView::IntrinsicSizeInBytes() const { + return + typename GenericMultipliedSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericMultipliedSizeView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace MultipliedSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(65027LL)).ValueOrDefault(); +} +} // namespace MultipliedSize + +template +inline constexpr ::std::int32_t +GenericMultipliedSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return MultipliedSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericMultipliedSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return MultipliedSize::MaxSizeInBytes(); +} + +namespace MultipliedSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace MultipliedSize + +template +inline constexpr ::std::int32_t +GenericMultipliedSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return MultipliedSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericMultipliedSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return MultipliedSize::MinSizeInBytes(); +} +namespace NegativeTermsInSizes { + +} // namespace NegativeTermsInSizes + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeTermsInSizesView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeTermsInSizesView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeTermsInSizesView::c() + const { + + if ( has_c().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_c() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericNegativeTermsInSizesView::a_minus_b() + const { + + if ( has_a_minus_b().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = b(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Difference(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(3LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_6; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_a_minus_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericNegativeTermsInSizesView::a_minus_2b() + const { + + if ( has_a_minus_2b().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = b(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_5); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Difference(emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(3LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_7; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_a_minus_2b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericNegativeTermsInSizesView::a_minus_b_minus_c() + const { + + if ( has_a_minus_b_minus_c().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = b(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_6 = c(); + const auto emboss_reserved_local_subexpr_7 = (emboss_reserved_local_subexpr_6.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_6.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Difference(emboss_reserved_local_subexpr_5, emboss_reserved_local_subexpr_7); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Difference(emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(3LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_9; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_a_minus_b_minus_c() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericNegativeTermsInSizesView::ten_minus_a() + const { + + if ( has_ten_minus_a().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(7LL)), emboss_reserved_local_subexpr_2); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_ten_minus_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericNegativeTermsInSizesView::a_minus_2c() + const { + + if ( has_a_minus_2c().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = c(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_5); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Difference(emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(3LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_7; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_a_minus_2c() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericNegativeTermsInSizesView::a_minus_c() + const { + + if ( has_a_minus_c().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = c(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Difference(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(3LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_6; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_a_minus_c() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericNegativeTermsInSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericNegativeTermsInSizesView::IntrinsicSizeInBytes() const { + return + typename GenericNegativeTermsInSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermsInSizesView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace NegativeTermsInSizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(255LL)).ValueOrDefault(); +} +} // namespace NegativeTermsInSizes + +template +inline constexpr ::std::int32_t +GenericNegativeTermsInSizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return NegativeTermsInSizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNegativeTermsInSizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return NegativeTermsInSizes::MaxSizeInBytes(); +} + +namespace NegativeTermsInSizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace NegativeTermsInSizes + +template +inline constexpr ::std::int32_t +GenericNegativeTermsInSizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return NegativeTermsInSizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNegativeTermsInSizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return NegativeTermsInSizes::MinSizeInBytes(); +} +namespace NegativeTermInLocation { + +} // namespace NegativeTermInLocation + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeTermInLocationView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermInLocationView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNegativeTermInLocationView::b() + const { + + if ( has_b().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_3; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermInLocationView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericNegativeTermInLocationView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericNegativeTermInLocationView::IntrinsicSizeInBytes() const { + return + typename GenericNegativeTermInLocationView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericNegativeTermInLocationView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace NegativeTermInLocation { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(11LL)).ValueOrDefault(); +} +} // namespace NegativeTermInLocation + +template +inline constexpr ::std::int32_t +GenericNegativeTermInLocationView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return NegativeTermInLocation::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNegativeTermInLocationView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return NegativeTermInLocation::MaxSizeInBytes(); +} + +namespace NegativeTermInLocation { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace NegativeTermInLocation + +template +inline constexpr ::std::int32_t +GenericNegativeTermInLocationView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return NegativeTermInLocation::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNegativeTermInLocationView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return NegativeTermInLocation::MinSizeInBytes(); +} +namespace ChainedSize { + +} // namespace ChainedSize + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericChainedSizeView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericChainedSizeView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericChainedSizeView::b() + const { + + if ( has_b().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericChainedSizeView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericChainedSizeView::c() + const { + + if ( has_c().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = b(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericChainedSizeView::has_c() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericChainedSizeView::d() + const { + + if ( has_d().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = c(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericChainedSizeView::has_d() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericChainedSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericChainedSizeView::IntrinsicSizeInBytes() const { + return + typename GenericChainedSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericChainedSizeView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace ChainedSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(256LL)).ValueOrDefault(); +} +} // namespace ChainedSize + +template +inline constexpr ::std::int32_t +GenericChainedSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ChainedSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericChainedSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ChainedSize::MaxSizeInBytes(); +} + +namespace ChainedSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ChainedSize + +template +inline constexpr ::std::int32_t +GenericChainedSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ChainedSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericChainedSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ChainedSize::MinSizeInBytes(); +} +namespace FinalFieldOverlaps { + +} // namespace FinalFieldOverlaps + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericFinalFieldOverlapsView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFinalFieldOverlapsView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericFinalFieldOverlapsView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFinalFieldOverlapsView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericFinalFieldOverlapsView::c() + const { + + if ( has_c().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFinalFieldOverlapsView::has_c() const { + return ::emboss::support::Maybe(true); +} + + +namespace FinalFieldOverlaps { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(5LL)).ValueOrDefault(); +} +} // namespace FinalFieldOverlaps + +template +inline constexpr ::std::int32_t +GenericFinalFieldOverlapsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return FinalFieldOverlaps::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFinalFieldOverlapsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return FinalFieldOverlaps::IntrinsicSizeInBytes(); +} + +namespace FinalFieldOverlaps { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(5LL)).ValueOrDefault(); +} +} // namespace FinalFieldOverlaps + +template +inline constexpr ::std::int32_t +GenericFinalFieldOverlapsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return FinalFieldOverlaps::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFinalFieldOverlapsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return FinalFieldOverlaps::MaxSizeInBytes(); +} + +namespace FinalFieldOverlaps { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(5LL)).ValueOrDefault(); +} +} // namespace FinalFieldOverlaps + +template +inline constexpr ::std::int32_t +GenericFinalFieldOverlapsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return FinalFieldOverlaps::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFinalFieldOverlapsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return FinalFieldOverlaps::MinSizeInBytes(); +} +namespace DynamicFinalFieldOverlaps { + +} // namespace DynamicFinalFieldOverlaps + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericDynamicFinalFieldOverlapsView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFinalFieldOverlapsView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericDynamicFinalFieldOverlapsView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(9LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 9>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFinalFieldOverlapsView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericDynamicFinalFieldOverlapsView::c() + const { + + if ( has_c().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFinalFieldOverlapsView::has_c() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericDynamicFinalFieldOverlapsView::d() + const { + + if ( has_d().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_3; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFinalFieldOverlapsView::has_d() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericDynamicFinalFieldOverlapsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericDynamicFinalFieldOverlapsView::IntrinsicSizeInBytes() const { + return + typename GenericDynamicFinalFieldOverlapsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFinalFieldOverlapsView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace DynamicFinalFieldOverlaps { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(257LL)).ValueOrDefault(); +} +} // namespace DynamicFinalFieldOverlaps + +template +inline constexpr ::std::int32_t +GenericDynamicFinalFieldOverlapsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return DynamicFinalFieldOverlaps::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDynamicFinalFieldOverlapsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return DynamicFinalFieldOverlaps::MaxSizeInBytes(); +} + +namespace DynamicFinalFieldOverlaps { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(10LL)).ValueOrDefault(); +} +} // namespace DynamicFinalFieldOverlaps + +template +inline constexpr ::std::int32_t +GenericDynamicFinalFieldOverlapsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return DynamicFinalFieldOverlaps::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDynamicFinalFieldOverlapsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return DynamicFinalFieldOverlaps::MinSizeInBytes(); +} +namespace DynamicFieldDependsOnLaterField { + +} // namespace DynamicFieldDependsOnLaterField + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericDynamicFieldDependsOnLaterFieldView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFieldDependsOnLaterFieldView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericDynamicFieldDependsOnLaterFieldView::b() + const { + + if ( has_b().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_3; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFieldDependsOnLaterFieldView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericDynamicFieldDependsOnLaterFieldView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericDynamicFieldDependsOnLaterFieldView::IntrinsicSizeInBytes() const { + return + typename GenericDynamicFieldDependsOnLaterFieldView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFieldDependsOnLaterFieldView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace DynamicFieldDependsOnLaterField { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(257LL)).ValueOrDefault(); +} +} // namespace DynamicFieldDependsOnLaterField + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDependsOnLaterFieldView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return DynamicFieldDependsOnLaterField::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDependsOnLaterFieldView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return DynamicFieldDependsOnLaterField::MaxSizeInBytes(); +} + +namespace DynamicFieldDependsOnLaterField { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(5LL)).ValueOrDefault(); +} +} // namespace DynamicFieldDependsOnLaterField + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDependsOnLaterFieldView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return DynamicFieldDependsOnLaterField::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDependsOnLaterFieldView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return DynamicFieldDependsOnLaterField::MinSizeInBytes(); +} +namespace DynamicFieldDoesNotAffectSize { + +} // namespace DynamicFieldDoesNotAffectSize + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericDynamicFieldDoesNotAffectSizeView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFieldDoesNotAffectSizeView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericDynamicFieldDoesNotAffectSizeView::b() + const { + + if ( has_b().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFieldDoesNotAffectSizeView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericDynamicFieldDoesNotAffectSizeView::c() + const { + + if ( has_c().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(255LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 255>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDynamicFieldDoesNotAffectSizeView::has_c() const { + return ::emboss::support::Maybe(true); +} + + +namespace DynamicFieldDoesNotAffectSize { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(256LL)).ValueOrDefault(); +} +} // namespace DynamicFieldDoesNotAffectSize + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDoesNotAffectSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return DynamicFieldDoesNotAffectSize::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDoesNotAffectSizeView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return DynamicFieldDoesNotAffectSize::IntrinsicSizeInBytes(); +} + +namespace DynamicFieldDoesNotAffectSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(256LL)).ValueOrDefault(); +} +} // namespace DynamicFieldDoesNotAffectSize + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDoesNotAffectSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return DynamicFieldDoesNotAffectSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDoesNotAffectSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return DynamicFieldDoesNotAffectSize::MaxSizeInBytes(); +} + +namespace DynamicFieldDoesNotAffectSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(256LL)).ValueOrDefault(); +} +} // namespace DynamicFieldDoesNotAffectSize + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDoesNotAffectSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return DynamicFieldDoesNotAffectSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDynamicFieldDoesNotAffectSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return DynamicFieldDoesNotAffectSize::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_DYNAMIC_SIZE_EMB_H_ + diff --git a/testdata/golden_cpp/enum.emb.h b/testdata/golden_cpp/enum.emb.h new file mode 100644 index 00000000..f056862f --- /dev/null +++ b/testdata/golden_cpp/enum.emb.h @@ -0,0 +1,3642 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_ENUM_EMB_H_ +#define TESTDATA_ENUM_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Constants { + +} // namespace Constants + + +template +class GenericConstantsView; + +enum class Kind : ::std::uint64_t; + +enum class Signed : ::std::int64_t; + +enum class OnlyShortValues : ::std::uint64_t; + +enum class OnlyShortSignedValues : ::std::int64_t; + +enum class ExplicitlySigned : ::std::int64_t; + +enum class ExplicitlySized64 : ::std::uint64_t; + +enum class ExplicitlySized32 : ::std::uint32_t; + +enum class ExplicitlySized16 : ::std::uint16_t; + +enum class ExplicitlySized8 : ::std::uint8_t; + +enum class ExplicitlySized12 : ::std::uint16_t; + +enum class ExplicitlySizedAndSigned : ::std::int32_t; + +namespace ManifestEntry { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +class GenericEmbossReservedAnonymousField1View; + + +} // namespace ManifestEntry + + +template +class GenericManifestEntryView; + +namespace StructContainingEnum { +enum class Status : ::std::uint64_t; + + +} // namespace StructContainingEnum + + +template +class GenericStructContainingEnumView; + + + + + + +namespace Constants { + +} // namespace Constants + + +template +struct EmbossReservedInternalIsGenericConstantsView; + +template +class GenericConstantsView final { + public: + GenericConstantsView() : backing_() {} + explicit GenericConstantsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConstantsView( + const GenericConstantsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConstantsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConstantsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConstantsView &operator=( + const GenericConstantsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_sprocket().Known()) return false; + if (has_sprocket().ValueOrDefault() && !sprocket().Ok()) return false; + + + if (!has_geegaw().Known()) return false; + if (has_geegaw().ValueOrDefault() && !geegaw().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericConstantsView emboss_reserved_local_other) const { + return true; + } + template + bool UncheckedEquals( + GenericConstantsView emboss_reserved_local_other) const { + return true; + } + template + void UncheckedCopyFrom( + GenericConstantsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConstantsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConstantsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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; + + return false; + } + } + + template + 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_sprocket().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + sprocket().IsAggregate() || sprocket().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# sprocket: "); + sprocket().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("# sprocket: UNREADABLE\n"); + } + } + + if (has_geegaw().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + geegaw().IsAggregate() || geegaw().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# geegaw: "); + geegaw().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("# geegaw: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + class EmbossReservedVirtualSprocketView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualSprocketView() {} + EmbossReservedVirtualSprocketView(const EmbossReservedVirtualSprocketView &) = default; + EmbossReservedVirtualSprocketView(EmbossReservedVirtualSprocketView &&) = default; + EmbossReservedVirtualSprocketView &operator=(const EmbossReservedVirtualSprocketView &) = + default; + EmbossReservedVirtualSprocketView &operator=(EmbossReservedVirtualSprocketView &&) = + default; + ~EmbossReservedVirtualSprocketView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualSprocketView sprocket() { + return EmbossReservedVirtualSprocketView(); + } + static constexpr ::emboss::support::Maybe has_sprocket() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualGeegawView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualGeegawView() {} + EmbossReservedVirtualGeegawView(const EmbossReservedVirtualGeegawView &) = default; + EmbossReservedVirtualGeegawView(EmbossReservedVirtualGeegawView &&) = default; + EmbossReservedVirtualGeegawView &operator=(const EmbossReservedVirtualGeegawView &) = + default; + EmbossReservedVirtualGeegawView &operator=(EmbossReservedVirtualGeegawView &&) = + default; + ~EmbossReservedVirtualGeegawView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualGeegawView geegaw() { + return EmbossReservedVirtualGeegawView(); + } + static constexpr ::emboss::support::Maybe has_geegaw() { + return ::emboss::support::Maybe(true); + } + + 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConstantsView; +}; +using ConstantsView = + GenericConstantsView; +using ConstantsWriter = + GenericConstantsView; + +template +struct EmbossReservedInternalIsGenericConstantsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConstantsView< + GenericConstantsView> { + static constexpr const bool value = true; +}; + +template +inline GenericConstantsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConstantsView( T &&emboss_reserved_local_arg) { + return GenericConstantsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConstantsView> +MakeConstantsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConstantsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConstantsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConstantsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConstantsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} +enum class Kind : ::std::uint64_t { + WIDGET = static_cast(0LL), + SPROCKET = static_cast(1LL), + GEEGAW = static_cast(2LL), + COMPUTED = static_cast(3LL), + LARGE_VALUE = static_cast(2000LL), + DUPLICATE_LARGE_VALUE = static_cast(2000LL), + MAX32BIT = static_cast(4294967295ULL), + MAX64BIT = static_cast(18446744073709551615ULL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Kind *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("WIDGET", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Kind::WIDGET; + return true; + } + + if (!strcmp("SPROCKET", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Kind::SPROCKET; + return true; + } + + if (!strcmp("GEEGAW", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Kind::GEEGAW; + return true; + } + + if (!strcmp("COMPUTED", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Kind::COMPUTED; + return true; + } + + if (!strcmp("LARGE_VALUE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Kind::LARGE_VALUE; + return true; + } + + if (!strcmp("DUPLICATE_LARGE_VALUE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Kind::DUPLICATE_LARGE_VALUE; + return true; + } + + if (!strcmp("MAX32BIT", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Kind::MAX32BIT; + return true; + } + + if (!strcmp("MAX64BIT", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Kind::MAX64BIT; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Kind emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Kind::WIDGET: return "WIDGET"; + + case Kind::SPROCKET: return "SPROCKET"; + + case Kind::GEEGAW: return "GEEGAW"; + + case Kind::COMPUTED: return "COMPUTED"; + + case Kind::LARGE_VALUE: return "LARGE_VALUE"; + + case Kind::MAX32BIT: return "MAX32BIT"; + + case Kind::MAX64BIT: return "MAX64BIT"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Kind emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Kind::WIDGET: return true; + + case Kind::SPROCKET: return true; + + case Kind::GEEGAW: return true; + + case Kind::COMPUTED: return true; + + case Kind::LARGE_VALUE: return true; + + case Kind::MAX32BIT: return true; + + case Kind::MAX64BIT: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Kind 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::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, + Kind *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Kind emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Kind emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Kind emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class Signed : ::std::int64_t { + MIN64BIT = static_cast(-9223372036854775807LL - 1), + MAX64BIT = static_cast(9223372036854775807LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Signed *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("MIN64BIT", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Signed::MIN64BIT; + return true; + } + + if (!strcmp("MAX64BIT", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Signed::MAX64BIT; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Signed emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Signed::MIN64BIT: return "MIN64BIT"; + + case Signed::MAX64BIT: return "MAX64BIT"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Signed emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Signed::MIN64BIT: return true; + + case Signed::MAX64BIT: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Signed 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::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, + Signed *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Signed emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Signed emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Signed emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class OnlyShortValues : ::std::uint64_t { + ZERO = static_cast(0LL), + ONE = static_cast(1LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + OnlyShortValues *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = OnlyShortValues::ZERO; + return true; + } + + if (!strcmp("ONE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = OnlyShortValues::ONE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + OnlyShortValues emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case OnlyShortValues::ZERO: return "ZERO"; + + case OnlyShortValues::ONE: return "ONE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(OnlyShortValues emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case OnlyShortValues::ZERO: return true; + + case OnlyShortValues::ONE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + OnlyShortValues 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::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, + OnlyShortValues *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + OnlyShortValues emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(OnlyShortValues emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + OnlyShortValues emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class OnlyShortSignedValues : ::std::int64_t { + ZERO = static_cast(0LL), + NEGATIVE_ONE = static_cast(-1LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + OnlyShortSignedValues *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = OnlyShortSignedValues::ZERO; + return true; + } + + if (!strcmp("NEGATIVE_ONE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = OnlyShortSignedValues::NEGATIVE_ONE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + OnlyShortSignedValues emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case OnlyShortSignedValues::ZERO: return "ZERO"; + + case OnlyShortSignedValues::NEGATIVE_ONE: return "NEGATIVE_ONE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(OnlyShortSignedValues emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case OnlyShortSignedValues::ZERO: return true; + + case OnlyShortSignedValues::NEGATIVE_ONE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + OnlyShortSignedValues 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::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, + OnlyShortSignedValues *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + OnlyShortSignedValues emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(OnlyShortSignedValues emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + OnlyShortSignedValues emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class ExplicitlySigned : ::std::int64_t { + ZERO = static_cast(0LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + ExplicitlySigned *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySigned::ZERO; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + ExplicitlySigned emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySigned::ZERO: return "ZERO"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(ExplicitlySigned emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySigned::ZERO: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + ExplicitlySigned 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::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, + ExplicitlySigned *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + ExplicitlySigned emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(ExplicitlySigned emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + ExplicitlySigned emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class ExplicitlySized64 : ::std::uint64_t { + ZERO = static_cast(0LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + ExplicitlySized64 *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySized64::ZERO; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + ExplicitlySized64 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized64::ZERO: return "ZERO"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(ExplicitlySized64 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized64::ZERO: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + ExplicitlySized64 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::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, + ExplicitlySized64 *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + ExplicitlySized64 emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(ExplicitlySized64 emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + ExplicitlySized64 emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class ExplicitlySized32 : ::std::uint32_t { + ZERO = static_cast(0LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + ExplicitlySized32 *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySized32::ZERO; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + ExplicitlySized32 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized32::ZERO: return "ZERO"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(ExplicitlySized32 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized32::ZERO: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + ExplicitlySized32 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::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, + ExplicitlySized32 *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + ExplicitlySized32 emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(ExplicitlySized32 emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + ExplicitlySized32 emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class ExplicitlySized16 : ::std::uint16_t { + ZERO = static_cast(0LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + ExplicitlySized16 *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySized16::ZERO; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + ExplicitlySized16 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized16::ZERO: return "ZERO"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(ExplicitlySized16 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized16::ZERO: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + ExplicitlySized16 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::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, + ExplicitlySized16 *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + ExplicitlySized16 emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(ExplicitlySized16 emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + ExplicitlySized16 emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class ExplicitlySized8 : ::std::uint8_t { + ZERO = static_cast(0LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + ExplicitlySized8 *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySized8::ZERO; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + ExplicitlySized8 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized8::ZERO: return "ZERO"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(ExplicitlySized8 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized8::ZERO: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + ExplicitlySized8 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::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, + ExplicitlySized8 *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + ExplicitlySized8 emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(ExplicitlySized8 emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + ExplicitlySized8 emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class ExplicitlySized12 : ::std::uint16_t { + ZERO = static_cast(0LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + ExplicitlySized12 *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySized12::ZERO; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + ExplicitlySized12 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized12::ZERO: return "ZERO"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(ExplicitlySized12 emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySized12::ZERO: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + ExplicitlySized12 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::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, + ExplicitlySized12 *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + ExplicitlySized12 emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(ExplicitlySized12 emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + ExplicitlySized12 emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class ExplicitlySizedAndSigned : ::std::int32_t { + ZERO = static_cast(0LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + ExplicitlySizedAndSigned *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("ZERO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedAndSigned::ZERO; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + ExplicitlySizedAndSigned emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySizedAndSigned::ZERO: return "ZERO"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(ExplicitlySizedAndSigned emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySizedAndSigned::ZERO: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + ExplicitlySizedAndSigned 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::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, + ExplicitlySizedAndSigned *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + ExplicitlySizedAndSigned emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(ExplicitlySizedAndSigned emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + ExplicitlySizedAndSigned emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + + + + +namespace ManifestEntry { + + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; + +template +class GenericEmbossReservedAnonymousField1View final { + public: + GenericEmbossReservedAnonymousField1View() : backing_() {} + explicit GenericEmbossReservedAnonymousField1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField1View( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField1View &operator=( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_wide_kind_in_bits().Known()) return false; + if (has_wide_kind_in_bits().ValueOrDefault() && !wide_kind_in_bits().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (!has_wide_kind_in_bits().Known()) return false; + if (!emboss_reserved_local_other.has_wide_kind_in_bits().Known()) return false; + + if (emboss_reserved_local_other.has_wide_kind_in_bits().ValueOrDefault() && + !has_wide_kind_in_bits().ValueOrDefault()) + return false; + if (has_wide_kind_in_bits().ValueOrDefault() && + !emboss_reserved_local_other.has_wide_kind_in_bits().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_wide_kind_in_bits().ValueOrDefault() && + has_wide_kind_in_bits().ValueOrDefault() && + !wide_kind_in_bits().Equals(emboss_reserved_local_other.wide_kind_in_bits())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_wide_kind_in_bits().ValueOr(false) && + !has_wide_kind_in_bits().ValueOr(false)) + return false; + if (has_wide_kind_in_bits().ValueOr(false) && + !emboss_reserved_local_other.has_wide_kind_in_bits().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_wide_kind_in_bits().ValueOr(false) && + has_wide_kind_in_bits().ValueOr(false) && + !wide_kind_in_bits().UncheckedEquals(emboss_reserved_local_other.wide_kind_in_bits())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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_kind_in_bits") { + if (!wide_kind_in_bits().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_kind_in_bits().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + wide_kind_in_bits().IsAggregate() || wide_kind_in_bits().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("wide_kind_in_bits: "); + wide_kind_in_bits().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !wide_kind_in_bits().IsAggregate() && !wide_kind_in_bits().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_kind_in_bits: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + wide_kind_in_bits() const; + ::emboss::support::Maybe has_wide_kind_in_bits() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField1View; +}; +using EmbossReservedAnonymousField1View = + GenericEmbossReservedAnonymousField1View; +using EmbossReservedAnonymousField1Writer = + GenericEmbossReservedAnonymousField1View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< + GenericEmbossReservedAnonymousField1View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField1View> +MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace ManifestEntry + + +template +struct EmbossReservedInternalIsGenericManifestEntryView; + +template +class GenericManifestEntryView final { + public: + GenericManifestEntryView() : backing_() {} + explicit GenericManifestEntryView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericManifestEntryView( + const GenericManifestEntryView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericManifestEntryView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericManifestEntryView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericManifestEntryView &operator=( + const GenericManifestEntryView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_kind().Known()) return false; + if (has_kind().ValueOrDefault() && !kind().Ok()) return false; + + + if (!has_count().Known()) return false; + if (has_count().ValueOrDefault() && !count().Ok()) return false; + + + if (!has_wide_kind().Known()) return false; + if (has_wide_kind().ValueOrDefault() && !wide_kind().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_wide_kind_in_bits().Known()) return false; + if (has_wide_kind_in_bits().ValueOrDefault() && !wide_kind_in_bits().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericManifestEntryView emboss_reserved_local_other) const { + + if (!has_kind().Known()) return false; + if (!emboss_reserved_local_other.has_kind().Known()) return false; + + if (emboss_reserved_local_other.has_kind().ValueOrDefault() && + !has_kind().ValueOrDefault()) + return false; + if (has_kind().ValueOrDefault() && + !emboss_reserved_local_other.has_kind().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_kind().ValueOrDefault() && + has_kind().ValueOrDefault() && + !kind().Equals(emboss_reserved_local_other.kind())) + return false; + + + + 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_wide_kind().Known()) return false; + if (!emboss_reserved_local_other.has_wide_kind().Known()) return false; + + if (emboss_reserved_local_other.has_wide_kind().ValueOrDefault() && + !has_wide_kind().ValueOrDefault()) + return false; + if (has_wide_kind().ValueOrDefault() && + !emboss_reserved_local_other.has_wide_kind().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_wide_kind().ValueOrDefault() && + has_wide_kind().ValueOrDefault() && + !wide_kind().Equals(emboss_reserved_local_other.wide_kind())) + 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; + + return true; + } + template + bool UncheckedEquals( + GenericManifestEntryView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_kind().ValueOr(false) && + !has_kind().ValueOr(false)) + return false; + if (has_kind().ValueOr(false) && + !emboss_reserved_local_other.has_kind().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_kind().ValueOr(false) && + has_kind().ValueOr(false) && + !kind().UncheckedEquals(emboss_reserved_local_other.kind())) + return false; + + + + 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_wide_kind().ValueOr(false) && + !has_wide_kind().ValueOr(false)) + return false; + if (has_wide_kind().ValueOr(false) && + !emboss_reserved_local_other.has_wide_kind().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_wide_kind().ValueOr(false) && + has_wide_kind().ValueOr(false) && + !wide_kind().UncheckedEquals(emboss_reserved_local_other.wide_kind())) + 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; + + return true; + } + template + void UncheckedCopyFrom( + GenericManifestEntryView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericManifestEntryView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericManifestEntryView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "kind") { + if (!kind().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "count") { + if (!count().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "wide_kind") { + if (!wide_kind().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "wide_kind_in_bits") { + if (!wide_kind_in_bits().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_kind().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + kind().IsAggregate() || kind().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("kind: "); + kind().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !kind().IsAggregate() && !kind().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("# kind: UNREADABLE\n"); + } + } + + if (has_count().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + count().IsAggregate() || count().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_wide_kind().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + wide_kind().IsAggregate() || wide_kind().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("wide_kind: "); + wide_kind().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !wide_kind().IsAggregate() && !wide_kind().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_kind: UNREADABLE\n"); + } + } + + if (has_wide_kind_in_bits().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + wide_kind_in_bits().IsAggregate() || wide_kind_in_bits().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("wide_kind_in_bits: "); + wide_kind_in_bits().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !wide_kind_in_bits().IsAggregate() && !wide_kind_in_bits().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_kind_in_bits: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + kind() const; + ::emboss::support::Maybe has_kind() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + count() const; + ::emboss::support::Maybe has_count() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + wide_kind() const; + ::emboss::support::Maybe has_wide_kind() const; + + private: + typename ::emboss::test::ManifestEntry::GenericEmbossReservedAnonymousField1View>, 40>> + + emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + + public: + auto wide_kind_in_bits() const -> decltype(this->emboss_reserved_anonymous_field_1().wide_kind_in_bits()) { + return has_wide_kind_in_bits().ValueOrDefault() ? emboss_reserved_anonymous_field_1().wide_kind_in_bits() + : decltype(this->emboss_reserved_anonymous_field_1().wide_kind_in_bits())(); + } + ::emboss::support::Maybe has_wide_kind_in_bits() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericManifestEntryView; +}; +using ManifestEntryView = + GenericManifestEntryView; +using ManifestEntryWriter = + GenericManifestEntryView; + +template +struct EmbossReservedInternalIsGenericManifestEntryView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericManifestEntryView< + GenericManifestEntryView> { + static constexpr const bool value = true; +}; + +template +inline GenericManifestEntryView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeManifestEntryView( T &&emboss_reserved_local_arg) { + return GenericManifestEntryView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericManifestEntryView> +MakeManifestEntryView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericManifestEntryView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericManifestEntryView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedManifestEntryView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericManifestEntryView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace StructContainingEnum { +enum class Status : ::std::uint64_t { + OK = static_cast(0LL), + FAILURE = static_cast(1LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Status *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("OK", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Status::OK; + return true; + } + + if (!strcmp("FAILURE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Status::FAILURE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Status emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Status::OK: return "OK"; + + case Status::FAILURE: return "FAILURE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Status emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Status::OK: return true; + + case Status::FAILURE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Status 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::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, + Status *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Status emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Status emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Status emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +} // namespace StructContainingEnum + + +template +struct EmbossReservedInternalIsGenericStructContainingEnumView; + +template +class GenericStructContainingEnumView final { + public: + GenericStructContainingEnumView() : backing_() {} + explicit GenericStructContainingEnumView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructContainingEnumView( + const GenericStructContainingEnumView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructContainingEnumView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructContainingEnumView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructContainingEnumView &operator=( + const GenericStructContainingEnumView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + using Status = ::emboss::test::StructContainingEnum::Status; + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_bar().Known()) return false; + if (has_bar().ValueOrDefault() && !bar().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructContainingEnumView emboss_reserved_local_other) const { + + if (!has_bar().Known()) return false; + if (!emboss_reserved_local_other.has_bar().Known()) return false; + + if (emboss_reserved_local_other.has_bar().ValueOrDefault() && + !has_bar().ValueOrDefault()) + return false; + if (has_bar().ValueOrDefault() && + !emboss_reserved_local_other.has_bar().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_bar().ValueOrDefault() && + has_bar().ValueOrDefault() && + !bar().Equals(emboss_reserved_local_other.bar())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructContainingEnumView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_bar().ValueOr(false) && + !has_bar().ValueOr(false)) + return false; + if (has_bar().ValueOr(false) && + !emboss_reserved_local_other.has_bar().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_bar().ValueOr(false) && + has_bar().ValueOr(false) && + !bar().UncheckedEquals(emboss_reserved_local_other.bar())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructContainingEnumView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructContainingEnumView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructContainingEnumView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "bar") { + if (!bar().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_bar().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + bar().IsAggregate() || bar().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("bar: "); + bar().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !bar().IsAggregate() && !bar().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("# bar: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + bar() const; + ::emboss::support::Maybe has_bar() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructContainingEnumView; +}; +using StructContainingEnumView = + GenericStructContainingEnumView; +using StructContainingEnumWriter = + GenericStructContainingEnumView; + +template +struct EmbossReservedInternalIsGenericStructContainingEnumView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructContainingEnumView< + GenericStructContainingEnumView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructContainingEnumView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructContainingEnumView( T &&emboss_reserved_local_arg) { + return GenericStructContainingEnumView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructContainingEnumView> +MakeStructContainingEnumView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructContainingEnumView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructContainingEnumView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructContainingEnumView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructContainingEnumView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Constants { + +} // namespace Constants + + +namespace Constants { +inline constexpr ::std::int32_t sprocket() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Constants + +template +inline constexpr ::std::int32_t +GenericConstantsView::EmbossReservedVirtualSprocketView::Read() { + return Constants::sprocket(); +} + +template +inline constexpr ::std::int32_t +GenericConstantsView< + Storage>::EmbossReservedVirtualSprocketView::UncheckedRead() { + return Constants::sprocket(); +} + +namespace Constants { +inline constexpr ::std::int32_t geegaw() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Constants + +template +inline constexpr ::std::int32_t +GenericConstantsView::EmbossReservedVirtualGeegawView::Read() { + return Constants::geegaw(); +} + +template +inline constexpr ::std::int32_t +GenericConstantsView< + Storage>::EmbossReservedVirtualGeegawView::UncheckedRead() { + return Constants::geegaw(); +} + +namespace Constants { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace Constants + +template +inline constexpr ::std::int32_t +GenericConstantsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Constants::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConstantsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Constants::IntrinsicSizeInBytes(); +} + +namespace Constants { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace Constants + +template +inline constexpr ::std::int32_t +GenericConstantsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Constants::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConstantsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Constants::MaxSizeInBytes(); +} + +namespace Constants { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace Constants + +template +inline constexpr ::std::int32_t +GenericConstantsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Constants::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConstantsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Constants::MinSizeInBytes(); +} +namespace ManifestEntry { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::wide_kind_in_bits() + const { + + if ( has_wide_kind_in_bits().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(32LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_wide_kind_in_bits() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +} // namespace ManifestEntry + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericManifestEntryView::kind() + const { + + if ( has_kind().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericManifestEntryView::has_kind() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericManifestEntryView::count() + const { + + if ( has_count().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericManifestEntryView::has_count() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericManifestEntryView::wide_kind() + const { + + if ( has_wide_kind().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(5LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 5>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Kind, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericManifestEntryView::has_wide_kind() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::ManifestEntry::GenericEmbossReservedAnonymousField1View>, 40>> + + GenericManifestEntryView::emboss_reserved_anonymous_field_1() + const { + + if ( has_emboss_reserved_anonymous_field_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(5LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(9LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::ManifestEntry::GenericEmbossReservedAnonymousField1View>, 40>> + +( + backing_ + .template GetOffsetStorage<0, + 9>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::ManifestEntry::GenericEmbossReservedAnonymousField1View>, 40>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericManifestEntryView::has_emboss_reserved_anonymous_field_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericManifestEntryView::has_wide_kind_in_bits() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +namespace ManifestEntry { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(14LL)).ValueOrDefault(); +} +} // namespace ManifestEntry + +template +inline constexpr ::std::int32_t +GenericManifestEntryView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ManifestEntry::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericManifestEntryView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ManifestEntry::IntrinsicSizeInBytes(); +} + +namespace ManifestEntry { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(14LL)).ValueOrDefault(); +} +} // namespace ManifestEntry + +template +inline constexpr ::std::int32_t +GenericManifestEntryView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ManifestEntry::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericManifestEntryView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ManifestEntry::MaxSizeInBytes(); +} + +namespace ManifestEntry { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(14LL)).ValueOrDefault(); +} +} // namespace ManifestEntry + +template +inline constexpr ::std::int32_t +GenericManifestEntryView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ManifestEntry::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericManifestEntryView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ManifestEntry::MinSizeInBytes(); +} +namespace StructContainingEnum { + +} // namespace StructContainingEnum + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericStructContainingEnumView::bar() + const { + + if ( has_bar().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructContainingEnumView::has_bar() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructContainingEnum { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace StructContainingEnum + +template +inline constexpr ::std::int32_t +GenericStructContainingEnumView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructContainingEnum::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructContainingEnumView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructContainingEnum::IntrinsicSizeInBytes(); +} + +namespace StructContainingEnum { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace StructContainingEnum + +template +inline constexpr ::std::int32_t +GenericStructContainingEnumView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructContainingEnum::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructContainingEnumView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructContainingEnum::MaxSizeInBytes(); +} + +namespace StructContainingEnum { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace StructContainingEnum + +template +inline constexpr ::std::int32_t +GenericStructContainingEnumView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructContainingEnum::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructContainingEnumView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructContainingEnum::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_ENUM_EMB_H_ + diff --git a/testdata/golden_cpp/enum_case.emb.h b/testdata/golden_cpp/enum_case.emb.h new file mode 100644 index 00000000..57385965 --- /dev/null +++ b/testdata/golden_cpp/enum_case.emb.h @@ -0,0 +1,1274 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_ENUM_CASE_EMB_H_ +#define TESTDATA_ENUM_CASE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +enum class EnumShouty : ::std::uint64_t; + +enum class EnumDefault : ::std::uint64_t; + +namespace UseKCamelEnumCase { + +} // namespace UseKCamelEnumCase + + +template +class GenericUseKCamelEnumCaseView; + +enum class EnumShoutyAndKCamel : ::std::uint64_t; + +enum class EnumMixed : ::std::uint64_t; + + +enum class EnumShouty : ::std::uint64_t { + FIRST = static_cast(0LL), + SECOND = static_cast(1LL), + TWO_WORD = static_cast(2LL), + THREE_WORD_ENUM = static_cast(4LL), + LONG_ENUM_VALUE_NAME = static_cast(8LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + EnumShouty *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("FIRST", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShouty::FIRST; + return true; + } + + if (!strcmp("SECOND", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShouty::SECOND; + return true; + } + + if (!strcmp("TWO_WORD", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShouty::TWO_WORD; + return true; + } + + if (!strcmp("THREE_WORD_ENUM", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShouty::THREE_WORD_ENUM; + return true; + } + + if (!strcmp("LONG_ENUM_VALUE_NAME", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShouty::LONG_ENUM_VALUE_NAME; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + EnumShouty emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case EnumShouty::FIRST: return "FIRST"; + + case EnumShouty::SECOND: return "SECOND"; + + case EnumShouty::TWO_WORD: return "TWO_WORD"; + + case EnumShouty::THREE_WORD_ENUM: return "THREE_WORD_ENUM"; + + case EnumShouty::LONG_ENUM_VALUE_NAME: return "LONG_ENUM_VALUE_NAME"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(EnumShouty emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case EnumShouty::FIRST: return true; + + case EnumShouty::SECOND: return true; + + case EnumShouty::TWO_WORD: return true; + + case EnumShouty::THREE_WORD_ENUM: return true; + + case EnumShouty::LONG_ENUM_VALUE_NAME: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + EnumShouty 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::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, + EnumShouty *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + EnumShouty emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(EnumShouty emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + EnumShouty emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class EnumDefault : ::std::uint64_t { + kFirst = static_cast(0LL), + kSecond = static_cast(1LL), + kTwoWord = static_cast(2LL), + kThreeWordEnum = static_cast(4LL), + kLongEnumValueName = static_cast(8LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + EnumDefault *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("FIRST", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumDefault::kFirst; + return true; + } + + if (!strcmp("SECOND", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumDefault::kSecond; + return true; + } + + if (!strcmp("TWO_WORD", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumDefault::kTwoWord; + return true; + } + + if (!strcmp("THREE_WORD_ENUM", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumDefault::kThreeWordEnum; + return true; + } + + if (!strcmp("LONG_ENUM_VALUE_NAME", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumDefault::kLongEnumValueName; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + EnumDefault emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case EnumDefault::kFirst: return "FIRST"; + + case EnumDefault::kSecond: return "SECOND"; + + case EnumDefault::kTwoWord: return "TWO_WORD"; + + case EnumDefault::kThreeWordEnum: return "THREE_WORD_ENUM"; + + case EnumDefault::kLongEnumValueName: return "LONG_ENUM_VALUE_NAME"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(EnumDefault emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case EnumDefault::kFirst: return true; + + case EnumDefault::kSecond: return true; + + case EnumDefault::kTwoWord: return true; + + case EnumDefault::kThreeWordEnum: return true; + + case EnumDefault::kLongEnumValueName: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + EnumDefault 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::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, + EnumDefault *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + EnumDefault emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(EnumDefault emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + EnumDefault emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + + +namespace UseKCamelEnumCase { + +} // namespace UseKCamelEnumCase + + +template +struct EmbossReservedInternalIsGenericUseKCamelEnumCaseView; + +template +class GenericUseKCamelEnumCaseView final { + public: + GenericUseKCamelEnumCaseView() : backing_() {} + explicit GenericUseKCamelEnumCaseView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericUseKCamelEnumCaseView( + const GenericUseKCamelEnumCaseView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericUseKCamelEnumCaseView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericUseKCamelEnumCaseView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericUseKCamelEnumCaseView &operator=( + const GenericUseKCamelEnumCaseView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_v().Known()) return false; + if (has_v().ValueOrDefault() && !v().Ok()) return false; + + + if (!has_first().Known()) return false; + if (has_first().ValueOrDefault() && !first().Ok()) return false; + + + if (!has_v_is_first().Known()) return false; + if (has_v_is_first().ValueOrDefault() && !v_is_first().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { + + if (!has_v().Known()) return false; + if (!emboss_reserved_local_other.has_v().Known()) return false; + + if (emboss_reserved_local_other.has_v().ValueOrDefault() && + !has_v().ValueOrDefault()) + return false; + if (has_v().ValueOrDefault() && + !emboss_reserved_local_other.has_v().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_v().ValueOrDefault() && + has_v().ValueOrDefault() && + !v().Equals(emboss_reserved_local_other.v())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_v().ValueOr(false) && + !has_v().ValueOr(false)) + return false; + if (has_v().ValueOr(false) && + !emboss_reserved_local_other.has_v().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_v().ValueOr(false) && + has_v().ValueOr(false) && + !v().UncheckedEquals(emboss_reserved_local_other.v())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericUseKCamelEnumCaseView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "v") { + if (!v().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_v().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + v().IsAggregate() || v().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("v: "); + v().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !v().IsAggregate() && !v().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("# v: UNREADABLE\n"); + } + } + + if (has_first().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + first().IsAggregate() || first().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# first: "); + first().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("# first: UNREADABLE\n"); + } + } + + if (has_v_is_first().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + v_is_first().IsAggregate() || v_is_first().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# v_is_first: "); + v_is_first().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("# v_is_first: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::EnumDefault, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + v() const; + ::emboss::support::Maybe has_v() const; + + public: + class EmbossReservedVirtualFirstView final { + public: + using ValueType = ::emboss::test::EnumDefault; + + constexpr EmbossReservedVirtualFirstView() {} + EmbossReservedVirtualFirstView(const EmbossReservedVirtualFirstView &) = default; + EmbossReservedVirtualFirstView(EmbossReservedVirtualFirstView &&) = default; + EmbossReservedVirtualFirstView &operator=(const EmbossReservedVirtualFirstView &) = + default; + EmbossReservedVirtualFirstView &operator=(EmbossReservedVirtualFirstView &&) = + default; + ~EmbossReservedVirtualFirstView() = default; + + static constexpr ::emboss::test::EnumDefault Read(); + static constexpr ::emboss::test::EnumDefault UncheckedRead(); + static constexpr bool Ok() { return true; } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteEnumViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + }; + + static constexpr EmbossReservedVirtualFirstView first() { + return EmbossReservedVirtualFirstView(); + } + static constexpr ::emboss::support::Maybe has_first() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualVIsFirstView final { + public: + using ValueType = bool; + + explicit EmbossReservedVirtualVIsFirstView( + const GenericUseKCamelEnumCaseView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualVIsFirstView() = delete; + EmbossReservedVirtualVIsFirstView(const EmbossReservedVirtualVIsFirstView &) = default; + EmbossReservedVirtualVIsFirstView(EmbossReservedVirtualVIsFirstView &&) = default; + EmbossReservedVirtualVIsFirstView &operator=(const EmbossReservedVirtualVIsFirstView &) = + default; + EmbossReservedVirtualVIsFirstView &operator=(EmbossReservedVirtualVIsFirstView &&) = + default; + ~EmbossReservedVirtualVIsFirstView() = default; + + bool Read() const { + EMBOSS_CHECK(view_.has_v_is_first().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.v(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); + + 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(true).ValueOr(false); + } + + const GenericUseKCamelEnumCaseView view_; + }; + EmbossReservedVirtualVIsFirstView v_is_first() const; + ::emboss::support::Maybe has_v_is_first() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericUseKCamelEnumCaseView; +}; +using UseKCamelEnumCaseView = + GenericUseKCamelEnumCaseView; +using UseKCamelEnumCaseWriter = + GenericUseKCamelEnumCaseView; + +template +struct EmbossReservedInternalIsGenericUseKCamelEnumCaseView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericUseKCamelEnumCaseView< + GenericUseKCamelEnumCaseView> { + static constexpr const bool value = true; +}; + +template +inline GenericUseKCamelEnumCaseView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeUseKCamelEnumCaseView( T &&emboss_reserved_local_arg) { + return GenericUseKCamelEnumCaseView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericUseKCamelEnumCaseView> +MakeUseKCamelEnumCaseView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericUseKCamelEnumCaseView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericUseKCamelEnumCaseView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedUseKCamelEnumCaseView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericUseKCamelEnumCaseView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} +enum class EnumShoutyAndKCamel : ::std::uint64_t { + FIRST = static_cast(0LL), + kFirst = static_cast(0LL), + SECOND = static_cast(1LL), + kSecond = static_cast(1LL), + TWO_WORD = static_cast(2LL), + kTwoWord = static_cast(2LL), + THREE_WORD_ENUM = static_cast(4LL), + kThreeWordEnum = static_cast(4LL), + LONG_ENUM_VALUE_NAME = static_cast(8LL), + kLongEnumValueName = static_cast(8LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + EnumShoutyAndKCamel *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("FIRST", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::FIRST; + return true; + } + + if (!strcmp("FIRST", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::kFirst; + return true; + } + + if (!strcmp("SECOND", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::SECOND; + return true; + } + + if (!strcmp("SECOND", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::kSecond; + return true; + } + + if (!strcmp("TWO_WORD", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::TWO_WORD; + return true; + } + + if (!strcmp("TWO_WORD", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::kTwoWord; + return true; + } + + if (!strcmp("THREE_WORD_ENUM", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::THREE_WORD_ENUM; + return true; + } + + if (!strcmp("THREE_WORD_ENUM", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::kThreeWordEnum; + return true; + } + + if (!strcmp("LONG_ENUM_VALUE_NAME", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::LONG_ENUM_VALUE_NAME; + return true; + } + + if (!strcmp("LONG_ENUM_VALUE_NAME", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumShoutyAndKCamel::kLongEnumValueName; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + EnumShoutyAndKCamel emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case EnumShoutyAndKCamel::FIRST: return "FIRST"; + + case EnumShoutyAndKCamel::SECOND: return "SECOND"; + + case EnumShoutyAndKCamel::TWO_WORD: return "TWO_WORD"; + + case EnumShoutyAndKCamel::THREE_WORD_ENUM: return "THREE_WORD_ENUM"; + + case EnumShoutyAndKCamel::LONG_ENUM_VALUE_NAME: return "LONG_ENUM_VALUE_NAME"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(EnumShoutyAndKCamel emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case EnumShoutyAndKCamel::FIRST: return true; + + case EnumShoutyAndKCamel::SECOND: return true; + + case EnumShoutyAndKCamel::TWO_WORD: return true; + + case EnumShoutyAndKCamel::THREE_WORD_ENUM: return true; + + case EnumShoutyAndKCamel::LONG_ENUM_VALUE_NAME: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + EnumShoutyAndKCamel 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::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, + EnumShoutyAndKCamel *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + EnumShoutyAndKCamel emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(EnumShoutyAndKCamel emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + EnumShoutyAndKCamel emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class EnumMixed : ::std::uint64_t { + FIRST = static_cast(0LL), + kFirst = static_cast(0LL), + SECOND = static_cast(1LL), + kTwoWord = static_cast(2LL), + kThreeWordEnum = static_cast(4LL), + THREE_WORD_ENUM = static_cast(4LL), + kLongEnumValueName = static_cast(8LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + EnumMixed *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("FIRST", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumMixed::FIRST; + return true; + } + + if (!strcmp("FIRST", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumMixed::kFirst; + return true; + } + + if (!strcmp("SECOND", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumMixed::SECOND; + return true; + } + + if (!strcmp("TWO_WORD", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumMixed::kTwoWord; + return true; + } + + if (!strcmp("THREE_WORD_ENUM", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumMixed::kThreeWordEnum; + return true; + } + + if (!strcmp("THREE_WORD_ENUM", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumMixed::THREE_WORD_ENUM; + return true; + } + + if (!strcmp("LONG_ENUM_VALUE_NAME", emboss_reserved_local_name)) { + *emboss_reserved_local_result = EnumMixed::kLongEnumValueName; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + EnumMixed emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case EnumMixed::FIRST: return "FIRST"; + + case EnumMixed::SECOND: return "SECOND"; + + case EnumMixed::kTwoWord: return "TWO_WORD"; + + case EnumMixed::kThreeWordEnum: return "THREE_WORD_ENUM"; + + case EnumMixed::kLongEnumValueName: return "LONG_ENUM_VALUE_NAME"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(EnumMixed emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case EnumMixed::FIRST: return true; + + case EnumMixed::SECOND: return true; + + case EnumMixed::kTwoWord: return true; + + case EnumMixed::kThreeWordEnum: return true; + + case EnumMixed::kLongEnumValueName: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + EnumMixed 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::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, + EnumMixed *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + EnumMixed emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(EnumMixed emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + EnumMixed emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +namespace UseKCamelEnumCase { + +} // namespace UseKCamelEnumCase + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::EnumDefault, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericUseKCamelEnumCaseView::v() + const { + + if ( has_v().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::EnumDefault, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::EnumDefault, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericUseKCamelEnumCaseView::has_v() const { + return ::emboss::support::Maybe(true); +} + + +namespace UseKCamelEnumCase { +inline constexpr ::emboss::test::EnumDefault first() { + return ::emboss::support::Maybe(static_cast(0)).ValueOrDefault(); +} +} // namespace UseKCamelEnumCase + +template +inline constexpr ::emboss::test::EnumDefault +GenericUseKCamelEnumCaseView::EmbossReservedVirtualFirstView::Read() { + return UseKCamelEnumCase::first(); +} + +template +inline constexpr ::emboss::test::EnumDefault +GenericUseKCamelEnumCaseView< + Storage>::EmbossReservedVirtualFirstView::UncheckedRead() { + return UseKCamelEnumCase::first(); +} + +template +inline typename GenericUseKCamelEnumCaseView::EmbossReservedVirtualVIsFirstView +GenericUseKCamelEnumCaseView::v_is_first() const { + return + typename GenericUseKCamelEnumCaseView::EmbossReservedVirtualVIsFirstView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericUseKCamelEnumCaseView::has_v_is_first() const { + return ::emboss::support::Maybe(true); +} + + +namespace UseKCamelEnumCase { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace UseKCamelEnumCase + +template +inline constexpr ::std::int32_t +GenericUseKCamelEnumCaseView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return UseKCamelEnumCase::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUseKCamelEnumCaseView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return UseKCamelEnumCase::IntrinsicSizeInBytes(); +} + +namespace UseKCamelEnumCase { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace UseKCamelEnumCase + +template +inline constexpr ::std::int32_t +GenericUseKCamelEnumCaseView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return UseKCamelEnumCase::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUseKCamelEnumCaseView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return UseKCamelEnumCase::MaxSizeInBytes(); +} + +namespace UseKCamelEnumCase { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace UseKCamelEnumCase + +template +inline constexpr ::std::int32_t +GenericUseKCamelEnumCaseView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return UseKCamelEnumCase::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUseKCamelEnumCaseView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return UseKCamelEnumCase::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_ENUM_CASE_EMB_H_ + diff --git a/testdata/golden_cpp/explicit_sizes.emb.h b/testdata/golden_cpp/explicit_sizes.emb.h new file mode 100644 index 00000000..f8fd46f3 --- /dev/null +++ b/testdata/golden_cpp/explicit_sizes.emb.h @@ -0,0 +1,3199 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_EXPLICIT_SIZES_EMB_H_ +#define TESTDATA_EXPLICIT_SIZES_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace SizedUIntArrays { + +} // namespace SizedUIntArrays + + +template +class GenericSizedUIntArraysView; + +namespace SizedIntArrays { + +} // namespace SizedIntArrays + + +template +class GenericSizedIntArraysView; + +namespace SizedEnumArrays { + +} // namespace SizedEnumArrays + + +template +class GenericSizedEnumArraysView; + +namespace BitArrayContainer { + +} // namespace BitArrayContainer + + +template +class GenericBitArrayContainerView; + +enum class Enum : ::std::uint64_t; + + + + + + + +namespace SizedUIntArrays { + +} // namespace SizedUIntArrays + + +template +struct EmbossReservedInternalIsGenericSizedUIntArraysView; + +template +class GenericSizedUIntArraysView final { + public: + GenericSizedUIntArraysView() : backing_() {} + explicit GenericSizedUIntArraysView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericSizedUIntArraysView( + const GenericSizedUIntArraysView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericSizedUIntArraysView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericSizedUIntArraysView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericSizedUIntArraysView &operator=( + const GenericSizedUIntArraysView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_nibble().Known()) return false; + if (has_one_nibble().ValueOrDefault() && !one_nibble().Ok()) return false; + + + if (!has_two_nibble().Known()) return false; + if (has_two_nibble().ValueOrDefault() && !two_nibble().Ok()) return false; + + + if (!has_four_nibble().Known()) return false; + if (has_four_nibble().ValueOrDefault() && !four_nibble().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericSizedUIntArraysView emboss_reserved_local_other) const { + + if (!has_one_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_one_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOrDefault() && + !has_one_nibble().ValueOrDefault()) + return false; + if (has_one_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_one_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOrDefault() && + has_one_nibble().ValueOrDefault() && + !one_nibble().Equals(emboss_reserved_local_other.one_nibble())) + return false; + + + + if (!has_two_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_two_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOrDefault() && + !has_two_nibble().ValueOrDefault()) + return false; + if (has_two_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_two_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOrDefault() && + has_two_nibble().ValueOrDefault() && + !two_nibble().Equals(emboss_reserved_local_other.two_nibble())) + return false; + + + + if (!has_four_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_four_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOrDefault() && + !has_four_nibble().ValueOrDefault()) + return false; + if (has_four_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_four_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOrDefault() && + has_four_nibble().ValueOrDefault() && + !four_nibble().Equals(emboss_reserved_local_other.four_nibble())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericSizedUIntArraysView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && + !has_one_nibble().ValueOr(false)) + return false; + if (has_one_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_one_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && + has_one_nibble().ValueOr(false) && + !one_nibble().UncheckedEquals(emboss_reserved_local_other.one_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_two_nibble().ValueOr(false) && + !has_two_nibble().ValueOr(false)) + return false; + if (has_two_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_two_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOr(false) && + has_two_nibble().ValueOr(false) && + !two_nibble().UncheckedEquals(emboss_reserved_local_other.two_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_four_nibble().ValueOr(false) && + !has_four_nibble().ValueOr(false)) + return false; + if (has_four_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_four_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOr(false) && + has_four_nibble().ValueOr(false) && + !four_nibble().UncheckedEquals(emboss_reserved_local_other.four_nibble())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericSizedUIntArraysView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericSizedUIntArraysView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericSizedUIntArraysView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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_nibble") { + if (!one_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_nibble") { + if (!two_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_nibble") { + if (!four_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_nibble().IsAggregate() || one_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_nibble: "); + one_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_nibble().IsAggregate() && !one_nibble().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_nibble: UNREADABLE\n"); + } + } + + if (has_two_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_nibble().IsAggregate() || two_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_nibble: "); + two_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_nibble().IsAggregate() && !two_nibble().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_nibble: UNREADABLE\n"); + } + } + + if (has_four_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_nibble().IsAggregate() || four_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_nibble: "); + four_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_nibble().IsAggregate() && !four_nibble().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_nibble: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + + one_nibble() const; + ::emboss::support::Maybe has_one_nibble() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + + two_nibble() const; + ::emboss::support::Maybe has_two_nibble() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + + four_nibble() const; + ::emboss::support::Maybe has_four_nibble() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericSizedUIntArraysView; +}; +using SizedUIntArraysView = + GenericSizedUIntArraysView; +using SizedUIntArraysWriter = + GenericSizedUIntArraysView; + +template +struct EmbossReservedInternalIsGenericSizedUIntArraysView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericSizedUIntArraysView< + GenericSizedUIntArraysView> { + static constexpr const bool value = true; +}; + +template +inline GenericSizedUIntArraysView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeSizedUIntArraysView( T &&emboss_reserved_local_arg) { + return GenericSizedUIntArraysView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericSizedUIntArraysView> +MakeSizedUIntArraysView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizedUIntArraysView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericSizedUIntArraysView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedSizedUIntArraysView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizedUIntArraysView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace SizedIntArrays { + +} // namespace SizedIntArrays + + +template +struct EmbossReservedInternalIsGenericSizedIntArraysView; + +template +class GenericSizedIntArraysView final { + public: + GenericSizedIntArraysView() : backing_() {} + explicit GenericSizedIntArraysView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericSizedIntArraysView( + const GenericSizedIntArraysView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericSizedIntArraysView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericSizedIntArraysView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericSizedIntArraysView &operator=( + const GenericSizedIntArraysView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_nibble().Known()) return false; + if (has_one_nibble().ValueOrDefault() && !one_nibble().Ok()) return false; + + + if (!has_two_nibble().Known()) return false; + if (has_two_nibble().ValueOrDefault() && !two_nibble().Ok()) return false; + + + if (!has_four_nibble().Known()) return false; + if (has_four_nibble().ValueOrDefault() && !four_nibble().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericSizedIntArraysView emboss_reserved_local_other) const { + + if (!has_one_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_one_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOrDefault() && + !has_one_nibble().ValueOrDefault()) + return false; + if (has_one_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_one_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOrDefault() && + has_one_nibble().ValueOrDefault() && + !one_nibble().Equals(emboss_reserved_local_other.one_nibble())) + return false; + + + + if (!has_two_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_two_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOrDefault() && + !has_two_nibble().ValueOrDefault()) + return false; + if (has_two_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_two_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOrDefault() && + has_two_nibble().ValueOrDefault() && + !two_nibble().Equals(emboss_reserved_local_other.two_nibble())) + return false; + + + + if (!has_four_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_four_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOrDefault() && + !has_four_nibble().ValueOrDefault()) + return false; + if (has_four_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_four_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOrDefault() && + has_four_nibble().ValueOrDefault() && + !four_nibble().Equals(emboss_reserved_local_other.four_nibble())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericSizedIntArraysView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && + !has_one_nibble().ValueOr(false)) + return false; + if (has_one_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_one_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && + has_one_nibble().ValueOr(false) && + !one_nibble().UncheckedEquals(emboss_reserved_local_other.one_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_two_nibble().ValueOr(false) && + !has_two_nibble().ValueOr(false)) + return false; + if (has_two_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_two_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOr(false) && + has_two_nibble().ValueOr(false) && + !two_nibble().UncheckedEquals(emboss_reserved_local_other.two_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_four_nibble().ValueOr(false) && + !has_four_nibble().ValueOr(false)) + return false; + if (has_four_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_four_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOr(false) && + has_four_nibble().ValueOr(false) && + !four_nibble().UncheckedEquals(emboss_reserved_local_other.four_nibble())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericSizedIntArraysView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericSizedIntArraysView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericSizedIntArraysView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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_nibble") { + if (!one_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_nibble") { + if (!two_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_nibble") { + if (!four_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_nibble().IsAggregate() || one_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_nibble: "); + one_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_nibble().IsAggregate() && !one_nibble().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_nibble: UNREADABLE\n"); + } + } + + if (has_two_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_nibble().IsAggregate() || two_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_nibble: "); + two_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_nibble().IsAggregate() && !two_nibble().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_nibble: UNREADABLE\n"); + } + } + + if (has_four_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_nibble().IsAggregate() || four_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_nibble: "); + four_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_nibble().IsAggregate() && !four_nibble().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_nibble: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + + one_nibble() const; + ::emboss::support::Maybe has_one_nibble() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + + two_nibble() const; + ::emboss::support::Maybe has_two_nibble() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + + four_nibble() const; + ::emboss::support::Maybe has_four_nibble() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericSizedIntArraysView; +}; +using SizedIntArraysView = + GenericSizedIntArraysView; +using SizedIntArraysWriter = + GenericSizedIntArraysView; + +template +struct EmbossReservedInternalIsGenericSizedIntArraysView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericSizedIntArraysView< + GenericSizedIntArraysView> { + static constexpr const bool value = true; +}; + +template +inline GenericSizedIntArraysView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeSizedIntArraysView( T &&emboss_reserved_local_arg) { + return GenericSizedIntArraysView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericSizedIntArraysView> +MakeSizedIntArraysView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizedIntArraysView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericSizedIntArraysView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedSizedIntArraysView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizedIntArraysView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace SizedEnumArrays { + +} // namespace SizedEnumArrays + + +template +struct EmbossReservedInternalIsGenericSizedEnumArraysView; + +template +class GenericSizedEnumArraysView final { + public: + GenericSizedEnumArraysView() : backing_() {} + explicit GenericSizedEnumArraysView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericSizedEnumArraysView( + const GenericSizedEnumArraysView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericSizedEnumArraysView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericSizedEnumArraysView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericSizedEnumArraysView &operator=( + const GenericSizedEnumArraysView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_nibble().Known()) return false; + if (has_one_nibble().ValueOrDefault() && !one_nibble().Ok()) return false; + + + if (!has_two_nibble().Known()) return false; + if (has_two_nibble().ValueOrDefault() && !two_nibble().Ok()) return false; + + + if (!has_four_nibble().Known()) return false; + if (has_four_nibble().ValueOrDefault() && !four_nibble().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericSizedEnumArraysView emboss_reserved_local_other) const { + + if (!has_one_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_one_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOrDefault() && + !has_one_nibble().ValueOrDefault()) + return false; + if (has_one_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_one_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOrDefault() && + has_one_nibble().ValueOrDefault() && + !one_nibble().Equals(emboss_reserved_local_other.one_nibble())) + return false; + + + + if (!has_two_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_two_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOrDefault() && + !has_two_nibble().ValueOrDefault()) + return false; + if (has_two_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_two_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOrDefault() && + has_two_nibble().ValueOrDefault() && + !two_nibble().Equals(emboss_reserved_local_other.two_nibble())) + return false; + + + + if (!has_four_nibble().Known()) return false; + if (!emboss_reserved_local_other.has_four_nibble().Known()) return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOrDefault() && + !has_four_nibble().ValueOrDefault()) + return false; + if (has_four_nibble().ValueOrDefault() && + !emboss_reserved_local_other.has_four_nibble().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOrDefault() && + has_four_nibble().ValueOrDefault() && + !four_nibble().Equals(emboss_reserved_local_other.four_nibble())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericSizedEnumArraysView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && + !has_one_nibble().ValueOr(false)) + return false; + if (has_one_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_one_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_nibble().ValueOr(false) && + has_one_nibble().ValueOr(false) && + !one_nibble().UncheckedEquals(emboss_reserved_local_other.one_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_two_nibble().ValueOr(false) && + !has_two_nibble().ValueOr(false)) + return false; + if (has_two_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_two_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_nibble().ValueOr(false) && + has_two_nibble().ValueOr(false) && + !two_nibble().UncheckedEquals(emboss_reserved_local_other.two_nibble())) + return false; + + + + if (emboss_reserved_local_other.has_four_nibble().ValueOr(false) && + !has_four_nibble().ValueOr(false)) + return false; + if (has_four_nibble().ValueOr(false) && + !emboss_reserved_local_other.has_four_nibble().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_nibble().ValueOr(false) && + has_four_nibble().ValueOr(false) && + !four_nibble().UncheckedEquals(emboss_reserved_local_other.four_nibble())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericSizedEnumArraysView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericSizedEnumArraysView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericSizedEnumArraysView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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_nibble") { + if (!one_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_nibble") { + if (!two_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_nibble") { + if (!four_nibble().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_nibble().IsAggregate() || one_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_nibble: "); + one_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_nibble().IsAggregate() && !one_nibble().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_nibble: UNREADABLE\n"); + } + } + + if (has_two_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_nibble().IsAggregate() || two_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_nibble: "); + two_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_nibble().IsAggregate() && !two_nibble().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_nibble: UNREADABLE\n"); + } + } + + if (has_four_nibble().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_nibble().IsAggregate() || four_nibble().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_nibble: "); + four_nibble().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_nibble().IsAggregate() && !four_nibble().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_nibble: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + + one_nibble() const; + ::emboss::support::Maybe has_one_nibble() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + + two_nibble() const; + ::emboss::support::Maybe has_two_nibble() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + + four_nibble() const; + ::emboss::support::Maybe has_four_nibble() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericSizedEnumArraysView; +}; +using SizedEnumArraysView = + GenericSizedEnumArraysView; +using SizedEnumArraysWriter = + GenericSizedEnumArraysView; + +template +struct EmbossReservedInternalIsGenericSizedEnumArraysView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericSizedEnumArraysView< + GenericSizedEnumArraysView> { + static constexpr const bool value = true; +}; + +template +inline GenericSizedEnumArraysView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeSizedEnumArraysView( T &&emboss_reserved_local_arg) { + return GenericSizedEnumArraysView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericSizedEnumArraysView> +MakeSizedEnumArraysView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizedEnumArraysView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericSizedEnumArraysView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedSizedEnumArraysView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizedEnumArraysView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace BitArrayContainer { + +} // namespace BitArrayContainer + + +template +struct EmbossReservedInternalIsGenericBitArrayContainerView; + +template +class GenericBitArrayContainerView final { + public: + GenericBitArrayContainerView() : backing_() {} + explicit GenericBitArrayContainerView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBitArrayContainerView( + const GenericBitArrayContainerView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBitArrayContainerView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBitArrayContainerView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBitArrayContainerView &operator=( + const GenericBitArrayContainerView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_uint_arrays().Known()) return false; + if (has_uint_arrays().ValueOrDefault() && !uint_arrays().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericBitArrayContainerView emboss_reserved_local_other) const { + + if (!has_uint_arrays().Known()) return false; + if (!emboss_reserved_local_other.has_uint_arrays().Known()) return false; + + if (emboss_reserved_local_other.has_uint_arrays().ValueOrDefault() && + !has_uint_arrays().ValueOrDefault()) + return false; + if (has_uint_arrays().ValueOrDefault() && + !emboss_reserved_local_other.has_uint_arrays().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_uint_arrays().ValueOrDefault() && + has_uint_arrays().ValueOrDefault() && + !uint_arrays().Equals(emboss_reserved_local_other.uint_arrays())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericBitArrayContainerView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_uint_arrays().ValueOr(false) && + !has_uint_arrays().ValueOr(false)) + return false; + if (has_uint_arrays().ValueOr(false) && + !emboss_reserved_local_other.has_uint_arrays().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_uint_arrays().ValueOr(false) && + has_uint_arrays().ValueOr(false) && + !uint_arrays().UncheckedEquals(emboss_reserved_local_other.uint_arrays())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericBitArrayContainerView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBitArrayContainerView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBitArrayContainerView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "uint_arrays") { + if (!uint_arrays().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_uint_arrays().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + uint_arrays().IsAggregate() || uint_arrays().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("uint_arrays: "); + uint_arrays().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !uint_arrays().IsAggregate() && !uint_arrays().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("# uint_arrays: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericSizedUIntArraysView>, 56>> + + uint_arrays() const; + ::emboss::support::Maybe has_uint_arrays() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBitArrayContainerView; +}; +using BitArrayContainerView = + GenericBitArrayContainerView; +using BitArrayContainerWriter = + GenericBitArrayContainerView; + +template +struct EmbossReservedInternalIsGenericBitArrayContainerView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBitArrayContainerView< + GenericBitArrayContainerView> { + static constexpr const bool value = true; +}; + +template +inline GenericBitArrayContainerView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBitArrayContainerView( T &&emboss_reserved_local_arg) { + return GenericBitArrayContainerView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBitArrayContainerView> +MakeBitArrayContainerView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBitArrayContainerView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBitArrayContainerView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBitArrayContainerView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBitArrayContainerView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} +enum class Enum : ::std::uint64_t { + VALUE1 = static_cast(1LL), + VALUE10 = static_cast(10LL), + VALUE100 = static_cast(100LL), + VALUE1000 = static_cast(1000LL), + VALUE10000 = static_cast(10000LL), + VALUE100000 = static_cast(100000LL), + VALUE1000000 = static_cast(1000000LL), + VALUE10000000 = static_cast(10000000LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Enum *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("VALUE1", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE1; + return true; + } + + if (!strcmp("VALUE10", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE10; + return true; + } + + if (!strcmp("VALUE100", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE100; + return true; + } + + if (!strcmp("VALUE1000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE1000; + return true; + } + + if (!strcmp("VALUE10000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE10000; + return true; + } + + if (!strcmp("VALUE100000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE100000; + return true; + } + + if (!strcmp("VALUE1000000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE1000000; + return true; + } + + if (!strcmp("VALUE10000000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE10000000; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Enum emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Enum::VALUE1: return "VALUE1"; + + case Enum::VALUE10: return "VALUE10"; + + case Enum::VALUE100: return "VALUE100"; + + case Enum::VALUE1000: return "VALUE1000"; + + case Enum::VALUE10000: return "VALUE10000"; + + case Enum::VALUE100000: return "VALUE100000"; + + case Enum::VALUE1000000: return "VALUE1000000"; + + case Enum::VALUE10000000: return "VALUE10000000"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Enum emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Enum::VALUE1: return true; + + case Enum::VALUE10: return true; + + case Enum::VALUE100: return true; + + case Enum::VALUE1000: return true; + + case Enum::VALUE10000: return true; + + case Enum::VALUE100000: return true; + + case Enum::VALUE1000000: return true; + + case Enum::VALUE10000000: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Enum 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::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, + Enum *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Enum emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Enum emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Enum emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +namespace SizedUIntArrays { + +} // namespace SizedUIntArrays + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + + GenericSizedUIntArraysView::one_nibble() + const { + + if ( has_one_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedUIntArraysView::has_one_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + + GenericSizedUIntArraysView::two_nibble() + const { + + if ( has_two_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(16LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(8LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 8>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedUIntArraysView::has_two_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + + GenericSizedUIntArraysView::four_nibble() + const { + + if ( has_four_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(32LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(24LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 24>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedUIntArraysView::has_four_nibble() const { + return ::emboss::support::Maybe(true); +} + + +namespace SizedUIntArrays { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedUIntArrays + +template +inline constexpr ::std::int32_t +GenericSizedUIntArraysView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return SizedUIntArrays::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedUIntArraysView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return SizedUIntArrays::IntrinsicSizeInBits(); +} + +namespace SizedUIntArrays { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedUIntArrays + +template +inline constexpr ::std::int32_t +GenericSizedUIntArraysView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return SizedUIntArrays::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedUIntArraysView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return SizedUIntArrays::MaxSizeInBits(); +} + +namespace SizedUIntArrays { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedUIntArrays + +template +inline constexpr ::std::int32_t +GenericSizedUIntArraysView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return SizedUIntArrays::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedUIntArraysView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return SizedUIntArrays::MinSizeInBits(); +} +namespace SizedIntArrays { + +} // namespace SizedIntArrays + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + + GenericSizedIntArraysView::one_nibble() + const { + + if ( has_one_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedIntArraysView::has_one_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + + GenericSizedIntArraysView::two_nibble() + const { + + if ( has_two_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(16LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(8LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 8>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedIntArraysView::has_two_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + + GenericSizedIntArraysView::four_nibble() + const { + + if ( has_four_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(32LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(24LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 24>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedIntArraysView::has_four_nibble() const { + return ::emboss::support::Maybe(true); +} + + +namespace SizedIntArrays { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedIntArrays + +template +inline constexpr ::std::int32_t +GenericSizedIntArraysView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return SizedIntArrays::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedIntArraysView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return SizedIntArrays::IntrinsicSizeInBits(); +} + +namespace SizedIntArrays { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedIntArrays + +template +inline constexpr ::std::int32_t +GenericSizedIntArraysView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return SizedIntArrays::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedIntArraysView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return SizedIntArrays::MaxSizeInBits(); +} + +namespace SizedIntArrays { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedIntArrays + +template +inline constexpr ::std::int32_t +GenericSizedIntArraysView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return SizedIntArrays::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedIntArraysView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return SizedIntArrays::MinSizeInBits(); +} +namespace SizedEnumArrays { + +} // namespace SizedEnumArrays + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + + GenericSizedEnumArraysView::one_nibble() + const { + + if ( has_one_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<4, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedEnumArraysView::has_one_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + + GenericSizedEnumArraysView::two_nibble() + const { + + if ( has_two_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(16LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(8LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 8>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 8, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedEnumArraysView::has_two_nibble() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + + GenericSizedEnumArraysView::four_nibble() + const { + + if ( has_four_nibble().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(32LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(24LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + +( + backing_ + .template GetOffsetStorage<0, + 24>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 16, + 1 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedEnumArraysView::has_four_nibble() const { + return ::emboss::support::Maybe(true); +} + + +namespace SizedEnumArrays { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedEnumArrays + +template +inline constexpr ::std::int32_t +GenericSizedEnumArraysView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return SizedEnumArrays::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedEnumArraysView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return SizedEnumArrays::IntrinsicSizeInBits(); +} + +namespace SizedEnumArrays { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedEnumArrays + +template +inline constexpr ::std::int32_t +GenericSizedEnumArraysView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return SizedEnumArrays::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedEnumArraysView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return SizedEnumArrays::MaxSizeInBits(); +} + +namespace SizedEnumArrays { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(56LL)).ValueOrDefault(); +} +} // namespace SizedEnumArrays + +template +inline constexpr ::std::int32_t +GenericSizedEnumArraysView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return SizedEnumArrays::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericSizedEnumArraysView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return SizedEnumArrays::MinSizeInBits(); +} +namespace BitArrayContainer { + +} // namespace BitArrayContainer + + +template +inline typename ::emboss::test::GenericSizedUIntArraysView>, 56>> + + GenericBitArrayContainerView::uint_arrays() + const { + + if ( has_uint_arrays().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(7LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericSizedUIntArraysView>, 56>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericSizedUIntArraysView>, 56>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBitArrayContainerView::has_uint_arrays() const { + return ::emboss::support::Maybe(true); +} + + +namespace BitArrayContainer { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(7LL)).ValueOrDefault(); +} +} // namespace BitArrayContainer + +template +inline constexpr ::std::int32_t +GenericBitArrayContainerView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return BitArrayContainer::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBitArrayContainerView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return BitArrayContainer::IntrinsicSizeInBytes(); +} + +namespace BitArrayContainer { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(7LL)).ValueOrDefault(); +} +} // namespace BitArrayContainer + +template +inline constexpr ::std::int32_t +GenericBitArrayContainerView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return BitArrayContainer::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBitArrayContainerView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return BitArrayContainer::MaxSizeInBytes(); +} + +namespace BitArrayContainer { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(7LL)).ValueOrDefault(); +} +} // namespace BitArrayContainer + +template +inline constexpr ::std::int32_t +GenericBitArrayContainerView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return BitArrayContainer::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBitArrayContainerView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return BitArrayContainer::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_EXPLICIT_SIZES_EMB_H_ + diff --git a/testdata/golden_cpp/float.emb.h b/testdata/golden_cpp/float.emb.h new file mode 100644 index 00000000..d43d32e2 --- /dev/null +++ b/testdata/golden_cpp/float.emb.h @@ -0,0 +1,1348 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_FLOAT_EMB_H_ +#define TESTDATA_FLOAT_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Floats { + +} // namespace Floats + + +template +class GenericFloatsView; + +namespace Doubles { + +} // namespace Doubles + + +template +class GenericDoublesView; + + + + + + +namespace Floats { + +} // namespace Floats + + +template +struct EmbossReservedInternalIsGenericFloatsView; + +template +class GenericFloatsView final { + public: + GenericFloatsView() : backing_() {} + explicit GenericFloatsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericFloatsView( + const GenericFloatsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericFloatsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericFloatsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericFloatsView &operator=( + const GenericFloatsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_float_little_endian().Known()) return false; + if (has_float_little_endian().ValueOrDefault() && !float_little_endian().Ok()) return false; + + + if (!has_float_big_endian().Known()) return false; + if (has_float_big_endian().ValueOrDefault() && !float_big_endian().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericFloatsView emboss_reserved_local_other) const { + + if (!has_float_little_endian().Known()) return false; + if (!emboss_reserved_local_other.has_float_little_endian().Known()) return false; + + if (emboss_reserved_local_other.has_float_little_endian().ValueOrDefault() && + !has_float_little_endian().ValueOrDefault()) + return false; + if (has_float_little_endian().ValueOrDefault() && + !emboss_reserved_local_other.has_float_little_endian().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_float_little_endian().ValueOrDefault() && + has_float_little_endian().ValueOrDefault() && + !float_little_endian().Equals(emboss_reserved_local_other.float_little_endian())) + return false; + + + + if (!has_float_big_endian().Known()) return false; + if (!emboss_reserved_local_other.has_float_big_endian().Known()) return false; + + if (emboss_reserved_local_other.has_float_big_endian().ValueOrDefault() && + !has_float_big_endian().ValueOrDefault()) + return false; + if (has_float_big_endian().ValueOrDefault() && + !emboss_reserved_local_other.has_float_big_endian().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_float_big_endian().ValueOrDefault() && + has_float_big_endian().ValueOrDefault() && + !float_big_endian().Equals(emboss_reserved_local_other.float_big_endian())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericFloatsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_float_little_endian().ValueOr(false) && + !has_float_little_endian().ValueOr(false)) + return false; + if (has_float_little_endian().ValueOr(false) && + !emboss_reserved_local_other.has_float_little_endian().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_float_little_endian().ValueOr(false) && + has_float_little_endian().ValueOr(false) && + !float_little_endian().UncheckedEquals(emboss_reserved_local_other.float_little_endian())) + return false; + + + + if (emboss_reserved_local_other.has_float_big_endian().ValueOr(false) && + !has_float_big_endian().ValueOr(false)) + return false; + if (has_float_big_endian().ValueOr(false) && + !emboss_reserved_local_other.has_float_big_endian().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_float_big_endian().ValueOr(false) && + has_float_big_endian().ValueOr(false) && + !float_big_endian().UncheckedEquals(emboss_reserved_local_other.float_big_endian())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericFloatsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericFloatsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericFloatsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "float_little_endian") { + if (!float_little_endian().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "float_big_endian") { + if (!float_big_endian().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_float_little_endian().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + float_little_endian().IsAggregate() || float_little_endian().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("float_little_endian: "); + float_little_endian().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !float_little_endian().IsAggregate() && !float_little_endian().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("# float_little_endian: UNREADABLE\n"); + } + } + + if (has_float_big_endian().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + float_big_endian().IsAggregate() || float_big_endian().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("float_big_endian: "); + float_big_endian().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !float_big_endian().IsAggregate() && !float_big_endian().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("# float_big_endian: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 32>> + + float_little_endian() const; + ::emboss::support::Maybe has_float_little_endian() const; + + public: + typename ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + float_big_endian() const; + ::emboss::support::Maybe has_float_big_endian() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericFloatsView; +}; +using FloatsView = + GenericFloatsView; +using FloatsWriter = + GenericFloatsView; + +template +struct EmbossReservedInternalIsGenericFloatsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericFloatsView< + GenericFloatsView> { + static constexpr const bool value = true; +}; + +template +inline GenericFloatsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeFloatsView( T &&emboss_reserved_local_arg) { + return GenericFloatsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericFloatsView> +MakeFloatsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFloatsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericFloatsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedFloatsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFloatsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace Doubles { + +} // namespace Doubles + + +template +struct EmbossReservedInternalIsGenericDoublesView; + +template +class GenericDoublesView final { + public: + GenericDoublesView() : backing_() {} + explicit GenericDoublesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericDoublesView( + const GenericDoublesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericDoublesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericDoublesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericDoublesView &operator=( + const GenericDoublesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_double_little_endian().Known()) return false; + if (has_double_little_endian().ValueOrDefault() && !double_little_endian().Ok()) return false; + + + if (!has_double_big_endian().Known()) return false; + if (has_double_big_endian().ValueOrDefault() && !double_big_endian().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericDoublesView emboss_reserved_local_other) const { + + if (!has_double_little_endian().Known()) return false; + if (!emboss_reserved_local_other.has_double_little_endian().Known()) return false; + + if (emboss_reserved_local_other.has_double_little_endian().ValueOrDefault() && + !has_double_little_endian().ValueOrDefault()) + return false; + if (has_double_little_endian().ValueOrDefault() && + !emboss_reserved_local_other.has_double_little_endian().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_double_little_endian().ValueOrDefault() && + has_double_little_endian().ValueOrDefault() && + !double_little_endian().Equals(emboss_reserved_local_other.double_little_endian())) + return false; + + + + if (!has_double_big_endian().Known()) return false; + if (!emboss_reserved_local_other.has_double_big_endian().Known()) return false; + + if (emboss_reserved_local_other.has_double_big_endian().ValueOrDefault() && + !has_double_big_endian().ValueOrDefault()) + return false; + if (has_double_big_endian().ValueOrDefault() && + !emboss_reserved_local_other.has_double_big_endian().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_double_big_endian().ValueOrDefault() && + has_double_big_endian().ValueOrDefault() && + !double_big_endian().Equals(emboss_reserved_local_other.double_big_endian())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericDoublesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_double_little_endian().ValueOr(false) && + !has_double_little_endian().ValueOr(false)) + return false; + if (has_double_little_endian().ValueOr(false) && + !emboss_reserved_local_other.has_double_little_endian().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_double_little_endian().ValueOr(false) && + has_double_little_endian().ValueOr(false) && + !double_little_endian().UncheckedEquals(emboss_reserved_local_other.double_little_endian())) + return false; + + + + if (emboss_reserved_local_other.has_double_big_endian().ValueOr(false) && + !has_double_big_endian().ValueOr(false)) + return false; + if (has_double_big_endian().ValueOr(false) && + !emboss_reserved_local_other.has_double_big_endian().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_double_big_endian().ValueOr(false) && + has_double_big_endian().ValueOr(false) && + !double_big_endian().UncheckedEquals(emboss_reserved_local_other.double_big_endian())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericDoublesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericDoublesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericDoublesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "double_little_endian") { + if (!double_little_endian().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "double_big_endian") { + if (!double_big_endian().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_double_little_endian().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + double_little_endian().IsAggregate() || double_little_endian().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("double_little_endian: "); + double_little_endian().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !double_little_endian().IsAggregate() && !double_little_endian().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("# double_little_endian: UNREADABLE\n"); + } + } + + if (has_double_big_endian().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + double_big_endian().IsAggregate() || double_big_endian().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("double_big_endian: "); + double_big_endian().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !double_big_endian().IsAggregate() && !double_big_endian().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("# double_big_endian: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + double_little_endian() const; + ::emboss::support::Maybe has_double_little_endian() const; + + public: + typename ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + double_big_endian() const; + ::emboss::support::Maybe has_double_big_endian() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericDoublesView; +}; +using DoublesView = + GenericDoublesView; +using DoublesWriter = + GenericDoublesView; + +template +struct EmbossReservedInternalIsGenericDoublesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericDoublesView< + GenericDoublesView> { + static constexpr const bool value = true; +}; + +template +inline GenericDoublesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeDoublesView( T &&emboss_reserved_local_arg) { + return GenericDoublesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericDoublesView> +MakeDoublesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDoublesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericDoublesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedDoublesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericDoublesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Floats { + +} // namespace Floats + + +template +inline typename ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericFloatsView::float_little_endian() + const { + + if ( has_float_little_endian().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFloatsView::has_float_little_endian() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericFloatsView::float_big_endian() + const { + + if ( has_float_big_endian().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFloatsView::has_float_big_endian() const { + return ::emboss::support::Maybe(true); +} + + +namespace Floats { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Floats + +template +inline constexpr ::std::int32_t +GenericFloatsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Floats::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFloatsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Floats::IntrinsicSizeInBytes(); +} + +namespace Floats { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Floats + +template +inline constexpr ::std::int32_t +GenericFloatsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Floats::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFloatsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Floats::MaxSizeInBytes(); +} + +namespace Floats { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Floats + +template +inline constexpr ::std::int32_t +GenericFloatsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Floats::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFloatsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Floats::MinSizeInBytes(); +} +namespace Doubles { + +} // namespace Doubles + + +template +inline typename ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericDoublesView::double_little_endian() + const { + + if ( has_double_little_endian().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDoublesView::has_double_little_endian() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericDoublesView::double_big_endian() + const { + + if ( has_double_big_endian().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(8LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 8>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FloatView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericDoublesView::has_double_big_endian() const { + return ::emboss::support::Maybe(true); +} + + +namespace Doubles { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Doubles + +template +inline constexpr ::std::int32_t +GenericDoublesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Doubles::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDoublesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Doubles::IntrinsicSizeInBytes(); +} + +namespace Doubles { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Doubles + +template +inline constexpr ::std::int32_t +GenericDoublesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Doubles::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDoublesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Doubles::MaxSizeInBytes(); +} + +namespace Doubles { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Doubles + +template +inline constexpr ::std::int32_t +GenericDoublesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Doubles::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericDoublesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Doubles::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_FLOAT_EMB_H_ + diff --git a/testdata/golden_cpp/generate_golden_files.sh b/testdata/golden_cpp/generate_golden_files.sh new file mode 100755 index 00000000..97f2ae61 --- /dev/null +++ b/testdata/golden_cpp/generate_golden_files.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e +set -x + +# Bazel sets TEST_TMPDIR to a temporary directory for the test to use. +readonly GEN_DIR="$TEST_TMPDIR/generated_headers" +mkdir -p "$GEN_DIR" + +# The script's working directory is the root of the runfiles tree. +# All data dependencies are available at their workspace-relative paths. +export PYTHONPATH=. + +for emb_file in $(find testdata -maxdepth 1 -name "*.emb" -not -name "importer.emb" -not -name "importer2.emb" -not -name "imported_genfiles.emb"); do + base_name=$(basename "$emb_file") + ir_file="$TEST_TMPDIR/${base_name}.ir.json" + h_file="$GEN_DIR/${base_name}.h" + + # Run the compiler. + python3 compiler/front_end/emboss_front_end.py --output-file "$ir_file" "$emb_file" + python3 compiler/back_end/cpp/emboss_codegen_cpp.py --input-file "$ir_file" --output-file "$h_file" +done + +# Compare the generated files with the golden files. +echo "Comparing generated files to golden files..." +diff --brief --recursive --strip-trailing-cr --exclude="generate_golden_files.sh" "$GEN_DIR" "testdata/golden_cpp" diff --git a/testdata/golden_cpp/imported.emb.h b/testdata/golden_cpp/imported.emb.h new file mode 100644 index 00000000..22175434 --- /dev/null +++ b/testdata/golden_cpp/imported.emb.h @@ -0,0 +1,571 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_IMPORTED_EMB_H_ +#define TESTDATA_IMPORTED_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Inner { + +} // namespace Inner + + +template +class GenericInnerView; + + + + + +namespace Inner { + +} // namespace Inner + + +template +struct EmbossReservedInternalIsGenericInnerView; + +template +class GenericInnerView final { + public: + GenericInnerView() : backing_() {} + explicit GenericInnerView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericInnerView( + const GenericInnerView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericInnerView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericInnerView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericInnerView &operator=( + const GenericInnerView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericInnerView emboss_reserved_local_other) const { + + if (!has_value().Known()) return false; + if (!emboss_reserved_local_other.has_value().Known()) return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + !has_value().ValueOrDefault()) + return false; + if (has_value().ValueOrDefault() && + !emboss_reserved_local_other.has_value().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + has_value().ValueOrDefault() && + !value().Equals(emboss_reserved_local_other.value())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericInnerView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + !has_value().ValueOr(false)) + return false; + if (has_value().ValueOr(false) && + !emboss_reserved_local_other.has_value().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + has_value().ValueOr(false) && + !value().UncheckedEquals(emboss_reserved_local_other.value())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericInnerView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericInnerView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericInnerView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "value") { + if (!value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value: "); + value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value().IsAggregate() && !value().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("# value: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + value() const; + ::emboss::support::Maybe has_value() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericInnerView; +}; +using InnerView = + GenericInnerView; +using InnerWriter = + GenericInnerView; + +template +struct EmbossReservedInternalIsGenericInnerView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericInnerView< + GenericInnerView> { + static constexpr const bool value = true; +}; + +template +inline GenericInnerView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeInnerView( T &&emboss_reserved_local_arg) { + return GenericInnerView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericInnerView> +MakeInnerView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericInnerView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericInnerView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedInnerView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericInnerView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Inner { + +} // namespace Inner + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericInnerView::value() + const { + + if ( has_value().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInnerView::has_value() const { + return ::emboss::support::Maybe(true); +} + + +namespace Inner { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Inner + +template +inline constexpr ::std::int32_t +GenericInnerView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Inner::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInnerView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Inner::IntrinsicSizeInBytes(); +} + +namespace Inner { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Inner + +template +inline constexpr ::std::int32_t +GenericInnerView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Inner::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInnerView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Inner::MaxSizeInBytes(); +} + +namespace Inner { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Inner + +template +inline constexpr ::std::int32_t +GenericInnerView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Inner::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInnerView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Inner::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_IMPORTED_EMB_H_ + diff --git a/testdata/golden_cpp/imported_genfiles.emb.h b/testdata/golden_cpp/imported_genfiles.emb.h new file mode 100644 index 00000000..af1ef316 --- /dev/null +++ b/testdata/golden_cpp/imported_genfiles.emb.h @@ -0,0 +1,576 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_IMPORTED_GENFILES_EMB_H_ +#define TESTDATA_IMPORTED_GENFILES_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace generated { +namespace Inner { + +} // namespace Inner + + +template +class GenericInnerView; + + + + + +namespace Inner { + +} // namespace Inner + + +template +struct EmbossReservedInternalIsGenericInnerView; + +template +class GenericInnerView final { + public: + GenericInnerView() : backing_() {} + explicit GenericInnerView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericInnerView( + const GenericInnerView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericInnerView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericInnerView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericInnerView &operator=( + const GenericInnerView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericInnerView emboss_reserved_local_other) const { + + if (!has_value().Known()) return false; + if (!emboss_reserved_local_other.has_value().Known()) return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + !has_value().ValueOrDefault()) + return false; + if (has_value().ValueOrDefault() && + !emboss_reserved_local_other.has_value().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + has_value().ValueOrDefault() && + !value().Equals(emboss_reserved_local_other.value())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericInnerView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + !has_value().ValueOr(false)) + return false; + if (has_value().ValueOr(false) && + !emboss_reserved_local_other.has_value().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + has_value().ValueOr(false) && + !value().UncheckedEquals(emboss_reserved_local_other.value())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericInnerView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericInnerView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericInnerView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "value") { + if (!value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value: "); + value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value().IsAggregate() && !value().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("# value: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + value() const; + ::emboss::support::Maybe has_value() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericInnerView; +}; +using InnerView = + GenericInnerView; +using InnerWriter = + GenericInnerView; + +template +struct EmbossReservedInternalIsGenericInnerView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericInnerView< + GenericInnerView> { + static constexpr const bool value = true; +}; + +template +inline GenericInnerView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeInnerView( T &&emboss_reserved_local_arg) { + return GenericInnerView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericInnerView> +MakeInnerView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericInnerView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericInnerView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedInnerView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericInnerView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Inner { + +} // namespace Inner + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericInnerView::value() + const { + + if ( has_value().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInnerView::has_value() const { + return ::emboss::support::Maybe(true); +} + + +namespace Inner { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Inner + +template +inline constexpr ::std::int32_t +GenericInnerView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Inner::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInnerView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Inner::IntrinsicSizeInBytes(); +} + +namespace Inner { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Inner + +template +inline constexpr ::std::int32_t +GenericInnerView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Inner::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInnerView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Inner::MaxSizeInBytes(); +} + +namespace Inner { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Inner + +template +inline constexpr ::std::int32_t +GenericInnerView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Inner::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInnerView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Inner::MinSizeInBytes(); +} + + + +} // namespace generated + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_IMPORTED_GENFILES_EMB_H_ + diff --git a/testdata/golden_cpp/importer.emb.h b/testdata/golden_cpp/importer.emb.h new file mode 100644 index 00000000..75ad2d26 --- /dev/null +++ b/testdata/golden_cpp/importer.emb.h @@ -0,0 +1,683 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_IMPORTER_EMB_H_ +#define TESTDATA_IMPORTER_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + +#include "testdata/imported.emb.h" + +#include "testdata/imported_genfiles.emb.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Outer { + +} // namespace Outer + + +template +class GenericOuterView; + + + + + + +namespace Outer { + +} // namespace Outer + + +template +struct EmbossReservedInternalIsGenericOuterView; + +template +class GenericOuterView final { + public: + GenericOuterView() : backing_() {} + explicit GenericOuterView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericOuterView( + const GenericOuterView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericOuterView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericOuterView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericOuterView &operator=( + const GenericOuterView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_inner().Known()) return false; + if (has_inner().ValueOrDefault() && !inner().Ok()) return false; + + + if (!has_inner_gen().Known()) return false; + if (has_inner_gen().ValueOrDefault() && !inner_gen().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericOuterView emboss_reserved_local_other) const { + + if (!has_inner().Known()) return false; + if (!emboss_reserved_local_other.has_inner().Known()) return false; + + if (emboss_reserved_local_other.has_inner().ValueOrDefault() && + !has_inner().ValueOrDefault()) + return false; + if (has_inner().ValueOrDefault() && + !emboss_reserved_local_other.has_inner().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_inner().ValueOrDefault() && + has_inner().ValueOrDefault() && + !inner().Equals(emboss_reserved_local_other.inner())) + return false; + + + + if (!has_inner_gen().Known()) return false; + if (!emboss_reserved_local_other.has_inner_gen().Known()) return false; + + if (emboss_reserved_local_other.has_inner_gen().ValueOrDefault() && + !has_inner_gen().ValueOrDefault()) + return false; + if (has_inner_gen().ValueOrDefault() && + !emboss_reserved_local_other.has_inner_gen().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_inner_gen().ValueOrDefault() && + has_inner_gen().ValueOrDefault() && + !inner_gen().Equals(emboss_reserved_local_other.inner_gen())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericOuterView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_inner().ValueOr(false) && + !has_inner().ValueOr(false)) + return false; + if (has_inner().ValueOr(false) && + !emboss_reserved_local_other.has_inner().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_inner().ValueOr(false) && + has_inner().ValueOr(false) && + !inner().UncheckedEquals(emboss_reserved_local_other.inner())) + return false; + + + + if (emboss_reserved_local_other.has_inner_gen().ValueOr(false) && + !has_inner_gen().ValueOr(false)) + return false; + if (has_inner_gen().ValueOr(false) && + !emboss_reserved_local_other.has_inner_gen().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_inner_gen().ValueOr(false) && + has_inner_gen().ValueOr(false) && + !inner_gen().UncheckedEquals(emboss_reserved_local_other.inner_gen())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericOuterView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericOuterView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericOuterView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "inner") { + if (!inner().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "inner_gen") { + if (!inner_gen().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_inner().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + inner().IsAggregate() || inner().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("inner: "); + inner().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !inner().IsAggregate() && !inner().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("# inner: UNREADABLE\n"); + } + } + + if (has_inner_gen().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + inner_gen().IsAggregate() || inner_gen().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("inner_gen: "); + inner_gen().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !inner_gen().IsAggregate() && !inner_gen().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("# inner_gen: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericInnerView> + + inner() const; + ::emboss::support::Maybe has_inner() const; + + public: + typename ::emboss::test::generated::GenericInnerView> + + inner_gen() const; + ::emboss::support::Maybe has_inner_gen() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericOuterView; +}; +using OuterView = + GenericOuterView; +using OuterWriter = + GenericOuterView; + +template +struct EmbossReservedInternalIsGenericOuterView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericOuterView< + GenericOuterView> { + static constexpr const bool value = true; +}; + +template +inline GenericOuterView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeOuterView( T &&emboss_reserved_local_arg) { + return GenericOuterView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericOuterView> +MakeOuterView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOuterView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericOuterView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedOuterView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOuterView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Outer { + +} // namespace Outer + + +template +inline typename ::emboss::test::GenericInnerView> + + GenericOuterView::inner() + const { + + if ( has_inner().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericInnerView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericInnerView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOuterView::has_inner() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::generated::GenericInnerView> + + GenericOuterView::inner_gen() + const { + + if ( has_inner_gen().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(8LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::generated::GenericInnerView> + +( + backing_ + .template GetOffsetStorage<0, + 8>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::generated::GenericInnerView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOuterView::has_inner_gen() const { + return ::emboss::support::Maybe(true); +} + + +namespace Outer { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Outer + +template +inline constexpr ::std::int32_t +GenericOuterView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Outer::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOuterView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Outer::IntrinsicSizeInBytes(); +} + +namespace Outer { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Outer + +template +inline constexpr ::std::int32_t +GenericOuterView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Outer::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOuterView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Outer::MaxSizeInBytes(); +} + +namespace Outer { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Outer + +template +inline constexpr ::std::int32_t +GenericOuterView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Outer::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOuterView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Outer::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_IMPORTER_EMB_H_ + diff --git a/testdata/golden_cpp/importer2.emb.h b/testdata/golden_cpp/importer2.emb.h new file mode 100644 index 00000000..ca22c93f --- /dev/null +++ b/testdata/golden_cpp/importer2.emb.h @@ -0,0 +1,565 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_IMPORTER2_EMB_H_ +#define TESTDATA_IMPORTER2_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + +#include "testdata/importer.emb.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Outer2 { + +} // namespace Outer2 + + +template +class GenericOuter2View; + + + + + +namespace Outer2 { + +} // namespace Outer2 + + +template +struct EmbossReservedInternalIsGenericOuter2View; + +template +class GenericOuter2View final { + public: + GenericOuter2View() : backing_() {} + explicit GenericOuter2View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericOuter2View( + const GenericOuter2View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericOuter2View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericOuter2View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericOuter2View &operator=( + const GenericOuter2View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_outer().Known()) return false; + if (has_outer().ValueOrDefault() && !outer().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericOuter2View emboss_reserved_local_other) const { + + if (!has_outer().Known()) return false; + if (!emboss_reserved_local_other.has_outer().Known()) return false; + + if (emboss_reserved_local_other.has_outer().ValueOrDefault() && + !has_outer().ValueOrDefault()) + return false; + if (has_outer().ValueOrDefault() && + !emboss_reserved_local_other.has_outer().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_outer().ValueOrDefault() && + has_outer().ValueOrDefault() && + !outer().Equals(emboss_reserved_local_other.outer())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericOuter2View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_outer().ValueOr(false) && + !has_outer().ValueOr(false)) + return false; + if (has_outer().ValueOr(false) && + !emboss_reserved_local_other.has_outer().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_outer().ValueOr(false) && + has_outer().ValueOr(false) && + !outer().UncheckedEquals(emboss_reserved_local_other.outer())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericOuter2View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericOuter2View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericOuter2View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "outer") { + if (!outer().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_outer().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + outer().IsAggregate() || outer().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("outer: "); + outer().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !outer().IsAggregate() && !outer().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("# outer: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericOuterView> + + outer() const; + ::emboss::support::Maybe has_outer() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericOuter2View; +}; +using Outer2View = + GenericOuter2View; +using Outer2Writer = + GenericOuter2View; + +template +struct EmbossReservedInternalIsGenericOuter2View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericOuter2View< + GenericOuter2View> { + static constexpr const bool value = true; +}; + +template +inline GenericOuter2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeOuter2View( T &&emboss_reserved_local_arg) { + return GenericOuter2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericOuter2View> +MakeOuter2View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOuter2View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericOuter2View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedOuter2View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOuter2View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Outer2 { + +} // namespace Outer2 + + +template +inline typename ::emboss::test::GenericOuterView> + + GenericOuter2View::outer() + const { + + if ( has_outer().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(16LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericOuterView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericOuterView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOuter2View::has_outer() const { + return ::emboss::support::Maybe(true); +} + + +namespace Outer2 { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Outer2 + +template +inline constexpr ::std::int32_t +GenericOuter2View::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Outer2::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOuter2View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Outer2::IntrinsicSizeInBytes(); +} + +namespace Outer2 { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Outer2 + +template +inline constexpr ::std::int32_t +GenericOuter2View::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Outer2::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOuter2View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Outer2::MaxSizeInBytes(); +} + +namespace Outer2 { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(16LL)).ValueOrDefault(); +} +} // namespace Outer2 + +template +inline constexpr ::std::int32_t +GenericOuter2View::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Outer2::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOuter2View< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Outer2::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_IMPORTER2_EMB_H_ + diff --git a/testdata/golden_cpp/inline_type.emb.h b/testdata/golden_cpp/inline_type.emb.h new file mode 100644 index 00000000..8f89827c --- /dev/null +++ b/testdata/golden_cpp/inline_type.emb.h @@ -0,0 +1,885 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_INLINE_TYPE_EMB_H_ +#define TESTDATA_INLINE_TYPE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Foo { +enum class Status : ::std::uint64_t; + + +enum class SecondaryStatus : ::std::uint64_t; + + +} // namespace Foo + + +template +class GenericFooView; + + + + + + +namespace Foo { +enum class Status : ::std::uint64_t { + OK = static_cast(0LL), + FAILURE = static_cast(12LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Status *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("OK", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Status::OK; + return true; + } + + if (!strcmp("FAILURE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Status::FAILURE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Status emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Status::OK: return "OK"; + + case Status::FAILURE: return "FAILURE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Status emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Status::OK: return true; + + case Status::FAILURE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Status 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::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, + Status *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Status emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Status emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Status emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +enum class SecondaryStatus : ::std::uint64_t { + OK = static_cast(12LL), + FAILURE = static_cast(0LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + SecondaryStatus *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("OK", emboss_reserved_local_name)) { + *emboss_reserved_local_result = SecondaryStatus::OK; + return true; + } + + if (!strcmp("FAILURE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = SecondaryStatus::FAILURE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + SecondaryStatus emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case SecondaryStatus::OK: return "OK"; + + case SecondaryStatus::FAILURE: return "FAILURE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(SecondaryStatus emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case SecondaryStatus::OK: return true; + + case SecondaryStatus::FAILURE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + SecondaryStatus 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::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, + SecondaryStatus *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + SecondaryStatus emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(SecondaryStatus emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + SecondaryStatus emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +} // namespace Foo + + +template +struct EmbossReservedInternalIsGenericFooView; + +template +class GenericFooView final { + public: + GenericFooView() : backing_() {} + explicit GenericFooView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericFooView( + const GenericFooView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericFooView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericFooView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericFooView &operator=( + const GenericFooView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + using Status = ::emboss::test::Foo::Status; + using SecondaryStatus = ::emboss::test::Foo::SecondaryStatus; + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_status().Known()) return false; + if (has_status().ValueOrDefault() && !status().Ok()) return false; + + + if (!has_secondary_status().Known()) return false; + if (has_secondary_status().ValueOrDefault() && !secondary_status().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericFooView emboss_reserved_local_other) const { + + if (!has_status().Known()) return false; + if (!emboss_reserved_local_other.has_status().Known()) return false; + + if (emboss_reserved_local_other.has_status().ValueOrDefault() && + !has_status().ValueOrDefault()) + return false; + if (has_status().ValueOrDefault() && + !emboss_reserved_local_other.has_status().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_status().ValueOrDefault() && + has_status().ValueOrDefault() && + !status().Equals(emboss_reserved_local_other.status())) + return false; + + + + if (!has_secondary_status().Known()) return false; + if (!emboss_reserved_local_other.has_secondary_status().Known()) return false; + + if (emboss_reserved_local_other.has_secondary_status().ValueOrDefault() && + !has_secondary_status().ValueOrDefault()) + return false; + if (has_secondary_status().ValueOrDefault() && + !emboss_reserved_local_other.has_secondary_status().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_secondary_status().ValueOrDefault() && + has_secondary_status().ValueOrDefault() && + !secondary_status().Equals(emboss_reserved_local_other.secondary_status())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericFooView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_status().ValueOr(false) && + !has_status().ValueOr(false)) + return false; + if (has_status().ValueOr(false) && + !emboss_reserved_local_other.has_status().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_status().ValueOr(false) && + has_status().ValueOr(false) && + !status().UncheckedEquals(emboss_reserved_local_other.status())) + return false; + + + + if (emboss_reserved_local_other.has_secondary_status().ValueOr(false) && + !has_secondary_status().ValueOr(false)) + return false; + if (has_secondary_status().ValueOr(false) && + !emboss_reserved_local_other.has_secondary_status().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_secondary_status().ValueOr(false) && + has_secondary_status().ValueOr(false) && + !secondary_status().UncheckedEquals(emboss_reserved_local_other.secondary_status())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericFooView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericFooView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericFooView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "status") { + if (!status().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "secondary_status") { + if (!secondary_status().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_status().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + status().IsAggregate() || status().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("status: "); + status().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !status().IsAggregate() && !status().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("# status: UNREADABLE\n"); + } + } + + if (has_secondary_status().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + secondary_status().IsAggregate() || secondary_status().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("secondary_status: "); + secondary_status().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !secondary_status().IsAggregate() && !secondary_status().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("# secondary_status: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::Status, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + status() const; + ::emboss::support::Maybe has_status() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::SecondaryStatus, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + secondary_status() const; + ::emboss::support::Maybe has_secondary_status() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericFooView; +}; +using FooView = + GenericFooView; +using FooWriter = + GenericFooView; + +template +struct EmbossReservedInternalIsGenericFooView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericFooView< + GenericFooView> { + static constexpr const bool value = true; +}; + +template +inline GenericFooView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeFooView( T &&emboss_reserved_local_arg) { + return GenericFooView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericFooView> +MakeFooView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFooView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericFooView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedFooView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericFooView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Foo { + + +} // namespace Foo + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::Status, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericFooView::status() + const { + + if ( has_status().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::Status, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::Status, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFooView::has_status() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::SecondaryStatus, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericFooView::secondary_status() + const { + + if ( has_secondary_status().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::SecondaryStatus, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Foo::SecondaryStatus, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericFooView::has_secondary_status() const { + return ::emboss::support::Maybe(true); +} + + +namespace Foo { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Foo + +template +inline constexpr ::std::int32_t +GenericFooView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Foo::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFooView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Foo::IntrinsicSizeInBytes(); +} + +namespace Foo { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Foo + +template +inline constexpr ::std::int32_t +GenericFooView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Foo::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFooView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Foo::MaxSizeInBytes(); +} + +namespace Foo { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Foo + +template +inline constexpr ::std::int32_t +GenericFooView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Foo::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericFooView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Foo::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_INLINE_TYPE_EMB_H_ + diff --git a/testdata/golden_cpp/int_sizes.emb.h b/testdata/golden_cpp/int_sizes.emb.h new file mode 100644 index 00000000..fe697e96 --- /dev/null +++ b/testdata/golden_cpp/int_sizes.emb.h @@ -0,0 +1,1439 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_INT_SIZES_EMB_H_ +#define TESTDATA_INT_SIZES_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Sizes { + +} // namespace Sizes + + +template +class GenericSizesView; + + + + + + + + + + + + +namespace Sizes { + +} // namespace Sizes + + +template +struct EmbossReservedInternalIsGenericSizesView; + +template +class GenericSizesView final { + public: + GenericSizesView() : backing_() {} + explicit GenericSizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericSizesView( + const GenericSizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericSizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericSizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericSizesView &operator=( + const GenericSizesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_three_byte().Known()) return false; + if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + + if (!has_five_byte().Known()) return false; + if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + + if (!has_six_byte().Known()) return false; + if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + + + if (!has_seven_byte().Known()) return false; + if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + + + if (!has_eight_byte().Known()) return false; + if (has_eight_byte().ValueOrDefault() && !eight_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericSizesView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_three_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + !has_three_byte().ValueOrDefault()) + return false; + if (has_three_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + has_three_byte().ValueOrDefault() && + !three_byte().Equals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (!has_five_byte().Known()) return false; + if (!emboss_reserved_local_other.has_five_byte().Known()) return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + !has_five_byte().ValueOrDefault()) + return false; + if (has_five_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_five_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + has_five_byte().ValueOrDefault() && + !five_byte().Equals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (!has_six_byte().Known()) return false; + if (!emboss_reserved_local_other.has_six_byte().Known()) return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + !has_six_byte().ValueOrDefault()) + return false; + if (has_six_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_six_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + has_six_byte().ValueOrDefault() && + !six_byte().Equals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (!has_seven_byte().Known()) return false; + if (!emboss_reserved_local_other.has_seven_byte().Known()) return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + !has_seven_byte().ValueOrDefault()) + return false; + if (has_seven_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_seven_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + has_seven_byte().ValueOrDefault() && + !seven_byte().Equals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (!has_eight_byte().Known()) return false; + if (!emboss_reserved_local_other.has_eight_byte().Known()) return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + !has_eight_byte().ValueOrDefault()) + return false; + if (has_eight_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_eight_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + has_eight_byte().ValueOrDefault() && + !eight_byte().Equals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericSizesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + !has_three_byte().ValueOr(false)) + return false; + if (has_three_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + has_three_byte().ValueOr(false) && + !three_byte().UncheckedEquals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + !has_five_byte().ValueOr(false)) + return false; + if (has_five_byte().ValueOr(false) && + !emboss_reserved_local_other.has_five_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + has_five_byte().ValueOr(false) && + !five_byte().UncheckedEquals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + !has_six_byte().ValueOr(false)) + return false; + if (has_six_byte().ValueOr(false) && + !emboss_reserved_local_other.has_six_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + has_six_byte().ValueOr(false) && + !six_byte().UncheckedEquals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + !has_seven_byte().ValueOr(false)) + return false; + if (has_seven_byte().ValueOr(false) && + !emboss_reserved_local_other.has_seven_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + has_seven_byte().ValueOr(false) && + !seven_byte().UncheckedEquals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + !has_eight_byte().ValueOr(false)) + return false; + if (has_eight_byte().ValueOr(false) && + !emboss_reserved_local_other.has_eight_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + has_eight_byte().ValueOr(false) && + !eight_byte().UncheckedEquals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericSizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericSizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericSizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_byte") { + if (!three_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "five_byte") { + if (!five_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_byte") { + if (!six_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "seven_byte") { + if (!seven_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "eight_byte") { + if (!eight_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_three_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_byte().IsAggregate() || three_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_byte: "); + three_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_byte().IsAggregate() && !three_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("# three_byte: UNREADABLE\n"); + } + } + + if (has_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + if (has_five_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + five_byte().IsAggregate() || five_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("five_byte: "); + five_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !five_byte().IsAggregate() && !five_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("# five_byte: UNREADABLE\n"); + } + } + + if (has_six_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_byte().IsAggregate() || six_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_byte: "); + six_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_byte().IsAggregate() && !six_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("# six_byte: UNREADABLE\n"); + } + } + + if (has_seven_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + seven_byte().IsAggregate() || seven_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("seven_byte: "); + seven_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !seven_byte().IsAggregate() && !seven_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("# seven_byte: UNREADABLE\n"); + } + } + + if (has_eight_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + eight_byte().IsAggregate() || eight_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("eight_byte: "); + eight_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !eight_byte().IsAggregate() && !eight_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("# eight_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + three_byte() const; + ::emboss::support::Maybe has_three_byte() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + four_byte() const; + ::emboss::support::Maybe has_four_byte() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + five_byte() const; + ::emboss::support::Maybe has_five_byte() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + six_byte() const; + ::emboss::support::Maybe has_six_byte() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + eight_byte() const; + ::emboss::support::Maybe has_eight_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericSizesView; +}; +using SizesView = + GenericSizesView; +using SizesWriter = + GenericSizesView; + +template +struct EmbossReservedInternalIsGenericSizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericSizesView< + GenericSizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeSizesView( T &&emboss_reserved_local_arg) { + return GenericSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericSizesView> +MakeSizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericSizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedSizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Sizes { + +} // namespace Sizes + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericSizesView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericSizesView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + GenericSizesView::three_byte() + const { + + if ( has_three_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_three_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericSizesView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + GenericSizesView::five_byte() + const { + + if ( has_five_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(5LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_five_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + GenericSizesView::six_byte() + const { + + if ( has_six_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(15LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +( + backing_ + .template GetOffsetStorage<0, + 15>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_six_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + GenericSizesView::seven_byte() + const { + + if ( has_seven_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(7LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(21LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +( + backing_ + .template GetOffsetStorage<0, + 21>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_seven_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericSizesView::eight_byte() + const { + + if ( has_eight_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(28LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 28>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_eight_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace Sizes { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace Sizes + +template +inline constexpr ::std::int32_t +GenericSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Sizes::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSizesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Sizes::IntrinsicSizeInBytes(); +} + +namespace Sizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace Sizes + +template +inline constexpr ::std::int32_t +GenericSizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Sizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Sizes::MaxSizeInBytes(); +} + +namespace Sizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace Sizes + +template +inline constexpr ::std::int32_t +GenericSizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Sizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Sizes::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_INT_SIZES_EMB_H_ + diff --git a/testdata/golden_cpp/large_array.emb.h b/testdata/golden_cpp/large_array.emb.h new file mode 100644 index 00000000..47b45115 --- /dev/null +++ b/testdata/golden_cpp/large_array.emb.h @@ -0,0 +1,741 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_LARGE_ARRAY_EMB_H_ +#define TESTDATA_LARGE_ARRAY_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace UIntArray { + +} // namespace UIntArray + + +template +class GenericUIntArrayView; + + + + + + +namespace UIntArray { + +} // namespace UIntArray + + +template +struct EmbossReservedInternalIsGenericUIntArrayView; + +template +class GenericUIntArrayView final { + public: + GenericUIntArrayView() : backing_() {} + explicit GenericUIntArrayView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericUIntArrayView( + const GenericUIntArrayView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericUIntArrayView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericUIntArrayView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericUIntArrayView &operator=( + const GenericUIntArrayView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_element_count().Known()) return false; + if (has_element_count().ValueOrDefault() && !element_count().Ok()) return false; + + + if (!has_elements().Known()) return false; + if (has_elements().ValueOrDefault() && !elements().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericUIntArrayView emboss_reserved_local_other) const { + + if (!has_element_count().Known()) return false; + if (!emboss_reserved_local_other.has_element_count().Known()) return false; + + if (emboss_reserved_local_other.has_element_count().ValueOrDefault() && + !has_element_count().ValueOrDefault()) + return false; + if (has_element_count().ValueOrDefault() && + !emboss_reserved_local_other.has_element_count().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_element_count().ValueOrDefault() && + has_element_count().ValueOrDefault() && + !element_count().Equals(emboss_reserved_local_other.element_count())) + return false; + + + + if (!has_elements().Known()) return false; + if (!emboss_reserved_local_other.has_elements().Known()) return false; + + if (emboss_reserved_local_other.has_elements().ValueOrDefault() && + !has_elements().ValueOrDefault()) + return false; + if (has_elements().ValueOrDefault() && + !emboss_reserved_local_other.has_elements().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_elements().ValueOrDefault() && + has_elements().ValueOrDefault() && + !elements().Equals(emboss_reserved_local_other.elements())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericUIntArrayView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_element_count().ValueOr(false) && + !has_element_count().ValueOr(false)) + return false; + if (has_element_count().ValueOr(false) && + !emboss_reserved_local_other.has_element_count().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_element_count().ValueOr(false) && + has_element_count().ValueOr(false) && + !element_count().UncheckedEquals(emboss_reserved_local_other.element_count())) + return false; + + + + if (emboss_reserved_local_other.has_elements().ValueOr(false) && + !has_elements().ValueOr(false)) + return false; + if (has_elements().ValueOr(false) && + !emboss_reserved_local_other.has_elements().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_elements().ValueOr(false) && + has_elements().ValueOr(false) && + !elements().UncheckedEquals(emboss_reserved_local_other.elements())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericUIntArrayView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericUIntArrayView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericUIntArrayView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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_count") { + if (!element_count().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "elements") { + if (!elements().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_count().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + element_count().IsAggregate() || element_count().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("element_count: "); + element_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !element_count().IsAggregate() && !element_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("# element_count: UNREADABLE\n"); + } + } + + if (has_elements().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + elements().IsAggregate() || elements().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("elements: "); + elements().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !elements().IsAggregate() && !elements().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("# elements: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + element_count() const; + ::emboss::support::Maybe has_element_count() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> + +, typename Storage::template OffsetStorageType, 4, + 8 > + + elements() const; + ::emboss::support::Maybe has_elements() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericUIntArrayView &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::int64_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::int64_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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.element_count(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_3); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_5); + + return emboss_reserved_local_subexpr_6; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericUIntArrayView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + + public: + class EmbossReservedDollarVirtualMaxSizeInBytesView final { + public: + using ValueType = ::std::int64_t; + + constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} + EmbossReservedDollarVirtualMaxSizeInBytesView(const EmbossReservedDollarVirtualMaxSizeInBytesView &) = default; + EmbossReservedDollarVirtualMaxSizeInBytesView(EmbossReservedDollarVirtualMaxSizeInBytesView &&) = default; + EmbossReservedDollarVirtualMaxSizeInBytesView &operator=(const EmbossReservedDollarVirtualMaxSizeInBytesView &) = + default; + EmbossReservedDollarVirtualMaxSizeInBytesView &operator=(EmbossReservedDollarVirtualMaxSizeInBytesView &&) = + default; + ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; + + static constexpr ::std::int64_t Read(); + static constexpr ::std::int64_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericUIntArrayView; +}; +using UIntArrayView = + GenericUIntArrayView; +using UIntArrayWriter = + GenericUIntArrayView; + +template +struct EmbossReservedInternalIsGenericUIntArrayView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericUIntArrayView< + GenericUIntArrayView> { + static constexpr const bool value = true; +}; + +template +inline GenericUIntArrayView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeUIntArrayView( T &&emboss_reserved_local_arg) { + return GenericUIntArrayView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericUIntArrayView> +MakeUIntArrayView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericUIntArrayView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericUIntArrayView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedUIntArrayView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericUIntArrayView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace UIntArray { + +} // namespace UIntArray + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericUIntArrayView::element_count() + const { + + if ( has_element_count().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericUIntArrayView::has_element_count() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> + +, typename Storage::template OffsetStorageType, 4, + 8 > + + GenericUIntArrayView::elements() + const { + + if ( has_elements().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = element_count(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_2); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> + +, typename Storage::template OffsetStorageType, 4, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> + +, typename Storage::template OffsetStorageType, 4, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericUIntArrayView::has_elements() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericUIntArrayView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericUIntArrayView::IntrinsicSizeInBytes() const { + return + typename GenericUIntArrayView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericUIntArrayView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace UIntArray { +inline constexpr ::std::int64_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(17179869184LL)).ValueOrDefault(); +} +} // namespace UIntArray + +template +inline constexpr ::std::int64_t +GenericUIntArrayView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return UIntArray::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int64_t +GenericUIntArrayView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return UIntArray::MaxSizeInBytes(); +} + +namespace UIntArray { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace UIntArray + +template +inline constexpr ::std::int32_t +GenericUIntArrayView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return UIntArray::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUIntArrayView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return UIntArray::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_LARGE_ARRAY_EMB_H_ + diff --git a/testdata/golden_cpp/nested_structure.emb.h b/testdata/golden_cpp/nested_structure.emb.h new file mode 100644 index 00000000..b953e312 --- /dev/null +++ b/testdata/golden_cpp/nested_structure.emb.h @@ -0,0 +1,2117 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_NESTED_STRUCTURE_EMB_H_ +#define TESTDATA_NESTED_STRUCTURE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Container { + +} // namespace Container + + +template +class GenericContainerView; + +namespace Box { + +} // namespace Box + + +template +class GenericBoxView; + +namespace Truck { + +} // namespace Truck + + +template +class GenericTruckView; + + + + + + + +namespace Container { + +} // namespace Container + + +template +struct EmbossReservedInternalIsGenericContainerView; + +template +class GenericContainerView final { + public: + GenericContainerView() : backing_() {} + explicit GenericContainerView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericContainerView( + const GenericContainerView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericContainerView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericContainerView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericContainerView &operator=( + const GenericContainerView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_weight().Known()) return false; + if (has_weight().ValueOrDefault() && !weight().Ok()) return false; + + + if (!has_important_box().Known()) return false; + if (has_important_box().ValueOrDefault() && !important_box().Ok()) return false; + + + if (!has_other_box().Known()) return false; + if (has_other_box().ValueOrDefault() && !other_box().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericContainerView emboss_reserved_local_other) const { + + if (!has_weight().Known()) return false; + if (!emboss_reserved_local_other.has_weight().Known()) return false; + + if (emboss_reserved_local_other.has_weight().ValueOrDefault() && + !has_weight().ValueOrDefault()) + return false; + if (has_weight().ValueOrDefault() && + !emboss_reserved_local_other.has_weight().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_weight().ValueOrDefault() && + has_weight().ValueOrDefault() && + !weight().Equals(emboss_reserved_local_other.weight())) + return false; + + + + if (!has_important_box().Known()) return false; + if (!emboss_reserved_local_other.has_important_box().Known()) return false; + + if (emboss_reserved_local_other.has_important_box().ValueOrDefault() && + !has_important_box().ValueOrDefault()) + return false; + if (has_important_box().ValueOrDefault() && + !emboss_reserved_local_other.has_important_box().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_important_box().ValueOrDefault() && + has_important_box().ValueOrDefault() && + !important_box().Equals(emboss_reserved_local_other.important_box())) + return false; + + + + if (!has_other_box().Known()) return false; + if (!emboss_reserved_local_other.has_other_box().Known()) return false; + + if (emboss_reserved_local_other.has_other_box().ValueOrDefault() && + !has_other_box().ValueOrDefault()) + return false; + if (has_other_box().ValueOrDefault() && + !emboss_reserved_local_other.has_other_box().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_other_box().ValueOrDefault() && + has_other_box().ValueOrDefault() && + !other_box().Equals(emboss_reserved_local_other.other_box())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericContainerView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_weight().ValueOr(false) && + !has_weight().ValueOr(false)) + return false; + if (has_weight().ValueOr(false) && + !emboss_reserved_local_other.has_weight().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_weight().ValueOr(false) && + has_weight().ValueOr(false) && + !weight().UncheckedEquals(emboss_reserved_local_other.weight())) + return false; + + + + if (emboss_reserved_local_other.has_important_box().ValueOr(false) && + !has_important_box().ValueOr(false)) + return false; + if (has_important_box().ValueOr(false) && + !emboss_reserved_local_other.has_important_box().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_important_box().ValueOr(false) && + has_important_box().ValueOr(false) && + !important_box().UncheckedEquals(emboss_reserved_local_other.important_box())) + return false; + + + + if (emboss_reserved_local_other.has_other_box().ValueOr(false) && + !has_other_box().ValueOr(false)) + return false; + if (has_other_box().ValueOr(false) && + !emboss_reserved_local_other.has_other_box().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_other_box().ValueOr(false) && + has_other_box().ValueOr(false) && + !other_box().UncheckedEquals(emboss_reserved_local_other.other_box())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericContainerView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericContainerView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericContainerView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "weight") { + if (!weight().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "important_box") { + if (!important_box().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "other_box") { + if (!other_box().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_weight().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + weight().IsAggregate() || weight().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("weight: "); + weight().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !weight().IsAggregate() && !weight().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("# weight: UNREADABLE\n"); + } + } + + if (has_important_box().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + important_box().IsAggregate() || important_box().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("important_box: "); + important_box().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !important_box().IsAggregate() && !important_box().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("# important_box: UNREADABLE\n"); + } + } + + if (has_other_box().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + other_box().IsAggregate() || other_box().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("other_box: "); + other_box().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !other_box().IsAggregate() && !other_box().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("# other_box: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + weight() const; + ::emboss::support::Maybe has_weight() const; + + public: + typename ::emboss::test::GenericBoxView> + + important_box() const; + ::emboss::support::Maybe has_important_box() const; + + public: + typename ::emboss::test::GenericBoxView> + + other_box() const; + ::emboss::support::Maybe has_other_box() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericContainerView; +}; +using ContainerView = + GenericContainerView; +using ContainerWriter = + GenericContainerView; + +template +struct EmbossReservedInternalIsGenericContainerView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericContainerView< + GenericContainerView> { + static constexpr const bool value = true; +}; + +template +inline GenericContainerView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeContainerView( T &&emboss_reserved_local_arg) { + return GenericContainerView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericContainerView> +MakeContainerView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericContainerView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericContainerView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedContainerView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericContainerView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace Box { + +} // namespace Box + + +template +struct EmbossReservedInternalIsGenericBoxView; + +template +class GenericBoxView final { + public: + GenericBoxView() : backing_() {} + explicit GenericBoxView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBoxView( + const GenericBoxView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBoxView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBoxView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBoxView &operator=( + const GenericBoxView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_id().Known()) return false; + if (has_id().ValueOrDefault() && !id().Ok()) return false; + + + if (!has_count().Known()) return false; + if (has_count().ValueOrDefault() && !count().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericBoxView emboss_reserved_local_other) const { + + if (!has_id().Known()) return false; + if (!emboss_reserved_local_other.has_id().Known()) return false; + + if (emboss_reserved_local_other.has_id().ValueOrDefault() && + !has_id().ValueOrDefault()) + return false; + if (has_id().ValueOrDefault() && + !emboss_reserved_local_other.has_id().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_id().ValueOrDefault() && + has_id().ValueOrDefault() && + !id().Equals(emboss_reserved_local_other.id())) + return false; + + + + 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; + + return true; + } + template + bool UncheckedEquals( + GenericBoxView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_id().ValueOr(false) && + !has_id().ValueOr(false)) + return false; + if (has_id().ValueOr(false) && + !emboss_reserved_local_other.has_id().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_id().ValueOr(false) && + has_id().ValueOr(false) && + !id().UncheckedEquals(emboss_reserved_local_other.id())) + return false; + + + + 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; + + return true; + } + template + void UncheckedCopyFrom( + GenericBoxView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBoxView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBoxView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "id") { + if (!id().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "count") { + if (!count().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_id().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + id().IsAggregate() || id().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("id: "); + id().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !id().IsAggregate() && !id().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("# id: UNREADABLE\n"); + } + } + + if (has_count().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + count().IsAggregate() || count().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + id() const; + ::emboss::support::Maybe has_id() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + count() const; + ::emboss::support::Maybe has_count() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBoxView; +}; +using BoxView = + GenericBoxView; +using BoxWriter = + GenericBoxView; + +template +struct EmbossReservedInternalIsGenericBoxView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBoxView< + GenericBoxView> { + static constexpr const bool value = true; +}; + +template +inline GenericBoxView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBoxView( T &&emboss_reserved_local_arg) { + return GenericBoxView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBoxView> +MakeBoxView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBoxView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBoxView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBoxView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBoxView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace Truck { + +} // namespace Truck + + +template +struct EmbossReservedInternalIsGenericTruckView; + +template +class GenericTruckView final { + public: + GenericTruckView() : backing_() {} + explicit GenericTruckView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericTruckView( + const GenericTruckView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericTruckView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericTruckView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericTruckView &operator=( + const GenericTruckView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_id().Known()) return false; + if (has_id().ValueOrDefault() && !id().Ok()) return false; + + + if (!has_cargo().Known()) return false; + if (has_cargo().ValueOrDefault() && !cargo().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericTruckView emboss_reserved_local_other) const { + + if (!has_id().Known()) return false; + if (!emboss_reserved_local_other.has_id().Known()) return false; + + if (emboss_reserved_local_other.has_id().ValueOrDefault() && + !has_id().ValueOrDefault()) + return false; + if (has_id().ValueOrDefault() && + !emboss_reserved_local_other.has_id().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_id().ValueOrDefault() && + has_id().ValueOrDefault() && + !id().Equals(emboss_reserved_local_other.id())) + return false; + + + + if (!has_cargo().Known()) return false; + if (!emboss_reserved_local_other.has_cargo().Known()) return false; + + if (emboss_reserved_local_other.has_cargo().ValueOrDefault() && + !has_cargo().ValueOrDefault()) + return false; + if (has_cargo().ValueOrDefault() && + !emboss_reserved_local_other.has_cargo().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_cargo().ValueOrDefault() && + has_cargo().ValueOrDefault() && + !cargo().Equals(emboss_reserved_local_other.cargo())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericTruckView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_id().ValueOr(false) && + !has_id().ValueOr(false)) + return false; + if (has_id().ValueOr(false) && + !emboss_reserved_local_other.has_id().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_id().ValueOr(false) && + has_id().ValueOr(false) && + !id().UncheckedEquals(emboss_reserved_local_other.id())) + return false; + + + + if (emboss_reserved_local_other.has_cargo().ValueOr(false) && + !has_cargo().ValueOr(false)) + return false; + if (has_cargo().ValueOr(false) && + !emboss_reserved_local_other.has_cargo().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_cargo().ValueOr(false) && + has_cargo().ValueOr(false) && + !cargo().UncheckedEquals(emboss_reserved_local_other.cargo())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericTruckView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericTruckView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericTruckView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "id") { + if (!id().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "cargo") { + if (!cargo().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_id().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + id().IsAggregate() || id().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("id: "); + id().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !id().IsAggregate() && !id().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("# id: UNREADABLE\n"); + } + } + + if (has_cargo().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + cargo().IsAggregate() || cargo().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("cargo: "); + cargo().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !cargo().IsAggregate() && !cargo().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("# cargo: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + id() const; + ::emboss::support::Maybe has_id() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericContainerView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 20, + 8 > + + cargo() const; + ::emboss::support::Maybe has_cargo() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericTruckView; +}; +using TruckView = + GenericTruckView; +using TruckWriter = + GenericTruckView; + +template +struct EmbossReservedInternalIsGenericTruckView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericTruckView< + GenericTruckView> { + static constexpr const bool value = true; +}; + +template +inline GenericTruckView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeTruckView( T &&emboss_reserved_local_arg) { + return GenericTruckView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericTruckView> +MakeTruckView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericTruckView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericTruckView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedTruckView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericTruckView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Container { + +} // namespace Container + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericContainerView::weight() + const { + + if ( has_weight().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericContainerView::has_weight() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericBoxView> + + GenericContainerView::important_box() + const { + + if ( has_important_box().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericBoxView> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericBoxView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericContainerView::has_important_box() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericBoxView> + + GenericContainerView::other_box() + const { + + if ( has_other_box().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(12LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericBoxView> + +( + backing_ + .template GetOffsetStorage<0, + 12>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericBoxView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericContainerView::has_other_box() const { + return ::emboss::support::Maybe(true); +} + + +namespace Container { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(20LL)).ValueOrDefault(); +} +} // namespace Container + +template +inline constexpr ::std::int32_t +GenericContainerView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Container::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericContainerView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Container::IntrinsicSizeInBytes(); +} + +namespace Container { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(20LL)).ValueOrDefault(); +} +} // namespace Container + +template +inline constexpr ::std::int32_t +GenericContainerView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Container::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericContainerView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Container::MaxSizeInBytes(); +} + +namespace Container { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(20LL)).ValueOrDefault(); +} +} // namespace Container + +template +inline constexpr ::std::int32_t +GenericContainerView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Container::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericContainerView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Container::MinSizeInBytes(); +} +namespace Box { + +} // namespace Box + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericBoxView::id() + const { + + if ( has_id().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBoxView::has_id() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericBoxView::count() + const { + + if ( has_count().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBoxView::has_count() const { + return ::emboss::support::Maybe(true); +} + + +namespace Box { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Box + +template +inline constexpr ::std::int32_t +GenericBoxView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Box::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBoxView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Box::IntrinsicSizeInBytes(); +} + +namespace Box { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Box + +template +inline constexpr ::std::int32_t +GenericBoxView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Box::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBoxView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Box::MaxSizeInBytes(); +} + +namespace Box { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace Box + +template +inline constexpr ::std::int32_t +GenericBoxView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Box::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBoxView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Box::MinSizeInBytes(); +} +namespace Truck { + +} // namespace Truck + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericTruckView::id() + const { + + if ( has_id().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericTruckView::has_id() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericContainerView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 20, + 8 > + + GenericTruckView::cargo() + const { + + if ( has_cargo().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(40LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericContainerView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 20, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericContainerView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 20, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericTruckView::has_cargo() const { + return ::emboss::support::Maybe(true); +} + + +namespace Truck { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(44LL)).ValueOrDefault(); +} +} // namespace Truck + +template +inline constexpr ::std::int32_t +GenericTruckView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Truck::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericTruckView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Truck::IntrinsicSizeInBytes(); +} + +namespace Truck { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(44LL)).ValueOrDefault(); +} +} // namespace Truck + +template +inline constexpr ::std::int32_t +GenericTruckView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Truck::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericTruckView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Truck::MaxSizeInBytes(); +} + +namespace Truck { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(44LL)).ValueOrDefault(); +} +} // namespace Truck + +template +inline constexpr ::std::int32_t +GenericTruckView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Truck::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericTruckView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Truck::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_NESTED_STRUCTURE_EMB_H_ + diff --git a/testdata/golden_cpp/next_keyword.emb.h b/testdata/golden_cpp/next_keyword.emb.h new file mode 100644 index 00000000..624c9548 --- /dev/null +++ b/testdata/golden_cpp/next_keyword.emb.h @@ -0,0 +1,943 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_NEXT_KEYWORD_EMB_H_ +#define TESTDATA_NEXT_KEYWORD_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace NextKeyword { + +} // namespace NextKeyword + + +template +class GenericNextKeywordView; + + + + + + + + +namespace NextKeyword { + +} // namespace NextKeyword + + +template +struct EmbossReservedInternalIsGenericNextKeywordView; + +template +class GenericNextKeywordView final { + public: + GenericNextKeywordView() : backing_() {} + explicit GenericNextKeywordView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericNextKeywordView( + const GenericNextKeywordView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericNextKeywordView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericNextKeywordView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericNextKeywordView &operator=( + const GenericNextKeywordView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_value32().Known()) return false; + if (has_value32().ValueOrDefault() && !value32().Ok()) return false; + + + if (!has_value16().Known()) return false; + if (has_value16().ValueOrDefault() && !value16().Ok()) return false; + + + if (!has_value8().Known()) return false; + if (has_value8().ValueOrDefault() && !value8().Ok()) return false; + + + if (!has_value8_offset().Known()) return false; + if (has_value8_offset().ValueOrDefault() && !value8_offset().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericNextKeywordView emboss_reserved_local_other) const { + + if (!has_value32().Known()) return false; + if (!emboss_reserved_local_other.has_value32().Known()) return false; + + if (emboss_reserved_local_other.has_value32().ValueOrDefault() && + !has_value32().ValueOrDefault()) + return false; + if (has_value32().ValueOrDefault() && + !emboss_reserved_local_other.has_value32().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value32().ValueOrDefault() && + has_value32().ValueOrDefault() && + !value32().Equals(emboss_reserved_local_other.value32())) + return false; + + + + if (!has_value16().Known()) return false; + if (!emboss_reserved_local_other.has_value16().Known()) return false; + + if (emboss_reserved_local_other.has_value16().ValueOrDefault() && + !has_value16().ValueOrDefault()) + return false; + if (has_value16().ValueOrDefault() && + !emboss_reserved_local_other.has_value16().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value16().ValueOrDefault() && + has_value16().ValueOrDefault() && + !value16().Equals(emboss_reserved_local_other.value16())) + return false; + + + + if (!has_value8().Known()) return false; + if (!emboss_reserved_local_other.has_value8().Known()) return false; + + if (emboss_reserved_local_other.has_value8().ValueOrDefault() && + !has_value8().ValueOrDefault()) + return false; + if (has_value8().ValueOrDefault() && + !emboss_reserved_local_other.has_value8().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value8().ValueOrDefault() && + has_value8().ValueOrDefault() && + !value8().Equals(emboss_reserved_local_other.value8())) + return false; + + + + if (!has_value8_offset().Known()) return false; + if (!emboss_reserved_local_other.has_value8_offset().Known()) return false; + + if (emboss_reserved_local_other.has_value8_offset().ValueOrDefault() && + !has_value8_offset().ValueOrDefault()) + return false; + if (has_value8_offset().ValueOrDefault() && + !emboss_reserved_local_other.has_value8_offset().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value8_offset().ValueOrDefault() && + has_value8_offset().ValueOrDefault() && + !value8_offset().Equals(emboss_reserved_local_other.value8_offset())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericNextKeywordView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_value32().ValueOr(false) && + !has_value32().ValueOr(false)) + return false; + if (has_value32().ValueOr(false) && + !emboss_reserved_local_other.has_value32().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value32().ValueOr(false) && + has_value32().ValueOr(false) && + !value32().UncheckedEquals(emboss_reserved_local_other.value32())) + return false; + + + + if (emboss_reserved_local_other.has_value16().ValueOr(false) && + !has_value16().ValueOr(false)) + return false; + if (has_value16().ValueOr(false) && + !emboss_reserved_local_other.has_value16().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value16().ValueOr(false) && + has_value16().ValueOr(false) && + !value16().UncheckedEquals(emboss_reserved_local_other.value16())) + return false; + + + + if (emboss_reserved_local_other.has_value8().ValueOr(false) && + !has_value8().ValueOr(false)) + return false; + if (has_value8().ValueOr(false) && + !emboss_reserved_local_other.has_value8().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value8().ValueOr(false) && + has_value8().ValueOr(false) && + !value8().UncheckedEquals(emboss_reserved_local_other.value8())) + return false; + + + + if (emboss_reserved_local_other.has_value8_offset().ValueOr(false) && + !has_value8_offset().ValueOr(false)) + return false; + if (has_value8_offset().ValueOr(false) && + !emboss_reserved_local_other.has_value8_offset().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value8_offset().ValueOr(false) && + has_value8_offset().ValueOr(false) && + !value8_offset().UncheckedEquals(emboss_reserved_local_other.value8_offset())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericNextKeywordView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericNextKeywordView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericNextKeywordView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "value32") { + if (!value32().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "value16") { + if (!value16().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "value8") { + if (!value8().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "value8_offset") { + if (!value8_offset().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_value32().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value32().IsAggregate() || value32().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value32: "); + value32().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value32().IsAggregate() && !value32().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("# value32: UNREADABLE\n"); + } + } + + if (has_value16().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value16().IsAggregate() || value16().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value16: "); + value16().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value16().IsAggregate() && !value16().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("# value16: UNREADABLE\n"); + } + } + + if (has_value8().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value8().IsAggregate() || value8().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value8: "); + value8().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value8().IsAggregate() && !value8().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("# value8: UNREADABLE\n"); + } + } + + if (has_value8_offset().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value8_offset().IsAggregate() || value8_offset().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value8_offset: "); + value8_offset().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value8_offset().IsAggregate() && !value8_offset().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("# value8_offset: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + value32() const; + ::emboss::support::Maybe has_value32() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + value16() const; + ::emboss::support::Maybe has_value16() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + value8() const; + ::emboss::support::Maybe has_value8() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + value8_offset() const; + ::emboss::support::Maybe has_value8_offset() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericNextKeywordView; +}; +using NextKeywordView = + GenericNextKeywordView; +using NextKeywordWriter = + GenericNextKeywordView; + +template +struct EmbossReservedInternalIsGenericNextKeywordView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericNextKeywordView< + GenericNextKeywordView> { + static constexpr const bool value = true; +}; + +template +inline GenericNextKeywordView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeNextKeywordView( T &&emboss_reserved_local_arg) { + return GenericNextKeywordView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericNextKeywordView> +MakeNextKeywordView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNextKeywordView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericNextKeywordView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedNextKeywordView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericNextKeywordView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace NextKeyword { + +} // namespace NextKeyword + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericNextKeywordView::value32() + const { + + if ( has_value32().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNextKeywordView::has_value32() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericNextKeywordView::value16() + const { + + if ( has_value16().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNextKeywordView::has_value16() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNextKeywordView::value8() + const { + + if ( has_value8().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNextKeywordView::has_value8() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericNextKeywordView::value8_offset() + const { + + if ( has_value8_offset().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericNextKeywordView::has_value8_offset() const { + return ::emboss::support::Maybe(true); +} + + +namespace NextKeyword { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(11LL)).ValueOrDefault(); +} +} // namespace NextKeyword + +template +inline constexpr ::std::int32_t +GenericNextKeywordView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return NextKeyword::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNextKeywordView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return NextKeyword::IntrinsicSizeInBytes(); +} + +namespace NextKeyword { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(11LL)).ValueOrDefault(); +} +} // namespace NextKeyword + +template +inline constexpr ::std::int32_t +GenericNextKeywordView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return NextKeyword::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNextKeywordView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return NextKeyword::MaxSizeInBytes(); +} + +namespace NextKeyword { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(11LL)).ValueOrDefault(); +} +} // namespace NextKeyword + +template +inline constexpr ::std::int32_t +GenericNextKeywordView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return NextKeyword::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericNextKeywordView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return NextKeyword::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_NEXT_KEYWORD_EMB_H_ + diff --git a/testdata/golden_cpp/no_cpp_namespace.emb.h b/testdata/golden_cpp/no_cpp_namespace.emb.h new file mode 100644 index 00000000..76917419 --- /dev/null +++ b/testdata/golden_cpp/no_cpp_namespace.emb.h @@ -0,0 +1,116 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_NO_CPP_NAMESPACE_EMB_H_ +#define TESTDATA_NO_CPP_NAMESPACE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss_generated_code { +enum class Foo : ::std::uint64_t; + + +enum class Foo : ::std::uint64_t { + VALUE = static_cast(10LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Foo *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("VALUE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Foo::VALUE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Foo emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Foo::VALUE: return "VALUE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Foo emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Foo::VALUE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Foo 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::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, + Foo *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Foo emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Foo emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Foo emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + +} // namespace emboss_generated_code + + + +/* NOLINTEND */ + +#endif // TESTDATA_NO_CPP_NAMESPACE_EMB_H_ + diff --git a/testdata/golden_cpp/no_enum_traits.emb.h b/testdata/golden_cpp/no_enum_traits.emb.h new file mode 100644 index 00000000..5f97e05c --- /dev/null +++ b/testdata/golden_cpp/no_enum_traits.emb.h @@ -0,0 +1,654 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_NO_ENUM_TRAITS_EMB_H_ +#define TESTDATA_NO_ENUM_TRAITS_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +enum class Foo : ::std::uint64_t; + +namespace Bar { + +} // namespace Bar + + +template +class GenericBarView; + + +enum class Foo : ::std::uint64_t { + VALUE = static_cast(10LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Foo *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("VALUE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Foo::VALUE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Foo emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Foo::VALUE: return "VALUE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Foo emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Foo::VALUE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Foo 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::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, + Foo *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Foo emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Foo emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Foo emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + +namespace Bar { + +} // namespace Bar + + +template +struct EmbossReservedInternalIsGenericBarView; + +template +class GenericBarView final { + public: + GenericBarView() : backing_() {} + explicit GenericBarView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBarView( + const GenericBarView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBarView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBarView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBarView &operator=( + const GenericBarView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_foo().Known()) return false; + if (has_foo().ValueOrDefault() && !foo().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericBarView emboss_reserved_local_other) const { + + if (!has_foo().Known()) return false; + if (!emboss_reserved_local_other.has_foo().Known()) return false; + + if (emboss_reserved_local_other.has_foo().ValueOrDefault() && + !has_foo().ValueOrDefault()) + return false; + if (has_foo().ValueOrDefault() && + !emboss_reserved_local_other.has_foo().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_foo().ValueOrDefault() && + has_foo().ValueOrDefault() && + !foo().Equals(emboss_reserved_local_other.foo())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericBarView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_foo().ValueOr(false) && + !has_foo().ValueOr(false)) + return false; + if (has_foo().ValueOr(false) && + !emboss_reserved_local_other.has_foo().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_foo().ValueOr(false) && + has_foo().ValueOr(false) && + !foo().UncheckedEquals(emboss_reserved_local_other.foo())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericBarView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBarView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBarView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "foo") { + if (!foo().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_foo().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + foo().IsAggregate() || foo().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("foo: "); + foo().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !foo().IsAggregate() && !foo().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("# foo: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Foo, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + foo() const; + ::emboss::support::Maybe has_foo() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBarView; +}; +using BarView = + GenericBarView; +using BarWriter = + GenericBarView; + +template +struct EmbossReservedInternalIsGenericBarView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBarView< + GenericBarView> { + static constexpr const bool value = true; +}; + +template +inline GenericBarView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBarView( T &&emboss_reserved_local_arg) { + return GenericBarView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBarView> +MakeBarView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBarView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBarView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBarView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBarView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Bar { + +} // namespace Bar + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Foo, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericBarView::foo() + const { + + if ( has_foo().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Foo, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Foo, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBarView::has_foo() const { + return ::emboss::support::Maybe(true); +} + + +namespace Bar { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Bar + +template +inline constexpr ::std::int32_t +GenericBarView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Bar::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBarView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Bar::IntrinsicSizeInBytes(); +} + +namespace Bar { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Bar + +template +inline constexpr ::std::int32_t +GenericBarView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Bar::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBarView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Bar::MaxSizeInBytes(); +} + +namespace Bar { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Bar + +template +inline constexpr ::std::int32_t +GenericBarView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Bar::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBarView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Bar::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_NO_ENUM_TRAITS_EMB_H_ + diff --git a/testdata/golden_cpp/parameters.emb.h b/testdata/golden_cpp/parameters.emb.h new file mode 100644 index 00000000..d60f164b --- /dev/null +++ b/testdata/golden_cpp/parameters.emb.h @@ -0,0 +1,10744 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_PARAMETERS_EMB_H_ +#define TESTDATA_PARAMETERS_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +enum class Product : ::std::uint64_t; + +enum class MessageId : ::std::uint64_t; + +namespace MultiVersion { + +} // namespace MultiVersion + + +template +class GenericMultiVersionView; + +namespace Axes { + +} // namespace Axes + + +template +class GenericAxesView; + +namespace AxisPair { + +} // namespace AxisPair + + +template +class GenericAxisPairView; + +namespace AxesEnvelope { + +} // namespace AxesEnvelope + + +template +class GenericAxesEnvelopeView; + +enum class AxisType : ::std::int64_t; + +namespace Axis { + +} // namespace Axis + + +template +class GenericAxisView; + +namespace Config { + +} // namespace Config + + +template +class GenericConfigView; + +namespace ConfigVX { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +class GenericEmbossReservedAnonymousField1View; + + +} // namespace ConfigVX + + +template +class GenericConfigVXView; + +namespace StructWithUnusedParameter { + +} // namespace StructWithUnusedParameter + + +template +class GenericStructWithUnusedParameterView; + +namespace StructContainingStructWithUnusedParameter { + +} // namespace StructContainingStructWithUnusedParameter + + +template +class GenericStructContainingStructWithUnusedParameterView; + +namespace BiasedValue { + +} // namespace BiasedValue + + +template +class GenericBiasedValueView; + +namespace VirtualFirstFieldWithParam { + +} // namespace VirtualFirstFieldWithParam + + +template +class GenericVirtualFirstFieldWithParamView; + +namespace ConstVirtualFirstFieldWithParam { + +} // namespace ConstVirtualFirstFieldWithParam + + +template +class GenericConstVirtualFirstFieldWithParamView; + +namespace SizedArrayOfBiasedValues { + +} // namespace SizedArrayOfBiasedValues + + +template +class GenericSizedArrayOfBiasedValuesView; + + +enum class Product : ::std::uint64_t { + VERSION_1 = static_cast(0LL), + VERSION_2 = static_cast(10LL), + VERSION_X = static_cast(23LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Product *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("VERSION_1", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Product::VERSION_1; + return true; + } + + if (!strcmp("VERSION_2", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Product::VERSION_2; + return true; + } + + if (!strcmp("VERSION_X", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Product::VERSION_X; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Product emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Product::VERSION_1: return "VERSION_1"; + + case Product::VERSION_2: return "VERSION_2"; + + case Product::VERSION_X: return "VERSION_X"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Product emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Product::VERSION_1: return true; + + case Product::VERSION_2: return true; + + case Product::VERSION_X: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Product 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::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, + Product *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Product emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Product emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Product emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class MessageId : ::std::uint64_t { + AXIS = static_cast(0LL), + CONFIG = static_cast(1LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + MessageId *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("AXIS", emboss_reserved_local_name)) { + *emboss_reserved_local_result = MessageId::AXIS; + return true; + } + + if (!strcmp("CONFIG", emboss_reserved_local_name)) { + *emboss_reserved_local_result = MessageId::CONFIG; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + MessageId emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case MessageId::AXIS: return "AXIS"; + + case MessageId::CONFIG: return "CONFIG"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(MessageId emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case MessageId::AXIS: return true; + + case MessageId::CONFIG: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + MessageId 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::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, + MessageId *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + MessageId emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(MessageId emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + MessageId emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + + + +namespace MultiVersion { + +} // namespace MultiVersion + + +template +struct EmbossReservedInternalIsGenericMultiVersionView; + +template +class GenericMultiVersionView final { + public: + GenericMultiVersionView() : backing_() {} + explicit GenericMultiVersionView( + ::emboss::test::Product product, Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) , product_(product) + , parameters_initialized_(true) {} + + template + GenericMultiVersionView( + const GenericMultiVersionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + , product_(emboss_reserved_local_other.product_) +, parameters_initialized_(emboss_reserved_local_other.parameters_initialized_) {} + + template ::type>::type>::value>::type> + explicit GenericMultiVersionView( + ::emboss::test::Product product, Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) , product_(product) + , parameters_initialized_(true) {} + template + explicit GenericMultiVersionView( + ::emboss::test::Product product, Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) , product_(product) + , parameters_initialized_(true) {} + + template + GenericMultiVersionView &operator=( + const GenericMultiVersionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; +if (!parameters_initialized_) return false; + if (!has_message_id().Known()) return false; + if (has_message_id().ValueOrDefault() && !message_id().Ok()) return false; + + + if (!has_axes().Known()) return false; + if (has_axes().ValueOrDefault() && !axes().Ok()) return false; + + + if (!has_config().Known()) return false; + if (has_config().ValueOrDefault() && !config().Ok()) return false; + + + if (!has_config_vx().Known()) return false; + if (has_config_vx().ValueOrDefault() && !config_vx().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericMultiVersionView emboss_reserved_local_other) const { + + if (!has_product().Known()) return false; + if (!emboss_reserved_local_other.has_product().Known()) return false; + + if (emboss_reserved_local_other.has_product().ValueOrDefault() && + !has_product().ValueOrDefault()) + return false; + if (has_product().ValueOrDefault() && + !emboss_reserved_local_other.has_product().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_product().ValueOrDefault() && + has_product().ValueOrDefault() && + !product().Equals(emboss_reserved_local_other.product())) + return false; + + + + if (!has_message_id().Known()) return false; + if (!emboss_reserved_local_other.has_message_id().Known()) return false; + + if (emboss_reserved_local_other.has_message_id().ValueOrDefault() && + !has_message_id().ValueOrDefault()) + return false; + if (has_message_id().ValueOrDefault() && + !emboss_reserved_local_other.has_message_id().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_message_id().ValueOrDefault() && + has_message_id().ValueOrDefault() && + !message_id().Equals(emboss_reserved_local_other.message_id())) + return false; + + + + if (!has_axes().Known()) return false; + if (!emboss_reserved_local_other.has_axes().Known()) return false; + + if (emboss_reserved_local_other.has_axes().ValueOrDefault() && + !has_axes().ValueOrDefault()) + return false; + if (has_axes().ValueOrDefault() && + !emboss_reserved_local_other.has_axes().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axes().ValueOrDefault() && + has_axes().ValueOrDefault() && + !axes().Equals(emboss_reserved_local_other.axes())) + return false; + + + + if (!has_config().Known()) return false; + if (!emboss_reserved_local_other.has_config().Known()) return false; + + if (emboss_reserved_local_other.has_config().ValueOrDefault() && + !has_config().ValueOrDefault()) + return false; + if (has_config().ValueOrDefault() && + !emboss_reserved_local_other.has_config().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_config().ValueOrDefault() && + has_config().ValueOrDefault() && + !config().Equals(emboss_reserved_local_other.config())) + return false; + + + + if (!has_config_vx().Known()) return false; + if (!emboss_reserved_local_other.has_config_vx().Known()) return false; + + if (emboss_reserved_local_other.has_config_vx().ValueOrDefault() && + !has_config_vx().ValueOrDefault()) + return false; + if (has_config_vx().ValueOrDefault() && + !emboss_reserved_local_other.has_config_vx().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_config_vx().ValueOrDefault() && + has_config_vx().ValueOrDefault() && + !config_vx().Equals(emboss_reserved_local_other.config_vx())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericMultiVersionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_product().ValueOr(false) && + !has_product().ValueOr(false)) + return false; + if (has_product().ValueOr(false) && + !emboss_reserved_local_other.has_product().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_product().ValueOr(false) && + has_product().ValueOr(false) && + !product().UncheckedEquals(emboss_reserved_local_other.product())) + return false; + + + + if (emboss_reserved_local_other.has_message_id().ValueOr(false) && + !has_message_id().ValueOr(false)) + return false; + if (has_message_id().ValueOr(false) && + !emboss_reserved_local_other.has_message_id().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_message_id().ValueOr(false) && + has_message_id().ValueOr(false) && + !message_id().UncheckedEquals(emboss_reserved_local_other.message_id())) + return false; + + + + if (emboss_reserved_local_other.has_axes().ValueOr(false) && + !has_axes().ValueOr(false)) + return false; + if (has_axes().ValueOr(false) && + !emboss_reserved_local_other.has_axes().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axes().ValueOr(false) && + has_axes().ValueOr(false) && + !axes().UncheckedEquals(emboss_reserved_local_other.axes())) + return false; + + + + if (emboss_reserved_local_other.has_config().ValueOr(false) && + !has_config().ValueOr(false)) + return false; + if (has_config().ValueOr(false) && + !emboss_reserved_local_other.has_config().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_config().ValueOr(false) && + has_config().ValueOr(false) && + !config().UncheckedEquals(emboss_reserved_local_other.config())) + return false; + + + + if (emboss_reserved_local_other.has_config_vx().ValueOr(false) && + !has_config_vx().ValueOr(false)) + return false; + if (has_config_vx().ValueOr(false) && + !emboss_reserved_local_other.has_config_vx().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_config_vx().ValueOr(false) && + has_config_vx().ValueOr(false) && + !config_vx().UncheckedEquals(emboss_reserved_local_other.config_vx())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericMultiVersionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericMultiVersionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericMultiVersionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "message_id") { + if (!message_id().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "axes") { + if (!axes().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "config") { + if (!config().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "config_vx") { + if (!config_vx().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_message_id().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + message_id().IsAggregate() || message_id().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("message_id: "); + message_id().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !message_id().IsAggregate() && !message_id().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("# message_id: UNREADABLE\n"); + } + } + + if (has_axes().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axes().IsAggregate() || axes().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("axes: "); + axes().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !axes().IsAggregate() && !axes().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("# axes: UNREADABLE\n"); + } + } + + if (has_config().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + config().IsAggregate() || config().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("config: "); + config().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !config().IsAggregate() && !config().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("# config: UNREADABLE\n"); + } + } + + if (has_config_vx().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + config_vx().IsAggregate() || config_vx().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("config_vx: "); + config_vx().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !config_vx().IsAggregate() && !config_vx().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("# config_vx: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + constexpr ::emboss::support::MaybeConstantView + product() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + product_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_product() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::MessageId, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + message_id() const; + ::emboss::support::Maybe has_message_id() const; + + public: + typename ::emboss::test::GenericAxesView> + + axes() const; + ::emboss::support::Maybe has_axes() const; + + public: + typename ::emboss::test::GenericConfigView>, 32>> + + config() const; + ::emboss::support::Maybe has_config() const; + + public: + typename ::emboss::test::GenericConfigVXView> + + config_vx() const; + ::emboss::support::Maybe has_config_vx() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericMultiVersionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.message_id(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(13LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Choice(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(5LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = view_.product(); + const auto emboss_reserved_local_subexpr_8 = (emboss_reserved_local_subexpr_7.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_7.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Equal(emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(23))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::And(emboss_reserved_local_subexpr_9, emboss_reserved_local_subexpr_5); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Choice(emboss_reserved_local_subexpr_10, ::emboss::support::Maybe(static_cast(9LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_12 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6, emboss_reserved_local_subexpr_11); + + return emboss_reserved_local_subexpr_12; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericMultiVersionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + ::emboss::test::Product product_; + bool parameters_initialized_ = false; + + template + friend class GenericMultiVersionView; +}; +using MultiVersionView = + GenericMultiVersionView; +using MultiVersionWriter = + GenericMultiVersionView; + +template +struct EmbossReservedInternalIsGenericMultiVersionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericMultiVersionView< + GenericMultiVersionView> { + static constexpr const bool value = true; +}; + +template +inline GenericMultiVersionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeMultiVersionView(::emboss::test::Product product, T &&emboss_reserved_local_arg) { + return GenericMultiVersionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(product), ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericMultiVersionView> +MakeMultiVersionView(::emboss::test::Product product, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericMultiVersionView>( + ::std::forward(product), emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericMultiVersionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedMultiVersionView( + ::emboss::test::Product product, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericMultiVersionView< + /**/ ::emboss::support::ContiguousBuffer>( + ::std::forward(product), emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + +namespace Axes { + +} // namespace Axes + + +template +struct EmbossReservedInternalIsGenericAxesView; + +template +class GenericAxesView final { + public: + GenericAxesView() : backing_() {} + explicit GenericAxesView( + ::std::int32_t axes, Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) , axes_(axes) + , parameters_initialized_(true) {} + + template + GenericAxesView( + const GenericAxesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + , axes_(emboss_reserved_local_other.axes_) +, parameters_initialized_(emboss_reserved_local_other.parameters_initialized_) {} + + template ::type>::type>::value>::type> + explicit GenericAxesView( + ::std::int32_t axes, Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) , axes_(axes) + , parameters_initialized_(true) {} + template + explicit GenericAxesView( + ::std::int32_t axes, Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) , axes_(axes) + , parameters_initialized_(true) {} + + template + GenericAxesView &operator=( + const GenericAxesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; +if (!parameters_initialized_) return false; + if (!has_values().Known()) return false; + if (has_values().ValueOrDefault() && !values().Ok()) return false; + + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_z().Known()) return false; + if (has_z().ValueOrDefault() && !z().Ok()) return false; + + + if (!has_axis_count_plus_one().Known()) return false; + if (has_axis_count_plus_one().ValueOrDefault() && !axis_count_plus_one().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericAxesView emboss_reserved_local_other) const { + + if (!has_axes().Known()) return false; + if (!emboss_reserved_local_other.has_axes().Known()) return false; + + if (emboss_reserved_local_other.has_axes().ValueOrDefault() && + !has_axes().ValueOrDefault()) + return false; + if (has_axes().ValueOrDefault() && + !emboss_reserved_local_other.has_axes().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axes().ValueOrDefault() && + has_axes().ValueOrDefault() && + !axes().Equals(emboss_reserved_local_other.axes())) + return false; + + + + if (!has_values().Known()) return false; + if (!emboss_reserved_local_other.has_values().Known()) return false; + + if (emboss_reserved_local_other.has_values().ValueOrDefault() && + !has_values().ValueOrDefault()) + return false; + if (has_values().ValueOrDefault() && + !emboss_reserved_local_other.has_values().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_values().ValueOrDefault() && + has_values().ValueOrDefault() && + !values().Equals(emboss_reserved_local_other.values())) + return false; + + + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_z().Known()) return false; + if (!emboss_reserved_local_other.has_z().Known()) return false; + + if (emboss_reserved_local_other.has_z().ValueOrDefault() && + !has_z().ValueOrDefault()) + return false; + if (has_z().ValueOrDefault() && + !emboss_reserved_local_other.has_z().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_z().ValueOrDefault() && + has_z().ValueOrDefault() && + !z().Equals(emboss_reserved_local_other.z())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAxesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_axes().ValueOr(false) && + !has_axes().ValueOr(false)) + return false; + if (has_axes().ValueOr(false) && + !emboss_reserved_local_other.has_axes().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axes().ValueOr(false) && + has_axes().ValueOr(false) && + !axes().UncheckedEquals(emboss_reserved_local_other.axes())) + return false; + + + + if (emboss_reserved_local_other.has_values().ValueOr(false) && + !has_values().ValueOr(false)) + return false; + if (has_values().ValueOr(false) && + !emboss_reserved_local_other.has_values().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_values().ValueOr(false) && + has_values().ValueOr(false) && + !values().UncheckedEquals(emboss_reserved_local_other.values())) + return false; + + + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_z().ValueOr(false) && + !has_z().ValueOr(false)) + return false; + if (has_z().ValueOr(false) && + !emboss_reserved_local_other.has_z().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_z().ValueOr(false) && + has_z().ValueOr(false) && + !z().UncheckedEquals(emboss_reserved_local_other.z())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAxesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAxesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAxesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "values") { + if (!values().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "z") { + if (!z().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_values().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + values().IsAggregate() || values().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("values: "); + values().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !values().IsAggregate() && !values().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("# values: UNREADABLE\n"); + } + } + + if (has_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_z().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + z().IsAggregate() || z().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("z: "); + z().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !z().IsAggregate() && !z().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("# z: UNREADABLE\n"); + } + } + + if (has_axis_count_plus_one().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axis_count_plus_one().IsAggregate() || axis_count_plus_one().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# axis_count_plus_one: "); + axis_count_plus_one().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("# axis_count_plus_one: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + constexpr ::emboss::support::MaybeConstantView + axes() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + axes_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_axes() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericAxisView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 , ::emboss::test::AxisType> + + values() const; + ::emboss::support::Maybe has_values() const; + + public: + typename ::emboss::test::GenericAxisView> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::test::GenericAxisView> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::test::GenericAxisView> + + z() const; + ::emboss::support::Maybe has_z() const; + + public: + class EmbossReservedVirtualAxisCountPlusOneView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualAxisCountPlusOneView( + const GenericAxesView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualAxisCountPlusOneView() = delete; + EmbossReservedVirtualAxisCountPlusOneView(const EmbossReservedVirtualAxisCountPlusOneView &) = default; + EmbossReservedVirtualAxisCountPlusOneView(EmbossReservedVirtualAxisCountPlusOneView &&) = default; + EmbossReservedVirtualAxisCountPlusOneView &operator=(const EmbossReservedVirtualAxisCountPlusOneView &) = + default; + EmbossReservedVirtualAxisCountPlusOneView &operator=(EmbossReservedVirtualAxisCountPlusOneView &&) = + default; + ~EmbossReservedVirtualAxisCountPlusOneView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_axis_count_plus_one().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.axes(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericAxesView view_; + }; + EmbossReservedVirtualAxisCountPlusOneView axis_count_plus_one() const; + ::emboss::support::Maybe has_axis_count_plus_one() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericAxesView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.axes(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(0LL)), emboss_reserved_local_subexpr_3); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Choice(emboss_reserved_local_subexpr_6, ::emboss::support::Maybe(static_cast(4LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::Choice(emboss_reserved_local_subexpr_8, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Choice(emboss_reserved_local_subexpr_10, ::emboss::support::Maybe(static_cast(12LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_12 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), emboss_reserved_local_subexpr_5, emboss_reserved_local_subexpr_7, emboss_reserved_local_subexpr_9, emboss_reserved_local_subexpr_11); + + return emboss_reserved_local_subexpr_12; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericAxesView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + ::std::int32_t axes_; + bool parameters_initialized_ = false; + + template + friend class GenericAxesView; +}; +using AxesView = + GenericAxesView; +using AxesWriter = + GenericAxesView; + +template +struct EmbossReservedInternalIsGenericAxesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAxesView< + GenericAxesView> { + static constexpr const bool value = true; +}; + +template +inline GenericAxesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAxesView(::std::int32_t axes, T &&emboss_reserved_local_arg) { + return GenericAxesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(axes), ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAxesView> +MakeAxesView(::std::int32_t axes, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAxesView>( + ::std::forward(axes), emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAxesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAxesView( + ::std::int32_t axes, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAxesView< + /**/ ::emboss::support::ContiguousBuffer>( + ::std::forward(axes), emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + +namespace AxisPair { + +} // namespace AxisPair + + +template +struct EmbossReservedInternalIsGenericAxisPairView; + +template +class GenericAxisPairView final { + public: + GenericAxisPairView() : backing_() {} + explicit GenericAxisPairView( + ::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) , axis_type_a_parameter_(axis_type_a_parameter) +, axis_type_b_parameter_(axis_type_b_parameter) + , parameters_initialized_(true) {} + + template + GenericAxisPairView( + const GenericAxisPairView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + , axis_type_a_parameter_(emboss_reserved_local_other.axis_type_a_parameter_) +, axis_type_b_parameter_(emboss_reserved_local_other.axis_type_b_parameter_) +, parameters_initialized_(emboss_reserved_local_other.parameters_initialized_) {} + + template ::type>::type>::value>::type> + explicit GenericAxisPairView( + ::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) , axis_type_a_parameter_(axis_type_a_parameter) +, axis_type_b_parameter_(axis_type_b_parameter) + , parameters_initialized_(true) {} + template + explicit GenericAxisPairView( + ::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) , axis_type_a_parameter_(axis_type_a_parameter) +, axis_type_b_parameter_(axis_type_b_parameter) + , parameters_initialized_(true) {} + + template + GenericAxisPairView &operator=( + const GenericAxisPairView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; +if (!parameters_initialized_) return false; + if (!has_axis_type_a().Known()) return false; + if (has_axis_type_a().ValueOrDefault() && !axis_type_a().Ok()) return false; + + + if (!has_axis_a().Known()) return false; + if (has_axis_a().ValueOrDefault() && !axis_a().Ok()) return false; + + + if (!has_axis_type_b().Known()) return false; + if (has_axis_type_b().ValueOrDefault() && !axis_type_b().Ok()) return false; + + + if (!has_axis_b().Known()) return false; + if (has_axis_b().ValueOrDefault() && !axis_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericAxisPairView emboss_reserved_local_other) const { + + if (!has_axis_type_a_parameter().Known()) return false; + if (!emboss_reserved_local_other.has_axis_type_a_parameter().Known()) return false; + + if (emboss_reserved_local_other.has_axis_type_a_parameter().ValueOrDefault() && + !has_axis_type_a_parameter().ValueOrDefault()) + return false; + if (has_axis_type_a_parameter().ValueOrDefault() && + !emboss_reserved_local_other.has_axis_type_a_parameter().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axis_type_a_parameter().ValueOrDefault() && + has_axis_type_a_parameter().ValueOrDefault() && + !axis_type_a_parameter().Equals(emboss_reserved_local_other.axis_type_a_parameter())) + return false; + + + + if (!has_axis_type_b_parameter().Known()) return false; + if (!emboss_reserved_local_other.has_axis_type_b_parameter().Known()) return false; + + if (emboss_reserved_local_other.has_axis_type_b_parameter().ValueOrDefault() && + !has_axis_type_b_parameter().ValueOrDefault()) + return false; + if (has_axis_type_b_parameter().ValueOrDefault() && + !emboss_reserved_local_other.has_axis_type_b_parameter().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axis_type_b_parameter().ValueOrDefault() && + has_axis_type_b_parameter().ValueOrDefault() && + !axis_type_b_parameter().Equals(emboss_reserved_local_other.axis_type_b_parameter())) + return false; + + + + if (!has_axis_a().Known()) return false; + if (!emboss_reserved_local_other.has_axis_a().Known()) return false; + + if (emboss_reserved_local_other.has_axis_a().ValueOrDefault() && + !has_axis_a().ValueOrDefault()) + return false; + if (has_axis_a().ValueOrDefault() && + !emboss_reserved_local_other.has_axis_a().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axis_a().ValueOrDefault() && + has_axis_a().ValueOrDefault() && + !axis_a().Equals(emboss_reserved_local_other.axis_a())) + return false; + + + + if (!has_axis_b().Known()) return false; + if (!emboss_reserved_local_other.has_axis_b().Known()) return false; + + if (emboss_reserved_local_other.has_axis_b().ValueOrDefault() && + !has_axis_b().ValueOrDefault()) + return false; + if (has_axis_b().ValueOrDefault() && + !emboss_reserved_local_other.has_axis_b().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axis_b().ValueOrDefault() && + has_axis_b().ValueOrDefault() && + !axis_b().Equals(emboss_reserved_local_other.axis_b())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAxisPairView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_axis_type_a_parameter().ValueOr(false) && + !has_axis_type_a_parameter().ValueOr(false)) + return false; + if (has_axis_type_a_parameter().ValueOr(false) && + !emboss_reserved_local_other.has_axis_type_a_parameter().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axis_type_a_parameter().ValueOr(false) && + has_axis_type_a_parameter().ValueOr(false) && + !axis_type_a_parameter().UncheckedEquals(emboss_reserved_local_other.axis_type_a_parameter())) + return false; + + + + if (emboss_reserved_local_other.has_axis_type_b_parameter().ValueOr(false) && + !has_axis_type_b_parameter().ValueOr(false)) + return false; + if (has_axis_type_b_parameter().ValueOr(false) && + !emboss_reserved_local_other.has_axis_type_b_parameter().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axis_type_b_parameter().ValueOr(false) && + has_axis_type_b_parameter().ValueOr(false) && + !axis_type_b_parameter().UncheckedEquals(emboss_reserved_local_other.axis_type_b_parameter())) + return false; + + + + if (emboss_reserved_local_other.has_axis_a().ValueOr(false) && + !has_axis_a().ValueOr(false)) + return false; + if (has_axis_a().ValueOr(false) && + !emboss_reserved_local_other.has_axis_a().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axis_a().ValueOr(false) && + has_axis_a().ValueOr(false) && + !axis_a().UncheckedEquals(emboss_reserved_local_other.axis_a())) + return false; + + + + if (emboss_reserved_local_other.has_axis_b().ValueOr(false) && + !has_axis_b().ValueOr(false)) + return false; + if (has_axis_b().ValueOr(false) && + !emboss_reserved_local_other.has_axis_b().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axis_b().ValueOr(false) && + has_axis_b().ValueOr(false) && + !axis_b().UncheckedEquals(emboss_reserved_local_other.axis_b())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAxisPairView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAxisPairView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAxisPairView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "axis_a") { + if (!axis_a().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "axis_b") { + if (!axis_b().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_axis_type_a().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axis_type_a().IsAggregate() || axis_type_a().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# axis_type_a: "); + axis_type_a().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("# axis_type_a: UNREADABLE\n"); + } + } + + if (has_axis_a().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axis_a().IsAggregate() || axis_a().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("axis_a: "); + axis_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !axis_a().IsAggregate() && !axis_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("# axis_a: UNREADABLE\n"); + } + } + + if (has_axis_type_b().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axis_type_b().IsAggregate() || axis_type_b().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# axis_type_b: "); + axis_type_b().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("# axis_type_b: UNREADABLE\n"); + } + } + + if (has_axis_b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axis_b().IsAggregate() || axis_b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("axis_b: "); + axis_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !axis_b().IsAggregate() && !axis_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("# axis_b: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + constexpr ::emboss::support::MaybeConstantView + axis_type_a_parameter() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + axis_type_a_parameter_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_axis_type_a_parameter() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + private: + constexpr ::emboss::support::MaybeConstantView + axis_type_b_parameter() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + axis_type_b_parameter_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_axis_type_b_parameter() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + public: + class EmbossReservedVirtualAxisTypeAView final { + public: + using ValueType = ::emboss::test::AxisType; + + explicit EmbossReservedVirtualAxisTypeAView( + const GenericAxisPairView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualAxisTypeAView() = delete; + EmbossReservedVirtualAxisTypeAView(const EmbossReservedVirtualAxisTypeAView &) = default; + EmbossReservedVirtualAxisTypeAView(EmbossReservedVirtualAxisTypeAView &&) = default; + EmbossReservedVirtualAxisTypeAView &operator=(const EmbossReservedVirtualAxisTypeAView &) = + default; + EmbossReservedVirtualAxisTypeAView &operator=(EmbossReservedVirtualAxisTypeAView &&) = + default; + ~EmbossReservedVirtualAxisTypeAView() = default; + + ::emboss::test::AxisType Read() const { + EMBOSS_CHECK(view_.has_axis_type_a().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(); + } + ::emboss::test::AxisType 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()); + } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteEnumViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.axis_type_a_parameter(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + return emboss_reserved_local_subexpr_2; + } + + static constexpr bool ValueIsOk( + ::emboss::test::AxisType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericAxisPairView view_; + }; + EmbossReservedVirtualAxisTypeAView axis_type_a() const; + ::emboss::support::Maybe has_axis_type_a() const; + + public: + typename ::emboss::test::GenericAxisView> + + axis_a() const; + ::emboss::support::Maybe has_axis_a() const; + + public: + class EmbossReservedVirtualAxisTypeBView final { + public: + using ValueType = ::emboss::test::AxisType; + + explicit EmbossReservedVirtualAxisTypeBView( + const GenericAxisPairView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualAxisTypeBView() = delete; + EmbossReservedVirtualAxisTypeBView(const EmbossReservedVirtualAxisTypeBView &) = default; + EmbossReservedVirtualAxisTypeBView(EmbossReservedVirtualAxisTypeBView &&) = default; + EmbossReservedVirtualAxisTypeBView &operator=(const EmbossReservedVirtualAxisTypeBView &) = + default; + EmbossReservedVirtualAxisTypeBView &operator=(EmbossReservedVirtualAxisTypeBView &&) = + default; + ~EmbossReservedVirtualAxisTypeBView() = default; + + ::emboss::test::AxisType Read() const { + EMBOSS_CHECK(view_.has_axis_type_b().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(); + } + ::emboss::test::AxisType 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()); + } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteEnumViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.axis_type_b_parameter(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + return emboss_reserved_local_subexpr_2; + } + + static constexpr bool ValueIsOk( + ::emboss::test::AxisType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericAxisPairView view_; + }; + EmbossReservedVirtualAxisTypeBView axis_type_b() const; + ::emboss::support::Maybe has_axis_type_b() const; + + public: + typename ::emboss::test::GenericAxisView> + + axis_b() const; + ::emboss::support::Maybe has_axis_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + ::emboss::test::AxisType axis_type_a_parameter_; +::emboss::test::AxisType axis_type_b_parameter_; + bool parameters_initialized_ = false; + + template + friend class GenericAxisPairView; +}; +using AxisPairView = + GenericAxisPairView; +using AxisPairWriter = + GenericAxisPairView; + +template +struct EmbossReservedInternalIsGenericAxisPairView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAxisPairView< + GenericAxisPairView> { + static constexpr const bool value = true; +}; + +template +inline GenericAxisPairView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAxisPairView(::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, T &&emboss_reserved_local_arg) { + return GenericAxisPairView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(axis_type_a_parameter),::std::forward(axis_type_b_parameter), ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAxisPairView> +MakeAxisPairView(::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAxisPairView>( + ::std::forward(axis_type_a_parameter),::std::forward(axis_type_b_parameter), emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAxisPairView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAxisPairView( + ::emboss::test::AxisType axis_type_a_parameter, ::emboss::test::AxisType axis_type_b_parameter, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAxisPairView< + /**/ ::emboss::support::ContiguousBuffer>( + ::std::forward(axis_type_a_parameter),::std::forward(axis_type_b_parameter), emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace AxesEnvelope { + +} // namespace AxesEnvelope + + +template +struct EmbossReservedInternalIsGenericAxesEnvelopeView; + +template +class GenericAxesEnvelopeView final { + public: + GenericAxesEnvelopeView() : backing_() {} + explicit GenericAxesEnvelopeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericAxesEnvelopeView( + const GenericAxesEnvelopeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericAxesEnvelopeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericAxesEnvelopeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericAxesEnvelopeView &operator=( + const GenericAxesEnvelopeView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_axis_count().Known()) return false; + if (has_axis_count().ValueOrDefault() && !axis_count().Ok()) return false; + + + if (!has_axes().Known()) return false; + if (has_axes().ValueOrDefault() && !axes().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericAxesEnvelopeView emboss_reserved_local_other) const { + + if (!has_axis_count().Known()) return false; + if (!emboss_reserved_local_other.has_axis_count().Known()) return false; + + if (emboss_reserved_local_other.has_axis_count().ValueOrDefault() && + !has_axis_count().ValueOrDefault()) + return false; + if (has_axis_count().ValueOrDefault() && + !emboss_reserved_local_other.has_axis_count().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axis_count().ValueOrDefault() && + has_axis_count().ValueOrDefault() && + !axis_count().Equals(emboss_reserved_local_other.axis_count())) + return false; + + + + if (!has_axes().Known()) return false; + if (!emboss_reserved_local_other.has_axes().Known()) return false; + + if (emboss_reserved_local_other.has_axes().ValueOrDefault() && + !has_axes().ValueOrDefault()) + return false; + if (has_axes().ValueOrDefault() && + !emboss_reserved_local_other.has_axes().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axes().ValueOrDefault() && + has_axes().ValueOrDefault() && + !axes().Equals(emboss_reserved_local_other.axes())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAxesEnvelopeView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_axis_count().ValueOr(false) && + !has_axis_count().ValueOr(false)) + return false; + if (has_axis_count().ValueOr(false) && + !emboss_reserved_local_other.has_axis_count().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axis_count().ValueOr(false) && + has_axis_count().ValueOr(false) && + !axis_count().UncheckedEquals(emboss_reserved_local_other.axis_count())) + return false; + + + + if (emboss_reserved_local_other.has_axes().ValueOr(false) && + !has_axes().ValueOr(false)) + return false; + if (has_axes().ValueOr(false) && + !emboss_reserved_local_other.has_axes().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axes().ValueOr(false) && + has_axes().ValueOr(false) && + !axes().UncheckedEquals(emboss_reserved_local_other.axes())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAxesEnvelopeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAxesEnvelopeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAxesEnvelopeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "axis_count") { + if (!axis_count().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "axes") { + if (!axes().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_axis_count().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axis_count().IsAggregate() || axis_count().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("axis_count: "); + axis_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !axis_count().IsAggregate() && !axis_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("# axis_count: UNREADABLE\n"); + } + } + + if (has_axes().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axes().IsAggregate() || axes().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("axes: "); + axes().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !axes().IsAggregate() && !axes().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("# axes: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + axis_count() const; + ::emboss::support::Maybe has_axis_count() const; + + public: + typename ::emboss::test::GenericAxesView> + + axes() const; + ::emboss::support::Maybe has_axes() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericAxesEnvelopeView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.axis_count(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_3); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_4, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_5); + + return emboss_reserved_local_subexpr_6; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericAxesEnvelopeView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericAxesEnvelopeView; +}; +using AxesEnvelopeView = + GenericAxesEnvelopeView; +using AxesEnvelopeWriter = + GenericAxesEnvelopeView; + +template +struct EmbossReservedInternalIsGenericAxesEnvelopeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAxesEnvelopeView< + GenericAxesEnvelopeView> { + static constexpr const bool value = true; +}; + +template +inline GenericAxesEnvelopeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAxesEnvelopeView( T &&emboss_reserved_local_arg) { + return GenericAxesEnvelopeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAxesEnvelopeView> +MakeAxesEnvelopeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAxesEnvelopeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAxesEnvelopeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAxesEnvelopeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAxesEnvelopeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} +enum class AxisType : ::std::int64_t { + GENERIC = static_cast(-1LL), + X_AXIS = static_cast(1LL), + Y_AXIS = static_cast(2LL), + Z_AXIS = static_cast(3LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + AxisType *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("GENERIC", emboss_reserved_local_name)) { + *emboss_reserved_local_result = AxisType::GENERIC; + return true; + } + + if (!strcmp("X_AXIS", emboss_reserved_local_name)) { + *emboss_reserved_local_result = AxisType::X_AXIS; + return true; + } + + if (!strcmp("Y_AXIS", emboss_reserved_local_name)) { + *emboss_reserved_local_result = AxisType::Y_AXIS; + return true; + } + + if (!strcmp("Z_AXIS", emboss_reserved_local_name)) { + *emboss_reserved_local_result = AxisType::Z_AXIS; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + AxisType emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case AxisType::GENERIC: return "GENERIC"; + + case AxisType::X_AXIS: return "X_AXIS"; + + case AxisType::Y_AXIS: return "Y_AXIS"; + + case AxisType::Z_AXIS: return "Z_AXIS"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(AxisType emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case AxisType::GENERIC: return true; + + case AxisType::X_AXIS: return true; + + case AxisType::Y_AXIS: return true; + + case AxisType::Z_AXIS: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + AxisType 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::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, + AxisType *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + AxisType emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(AxisType emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + AxisType emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + + + + +namespace Axis { + +} // namespace Axis + + +template +struct EmbossReservedInternalIsGenericAxisView; + +template +class GenericAxisView final { + public: + GenericAxisView() : backing_() {} + explicit GenericAxisView( + ::emboss::test::AxisType axis_type_parameter, Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) , axis_type_parameter_(axis_type_parameter) + , parameters_initialized_(true) {} + + template + GenericAxisView( + const GenericAxisView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + , axis_type_parameter_(emboss_reserved_local_other.axis_type_parameter_) +, parameters_initialized_(emboss_reserved_local_other.parameters_initialized_) {} + + template ::type>::type>::value>::type> + explicit GenericAxisView( + ::emboss::test::AxisType axis_type_parameter, Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) , axis_type_parameter_(axis_type_parameter) + , parameters_initialized_(true) {} + template + explicit GenericAxisView( + ::emboss::test::AxisType axis_type_parameter, Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) , axis_type_parameter_(axis_type_parameter) + , parameters_initialized_(true) {} + + template + GenericAxisView &operator=( + const GenericAxisView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; +if (!parameters_initialized_) return false; + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().Ok()) return false; + + + if (!has_axis_type().Known()) return false; + if (has_axis_type().ValueOrDefault() && !axis_type().Ok()) return false; + + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_z().Known()) return false; + if (has_z().ValueOrDefault() && !z().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericAxisView emboss_reserved_local_other) const { + + if (!has_axis_type_parameter().Known()) return false; + if (!emboss_reserved_local_other.has_axis_type_parameter().Known()) return false; + + if (emboss_reserved_local_other.has_axis_type_parameter().ValueOrDefault() && + !has_axis_type_parameter().ValueOrDefault()) + return false; + if (has_axis_type_parameter().ValueOrDefault() && + !emboss_reserved_local_other.has_axis_type_parameter().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_axis_type_parameter().ValueOrDefault() && + has_axis_type_parameter().ValueOrDefault() && + !axis_type_parameter().Equals(emboss_reserved_local_other.axis_type_parameter())) + return false; + + + + if (!has_value().Known()) return false; + if (!emboss_reserved_local_other.has_value().Known()) return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + !has_value().ValueOrDefault()) + return false; + if (has_value().ValueOrDefault() && + !emboss_reserved_local_other.has_value().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + has_value().ValueOrDefault() && + !value().Equals(emboss_reserved_local_other.value())) + return false; + + + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + + + if (!has_z().Known()) return false; + if (!emboss_reserved_local_other.has_z().Known()) return false; + + if (emboss_reserved_local_other.has_z().ValueOrDefault() && + !has_z().ValueOrDefault()) + return false; + if (has_z().ValueOrDefault() && + !emboss_reserved_local_other.has_z().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_z().ValueOrDefault() && + has_z().ValueOrDefault() && + !z().Equals(emboss_reserved_local_other.z())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAxisView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_axis_type_parameter().ValueOr(false) && + !has_axis_type_parameter().ValueOr(false)) + return false; + if (has_axis_type_parameter().ValueOr(false) && + !emboss_reserved_local_other.has_axis_type_parameter().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_axis_type_parameter().ValueOr(false) && + has_axis_type_parameter().ValueOr(false) && + !axis_type_parameter().UncheckedEquals(emboss_reserved_local_other.axis_type_parameter())) + return false; + + + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + !has_value().ValueOr(false)) + return false; + if (has_value().ValueOr(false) && + !emboss_reserved_local_other.has_value().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + has_value().ValueOr(false) && + !value().UncheckedEquals(emboss_reserved_local_other.value())) + return false; + + + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + + + if (emboss_reserved_local_other.has_z().ValueOr(false) && + !has_z().ValueOr(false)) + return false; + if (has_z().ValueOr(false) && + !emboss_reserved_local_other.has_z().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_z().ValueOr(false) && + has_z().ValueOr(false) && + !z().UncheckedEquals(emboss_reserved_local_other.z())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAxisView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAxisView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAxisView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "value") { + if (!value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "z") { + if (!z().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value: "); + value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value().IsAggregate() && !value().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("# value: UNREADABLE\n"); + } + } + + if (has_axis_type().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + axis_type().IsAggregate() || axis_type().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# axis_type: "); + axis_type().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("# axis_type: UNREADABLE\n"); + } + } + + if (has_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_z().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + z().IsAggregate() || z().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("z: "); + z().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !z().IsAggregate() && !z().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("# z: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + constexpr ::emboss::support::MaybeConstantView + axis_type_parameter() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + axis_type_parameter_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_axis_type_parameter() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + value() const; + ::emboss::support::Maybe has_value() const; + + public: + class EmbossReservedVirtualAxisTypeView final { + public: + using ValueType = ::emboss::test::AxisType; + + explicit EmbossReservedVirtualAxisTypeView( + const GenericAxisView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualAxisTypeView() = delete; + EmbossReservedVirtualAxisTypeView(const EmbossReservedVirtualAxisTypeView &) = default; + EmbossReservedVirtualAxisTypeView(EmbossReservedVirtualAxisTypeView &&) = default; + EmbossReservedVirtualAxisTypeView &operator=(const EmbossReservedVirtualAxisTypeView &) = + default; + EmbossReservedVirtualAxisTypeView &operator=(EmbossReservedVirtualAxisTypeView &&) = + default; + ~EmbossReservedVirtualAxisTypeView() = default; + + ::emboss::test::AxisType Read() const { + EMBOSS_CHECK(view_.has_axis_type().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(); + } + ::emboss::test::AxisType 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()); + } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteEnumViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.axis_type_parameter(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + return emboss_reserved_local_subexpr_2; + } + + static constexpr bool ValueIsOk( + ::emboss::test::AxisType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericAxisView view_; + }; + EmbossReservedVirtualAxisTypeView axis_type() const; + ::emboss::support::Maybe has_axis_type() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + z() const; + ::emboss::support::Maybe has_z() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + ::emboss::test::AxisType axis_type_parameter_; + bool parameters_initialized_ = false; + + template + friend class GenericAxisView; +}; +using AxisView = + GenericAxisView; +using AxisWriter = + GenericAxisView; + +template +struct EmbossReservedInternalIsGenericAxisView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAxisView< + GenericAxisView> { + static constexpr const bool value = true; +}; + +template +inline GenericAxisView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAxisView(::emboss::test::AxisType axis_type_parameter, T &&emboss_reserved_local_arg) { + return GenericAxisView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(axis_type_parameter), ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAxisView> +MakeAxisView(::emboss::test::AxisType axis_type_parameter, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAxisView>( + ::std::forward(axis_type_parameter), emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAxisView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAxisView( + ::emboss::test::AxisType axis_type_parameter, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAxisView< + /**/ ::emboss::support::ContiguousBuffer>( + ::std::forward(axis_type_parameter), emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace Config { + +} // namespace Config + + +template +struct EmbossReservedInternalIsGenericConfigView; + +template +class GenericConfigView final { + public: + GenericConfigView() : backing_() {} + explicit GenericConfigView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConfigView( + const GenericConfigView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConfigView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConfigView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConfigView &operator=( + const GenericConfigView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_power().Known()) return false; + if (has_power().ValueOrDefault() && !power().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericConfigView emboss_reserved_local_other) const { + + if (!has_power().Known()) return false; + if (!emboss_reserved_local_other.has_power().Known()) return false; + + if (emboss_reserved_local_other.has_power().ValueOrDefault() && + !has_power().ValueOrDefault()) + return false; + if (has_power().ValueOrDefault() && + !emboss_reserved_local_other.has_power().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_power().ValueOrDefault() && + has_power().ValueOrDefault() && + !power().Equals(emboss_reserved_local_other.power())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConfigView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_power().ValueOr(false) && + !has_power().ValueOr(false)) + return false; + if (has_power().ValueOr(false) && + !emboss_reserved_local_other.has_power().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_power().ValueOr(false) && + has_power().ValueOr(false) && + !power().UncheckedEquals(emboss_reserved_local_other.power())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConfigView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericConfigView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericConfigView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "power") { + if (!power().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_power().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + power().IsAggregate() || power().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("power: "); + power().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !power().IsAggregate() && !power().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("# power: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + power() const; + ::emboss::support::Maybe has_power() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConfigView; +}; +using ConfigView = + GenericConfigView; +using ConfigWriter = + GenericConfigView; + +template +struct EmbossReservedInternalIsGenericConfigView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConfigView< + GenericConfigView> { + static constexpr const bool value = true; +}; + +template +inline GenericConfigView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConfigView( T &&emboss_reserved_local_arg) { + return GenericConfigView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConfigView> +MakeConfigView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConfigView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConfigView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConfigView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConfigView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace ConfigVX { + + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; + +template +class GenericEmbossReservedAnonymousField1View final { + public: + GenericEmbossReservedAnonymousField1View() : backing_() {} + explicit GenericEmbossReservedAnonymousField1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField1View( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField1View &operator=( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_power().Known()) return false; + if (has_power().ValueOrDefault() && !power().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (!has_power().Known()) return false; + if (!emboss_reserved_local_other.has_power().Known()) return false; + + if (emboss_reserved_local_other.has_power().ValueOrDefault() && + !has_power().ValueOrDefault()) + return false; + if (has_power().ValueOrDefault() && + !emboss_reserved_local_other.has_power().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_power().ValueOrDefault() && + has_power().ValueOrDefault() && + !power().Equals(emboss_reserved_local_other.power())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_power().ValueOr(false) && + !has_power().ValueOr(false)) + return false; + if (has_power().ValueOr(false) && + !emboss_reserved_local_other.has_power().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_power().ValueOr(false) && + has_power().ValueOr(false) && + !power().UncheckedEquals(emboss_reserved_local_other.power())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "power") { + if (!power().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_power().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + power().IsAggregate() || power().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("power: "); + power().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !power().IsAggregate() && !power().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("# power: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + power() const; + ::emboss::support::Maybe has_power() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField1View; +}; +using EmbossReservedAnonymousField1View = + GenericEmbossReservedAnonymousField1View; +using EmbossReservedAnonymousField1Writer = + GenericEmbossReservedAnonymousField1View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< + GenericEmbossReservedAnonymousField1View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField1View> +MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace ConfigVX + + +template +struct EmbossReservedInternalIsGenericConfigVXView; + +template +class GenericConfigVXView final { + public: + GenericConfigVXView() : backing_() {} + explicit GenericConfigVXView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericConfigVXView( + const GenericConfigVXView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericConfigVXView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericConfigVXView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericConfigVXView &operator=( + const GenericConfigVXView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) 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_power().Known()) return false; + if (has_power().ValueOrDefault() && !power().Ok()) return false; + + + if (!has_gain().Known()) return false; + if (has_gain().ValueOrDefault() && !gain().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericConfigVXView emboss_reserved_local_other) const { + + 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_gain().Known()) return false; + if (!emboss_reserved_local_other.has_gain().Known()) return false; + + if (emboss_reserved_local_other.has_gain().ValueOrDefault() && + !has_gain().ValueOrDefault()) + return false; + if (has_gain().ValueOrDefault() && + !emboss_reserved_local_other.has_gain().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_gain().ValueOrDefault() && + has_gain().ValueOrDefault() && + !gain().Equals(emboss_reserved_local_other.gain())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConfigVXView emboss_reserved_local_other) const { + + 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_gain().ValueOr(false) && + !has_gain().ValueOr(false)) + return false; + if (has_gain().ValueOr(false) && + !emboss_reserved_local_other.has_gain().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_gain().ValueOr(false) && + has_gain().ValueOr(false) && + !gain().UncheckedEquals(emboss_reserved_local_other.gain())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConfigVXView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConfigVXView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConfigVXView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "power") { + if (!power().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "gain") { + if (!gain().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_power().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + power().IsAggregate() || power().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("power: "); + power().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !power().IsAggregate() && !power().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("# power: UNREADABLE\n"); + } + } + + if (has_gain().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + gain().IsAggregate() || gain().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("gain: "); + gain().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !gain().IsAggregate() && !gain().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("# gain: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + typename ::emboss::test::ConfigVX::GenericEmbossReservedAnonymousField1View>, 32>> + + emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + + public: + auto power() const -> decltype(this->emboss_reserved_anonymous_field_1().power()) { + return has_power().ValueOrDefault() ? emboss_reserved_anonymous_field_1().power() + : decltype(this->emboss_reserved_anonymous_field_1().power())(); + } + ::emboss::support::Maybe has_power() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + gain() const; + ::emboss::support::Maybe has_gain() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericConfigVXView; +}; +using ConfigVXView = + GenericConfigVXView; +using ConfigVXWriter = + GenericConfigVXView; + +template +struct EmbossReservedInternalIsGenericConfigVXView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConfigVXView< + GenericConfigVXView> { + static constexpr const bool value = true; +}; + +template +inline GenericConfigVXView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConfigVXView( T &&emboss_reserved_local_arg) { + return GenericConfigVXView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConfigVXView> +MakeConfigVXView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConfigVXView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConfigVXView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConfigVXView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConfigVXView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace StructWithUnusedParameter { + +} // namespace StructWithUnusedParameter + + +template +struct EmbossReservedInternalIsGenericStructWithUnusedParameterView; + +template +class GenericStructWithUnusedParameterView final { + public: + GenericStructWithUnusedParameterView() : backing_() {} + explicit GenericStructWithUnusedParameterView( + ::std::int32_t x, Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) , x_(x) + , parameters_initialized_(true) {} + + template + GenericStructWithUnusedParameterView( + const GenericStructWithUnusedParameterView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + , x_(emboss_reserved_local_other.x_) +, parameters_initialized_(emboss_reserved_local_other.parameters_initialized_) {} + + template ::type>::type>::value>::type> + explicit GenericStructWithUnusedParameterView( + ::std::int32_t x, Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) , x_(x) + , parameters_initialized_(true) {} + template + explicit GenericStructWithUnusedParameterView( + ::std::int32_t x, Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) , x_(x) + , parameters_initialized_(true) {} + + template + GenericStructWithUnusedParameterView &operator=( + const GenericStructWithUnusedParameterView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; +if (!parameters_initialized_) return false; + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructWithUnusedParameterView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructWithUnusedParameterView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructWithUnusedParameterView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructWithUnusedParameterView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructWithUnusedParameterView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + constexpr ::emboss::support::MaybeConstantView + x() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + x_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_x() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + ::std::int32_t x_; + bool parameters_initialized_ = false; + + template + friend class GenericStructWithUnusedParameterView; +}; +using StructWithUnusedParameterView = + GenericStructWithUnusedParameterView; +using StructWithUnusedParameterWriter = + GenericStructWithUnusedParameterView; + +template +struct EmbossReservedInternalIsGenericStructWithUnusedParameterView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructWithUnusedParameterView< + GenericStructWithUnusedParameterView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructWithUnusedParameterView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructWithUnusedParameterView(::std::int32_t x, T &&emboss_reserved_local_arg) { + return GenericStructWithUnusedParameterView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(x), ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructWithUnusedParameterView> +MakeStructWithUnusedParameterView(::std::int32_t x, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructWithUnusedParameterView>( + ::std::forward(x), emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructWithUnusedParameterView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructWithUnusedParameterView( + ::std::int32_t x, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructWithUnusedParameterView< + /**/ ::emboss::support::ContiguousBuffer>( + ::std::forward(x), emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace StructContainingStructWithUnusedParameter { + +} // namespace StructContainingStructWithUnusedParameter + + +template +struct EmbossReservedInternalIsGenericStructContainingStructWithUnusedParameterView; + +template +class GenericStructContainingStructWithUnusedParameterView final { + public: + GenericStructContainingStructWithUnusedParameterView() : backing_() {} + explicit GenericStructContainingStructWithUnusedParameterView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructContainingStructWithUnusedParameterView( + const GenericStructContainingStructWithUnusedParameterView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructContainingStructWithUnusedParameterView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructContainingStructWithUnusedParameterView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructContainingStructWithUnusedParameterView &operator=( + const GenericStructContainingStructWithUnusedParameterView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_swup().Known()) return false; + if (has_swup().ValueOrDefault() && !swup().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_swup().Known()) return false; + if (!emboss_reserved_local_other.has_swup().Known()) return false; + + if (emboss_reserved_local_other.has_swup().ValueOrDefault() && + !has_swup().ValueOrDefault()) + return false; + if (has_swup().ValueOrDefault() && + !emboss_reserved_local_other.has_swup().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_swup().ValueOrDefault() && + has_swup().ValueOrDefault() && + !swup().Equals(emboss_reserved_local_other.swup())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_swup().ValueOr(false) && + !has_swup().ValueOr(false)) + return false; + if (has_swup().ValueOr(false) && + !emboss_reserved_local_other.has_swup().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_swup().ValueOr(false) && + has_swup().ValueOr(false) && + !swup().UncheckedEquals(emboss_reserved_local_other.swup())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructContainingStructWithUnusedParameterView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "swup") { + if (!swup().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_swup().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + swup().IsAggregate() || swup().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("swup: "); + swup().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !swup().IsAggregate() && !swup().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("# swup: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::test::GenericStructWithUnusedParameterView> + + swup() const; + ::emboss::support::Maybe has_swup() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructContainingStructWithUnusedParameterView; +}; +using StructContainingStructWithUnusedParameterView = + GenericStructContainingStructWithUnusedParameterView; +using StructContainingStructWithUnusedParameterWriter = + GenericStructContainingStructWithUnusedParameterView; + +template +struct EmbossReservedInternalIsGenericStructContainingStructWithUnusedParameterView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructContainingStructWithUnusedParameterView< + GenericStructContainingStructWithUnusedParameterView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructContainingStructWithUnusedParameterView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructContainingStructWithUnusedParameterView( T &&emboss_reserved_local_arg) { + return GenericStructContainingStructWithUnusedParameterView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructContainingStructWithUnusedParameterView> +MakeStructContainingStructWithUnusedParameterView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructContainingStructWithUnusedParameterView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructContainingStructWithUnusedParameterView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructContainingStructWithUnusedParameterView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructContainingStructWithUnusedParameterView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace BiasedValue { + +} // namespace BiasedValue + + +template +struct EmbossReservedInternalIsGenericBiasedValueView; + +template +class GenericBiasedValueView final { + public: + GenericBiasedValueView() : backing_() {} + explicit GenericBiasedValueView( + ::std::int32_t bias, Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) , bias_(bias) + , parameters_initialized_(true) {} + + template + GenericBiasedValueView( + const GenericBiasedValueView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + , bias_(emboss_reserved_local_other.bias_) +, parameters_initialized_(emboss_reserved_local_other.parameters_initialized_) {} + + template ::type>::type>::value>::type> + explicit GenericBiasedValueView( + ::std::int32_t bias, Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) , bias_(bias) + , parameters_initialized_(true) {} + template + explicit GenericBiasedValueView( + ::std::int32_t bias, Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) , bias_(bias) + , parameters_initialized_(true) {} + + template + GenericBiasedValueView &operator=( + const GenericBiasedValueView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; +if (!parameters_initialized_) return false; + if (!has_raw_value().Known()) return false; + if (has_raw_value().ValueOrDefault() && !raw_value().Ok()) return false; + + + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericBiasedValueView emboss_reserved_local_other) const { + + if (!has_bias().Known()) return false; + if (!emboss_reserved_local_other.has_bias().Known()) return false; + + if (emboss_reserved_local_other.has_bias().ValueOrDefault() && + !has_bias().ValueOrDefault()) + return false; + if (has_bias().ValueOrDefault() && + !emboss_reserved_local_other.has_bias().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_bias().ValueOrDefault() && + has_bias().ValueOrDefault() && + !bias().Equals(emboss_reserved_local_other.bias())) + return false; + + + + if (!has_raw_value().Known()) return false; + if (!emboss_reserved_local_other.has_raw_value().Known()) return false; + + if (emboss_reserved_local_other.has_raw_value().ValueOrDefault() && + !has_raw_value().ValueOrDefault()) + return false; + if (has_raw_value().ValueOrDefault() && + !emboss_reserved_local_other.has_raw_value().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_raw_value().ValueOrDefault() && + has_raw_value().ValueOrDefault() && + !raw_value().Equals(emboss_reserved_local_other.raw_value())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericBiasedValueView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_bias().ValueOr(false) && + !has_bias().ValueOr(false)) + return false; + if (has_bias().ValueOr(false) && + !emboss_reserved_local_other.has_bias().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_bias().ValueOr(false) && + has_bias().ValueOr(false) && + !bias().UncheckedEquals(emboss_reserved_local_other.bias())) + return false; + + + + if (emboss_reserved_local_other.has_raw_value().ValueOr(false) && + !has_raw_value().ValueOr(false)) + return false; + if (has_raw_value().ValueOr(false) && + !emboss_reserved_local_other.has_raw_value().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_raw_value().ValueOr(false) && + has_raw_value().ValueOr(false) && + !raw_value().UncheckedEquals(emboss_reserved_local_other.raw_value())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericBiasedValueView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBiasedValueView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBiasedValueView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "raw_value") { + if (!raw_value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_raw_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + raw_value().IsAggregate() || raw_value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("raw_value: "); + raw_value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !raw_value().IsAggregate() && !raw_value().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("# raw_value: UNREADABLE\n"); + } + } + + if (has_value().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# value: "); + value().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("# value: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + constexpr ::emboss::support::MaybeConstantView + bias() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + bias_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_bias() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + raw_value() const; + ::emboss::support::Maybe has_raw_value() const; + + public: + class EmbossReservedVirtualValueView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualValueView( + const GenericBiasedValueView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualValueView() = delete; + EmbossReservedVirtualValueView(const EmbossReservedVirtualValueView &) = default; + EmbossReservedVirtualValueView(EmbossReservedVirtualValueView &&) = default; + EmbossReservedVirtualValueView &operator=(const EmbossReservedVirtualValueView &) = + default; + EmbossReservedVirtualValueView &operator=(EmbossReservedVirtualValueView &&) = + default; + ~EmbossReservedVirtualValueView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_value().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.raw_value(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.bias(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericBiasedValueView view_; + }; + EmbossReservedVirtualValueView value() const; + ::emboss::support::Maybe has_value() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + ::std::int32_t bias_; + bool parameters_initialized_ = false; + + template + friend class GenericBiasedValueView; +}; +using BiasedValueView = + GenericBiasedValueView; +using BiasedValueWriter = + GenericBiasedValueView; + +template +struct EmbossReservedInternalIsGenericBiasedValueView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBiasedValueView< + GenericBiasedValueView> { + static constexpr const bool value = true; +}; + +template +inline GenericBiasedValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBiasedValueView(::std::int32_t bias, T &&emboss_reserved_local_arg) { + return GenericBiasedValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(bias), ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBiasedValueView> +MakeBiasedValueView(::std::int32_t bias, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBiasedValueView>( + ::std::forward(bias), emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBiasedValueView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBiasedValueView( + ::std::int32_t bias, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBiasedValueView< + /**/ ::emboss::support::ContiguousBuffer>( + ::std::forward(bias), emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace VirtualFirstFieldWithParam { + +} // namespace VirtualFirstFieldWithParam + + +template +struct EmbossReservedInternalIsGenericVirtualFirstFieldWithParamView; + +template +class GenericVirtualFirstFieldWithParamView final { + public: + GenericVirtualFirstFieldWithParamView() : backing_() {} + explicit GenericVirtualFirstFieldWithParamView( + ::std::int32_t param, Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) , param_(param) + , parameters_initialized_(true) {} + + template + GenericVirtualFirstFieldWithParamView( + const GenericVirtualFirstFieldWithParamView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + , param_(emboss_reserved_local_other.param_) +, parameters_initialized_(emboss_reserved_local_other.parameters_initialized_) {} + + template ::type>::type>::value>::type> + explicit GenericVirtualFirstFieldWithParamView( + ::std::int32_t param, Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) , param_(param) + , parameters_initialized_(true) {} + template + explicit GenericVirtualFirstFieldWithParamView( + ::std::int32_t param, Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) , param_(param) + , parameters_initialized_(true) {} + + template + GenericVirtualFirstFieldWithParamView &operator=( + const GenericVirtualFirstFieldWithParamView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; +if (!parameters_initialized_) return false; + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + + if (!has_param().Known()) return false; + if (!emboss_reserved_local_other.has_param().Known()) return false; + + if (emboss_reserved_local_other.has_param().ValueOrDefault() && + !has_param().ValueOrDefault()) + return false; + if (has_param().ValueOrDefault() && + !emboss_reserved_local_other.has_param().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_param().ValueOrDefault() && + has_param().ValueOrDefault() && + !param().Equals(emboss_reserved_local_other.param())) + return false; + + + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_param().ValueOr(false) && + !has_param().ValueOr(false)) + return false; + if (has_param().ValueOr(false) && + !emboss_reserved_local_other.has_param().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_param().ValueOr(false) && + has_param().ValueOr(false) && + !param().UncheckedEquals(emboss_reserved_local_other.param())) + return false; + + + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "value") { + if (!value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value: "); + value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value().IsAggregate() && !value().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("# value: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + constexpr ::emboss::support::MaybeConstantView + param() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + param_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_param() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + auto value() const -> decltype(this->x()) { + return has_value().ValueOrDefault() ? x() + : decltype(this->x())(); + } + ::emboss::support::Maybe has_value() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + ::std::int32_t param_; + bool parameters_initialized_ = false; + + template + friend class GenericVirtualFirstFieldWithParamView; +}; +using VirtualFirstFieldWithParamView = + GenericVirtualFirstFieldWithParamView; +using VirtualFirstFieldWithParamWriter = + GenericVirtualFirstFieldWithParamView; + +template +struct EmbossReservedInternalIsGenericVirtualFirstFieldWithParamView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericVirtualFirstFieldWithParamView< + GenericVirtualFirstFieldWithParamView> { + static constexpr const bool value = true; +}; + +template +inline GenericVirtualFirstFieldWithParamView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeVirtualFirstFieldWithParamView(::std::int32_t param, T &&emboss_reserved_local_arg) { + return GenericVirtualFirstFieldWithParamView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(param), ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericVirtualFirstFieldWithParamView> +MakeVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericVirtualFirstFieldWithParamView>( + ::std::forward(param), emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericVirtualFirstFieldWithParamView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedVirtualFirstFieldWithParamView( + ::std::int32_t param, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericVirtualFirstFieldWithParamView< + /**/ ::emboss::support::ContiguousBuffer>( + ::std::forward(param), emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace ConstVirtualFirstFieldWithParam { + +} // namespace ConstVirtualFirstFieldWithParam + + +template +struct EmbossReservedInternalIsGenericConstVirtualFirstFieldWithParamView; + +template +class GenericConstVirtualFirstFieldWithParamView final { + public: + GenericConstVirtualFirstFieldWithParamView() : backing_() {} + explicit GenericConstVirtualFirstFieldWithParamView( + ::std::int32_t param, Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) , param_(param) + , parameters_initialized_(true) {} + + template + GenericConstVirtualFirstFieldWithParamView( + const GenericConstVirtualFirstFieldWithParamView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + , param_(emboss_reserved_local_other.param_) +, parameters_initialized_(emboss_reserved_local_other.parameters_initialized_) {} + + template ::type>::type>::value>::type> + explicit GenericConstVirtualFirstFieldWithParamView( + ::std::int32_t param, Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) , param_(param) + , parameters_initialized_(true) {} + template + explicit GenericConstVirtualFirstFieldWithParamView( + ::std::int32_t param, Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) , param_(param) + , parameters_initialized_(true) {} + + template + GenericConstVirtualFirstFieldWithParamView &operator=( + const GenericConstVirtualFirstFieldWithParamView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; +if (!parameters_initialized_) return false; + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().Ok()) return false; + + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + + if (!has_param().Known()) return false; + if (!emboss_reserved_local_other.has_param().Known()) return false; + + if (emboss_reserved_local_other.has_param().ValueOrDefault() && + !has_param().ValueOrDefault()) + return false; + if (has_param().ValueOrDefault() && + !emboss_reserved_local_other.has_param().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_param().ValueOrDefault() && + has_param().ValueOrDefault() && + !param().Equals(emboss_reserved_local_other.param())) + return false; + + + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_param().ValueOr(false) && + !has_param().ValueOr(false)) + return false; + if (has_param().ValueOr(false) && + !emboss_reserved_local_other.has_param().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_param().ValueOr(false) && + has_param().ValueOr(false) && + !param().UncheckedEquals(emboss_reserved_local_other.param())) + return false; + + + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericConstVirtualFirstFieldWithParamView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_value().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# value: "); + value().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("# value: UNREADABLE\n"); + } + } + + if (has_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + constexpr ::emboss::support::MaybeConstantView + param() const { + return parameters_initialized_ + ? ::emboss::support::MaybeConstantView( + param_) + : ::emboss::support::MaybeConstantView(); + } + constexpr ::emboss::support::Maybe has_param() const { + return ::emboss::support::Maybe(parameters_initialized_); + } + + public: + class EmbossReservedVirtualValueView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualValueView() {} + EmbossReservedVirtualValueView(const EmbossReservedVirtualValueView &) = default; + EmbossReservedVirtualValueView(EmbossReservedVirtualValueView &&) = default; + EmbossReservedVirtualValueView &operator=(const EmbossReservedVirtualValueView &) = + default; + EmbossReservedVirtualValueView &operator=(EmbossReservedVirtualValueView &&) = + default; + ~EmbossReservedVirtualValueView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualValueView value() { + return EmbossReservedVirtualValueView(); + } + static constexpr ::emboss::support::Maybe has_value() { + return ::emboss::support::Maybe(true); + } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + x() const; + ::emboss::support::Maybe has_x() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + ::std::int32_t param_; + bool parameters_initialized_ = false; + + template + friend class GenericConstVirtualFirstFieldWithParamView; +}; +using ConstVirtualFirstFieldWithParamView = + GenericConstVirtualFirstFieldWithParamView; +using ConstVirtualFirstFieldWithParamWriter = + GenericConstVirtualFirstFieldWithParamView; + +template +struct EmbossReservedInternalIsGenericConstVirtualFirstFieldWithParamView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericConstVirtualFirstFieldWithParamView< + GenericConstVirtualFirstFieldWithParamView> { + static constexpr const bool value = true; +}; + +template +inline GenericConstVirtualFirstFieldWithParamView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeConstVirtualFirstFieldWithParamView(::std::int32_t param, T &&emboss_reserved_local_arg) { + return GenericConstVirtualFirstFieldWithParamView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(param), ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericConstVirtualFirstFieldWithParamView> +MakeConstVirtualFirstFieldWithParamView(::std::int32_t param, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConstVirtualFirstFieldWithParamView>( + ::std::forward(param), emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericConstVirtualFirstFieldWithParamView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedConstVirtualFirstFieldWithParamView( + ::std::int32_t param, T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericConstVirtualFirstFieldWithParamView< + /**/ ::emboss::support::ContiguousBuffer>( + ::std::forward(param), emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace SizedArrayOfBiasedValues { + +} // namespace SizedArrayOfBiasedValues + + +template +struct EmbossReservedInternalIsGenericSizedArrayOfBiasedValuesView; + +template +class GenericSizedArrayOfBiasedValuesView final { + public: + GenericSizedArrayOfBiasedValuesView() : backing_() {} + explicit GenericSizedArrayOfBiasedValuesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericSizedArrayOfBiasedValuesView( + const GenericSizedArrayOfBiasedValuesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericSizedArrayOfBiasedValuesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericSizedArrayOfBiasedValuesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericSizedArrayOfBiasedValuesView &operator=( + const GenericSizedArrayOfBiasedValuesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_element_count().Known()) return false; + if (has_element_count().ValueOrDefault() && !element_count().Ok()) return false; + + + if (!has_bias().Known()) return false; + if (has_bias().ValueOrDefault() && !bias().Ok()) return false; + + + if (!has_values().Known()) return false; + if (has_values().ValueOrDefault() && !values().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { + + if (!has_element_count().Known()) return false; + if (!emboss_reserved_local_other.has_element_count().Known()) return false; + + if (emboss_reserved_local_other.has_element_count().ValueOrDefault() && + !has_element_count().ValueOrDefault()) + return false; + if (has_element_count().ValueOrDefault() && + !emboss_reserved_local_other.has_element_count().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_element_count().ValueOrDefault() && + has_element_count().ValueOrDefault() && + !element_count().Equals(emboss_reserved_local_other.element_count())) + return false; + + + + if (!has_bias().Known()) return false; + if (!emboss_reserved_local_other.has_bias().Known()) return false; + + if (emboss_reserved_local_other.has_bias().ValueOrDefault() && + !has_bias().ValueOrDefault()) + return false; + if (has_bias().ValueOrDefault() && + !emboss_reserved_local_other.has_bias().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_bias().ValueOrDefault() && + has_bias().ValueOrDefault() && + !bias().Equals(emboss_reserved_local_other.bias())) + return false; + + + + if (!has_values().Known()) return false; + if (!emboss_reserved_local_other.has_values().Known()) return false; + + if (emboss_reserved_local_other.has_values().ValueOrDefault() && + !has_values().ValueOrDefault()) + return false; + if (has_values().ValueOrDefault() && + !emboss_reserved_local_other.has_values().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_values().ValueOrDefault() && + has_values().ValueOrDefault() && + !values().Equals(emboss_reserved_local_other.values())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_element_count().ValueOr(false) && + !has_element_count().ValueOr(false)) + return false; + if (has_element_count().ValueOr(false) && + !emboss_reserved_local_other.has_element_count().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_element_count().ValueOr(false) && + has_element_count().ValueOr(false) && + !element_count().UncheckedEquals(emboss_reserved_local_other.element_count())) + return false; + + + + if (emboss_reserved_local_other.has_bias().ValueOr(false) && + !has_bias().ValueOr(false)) + return false; + if (has_bias().ValueOr(false) && + !emboss_reserved_local_other.has_bias().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_bias().ValueOr(false) && + has_bias().ValueOr(false) && + !bias().UncheckedEquals(emboss_reserved_local_other.bias())) + return false; + + + + if (emboss_reserved_local_other.has_values().ValueOr(false) && + !has_values().ValueOr(false)) + return false; + if (has_values().ValueOr(false) && + !emboss_reserved_local_other.has_values().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_values().ValueOr(false) && + has_values().ValueOr(false) && + !values().UncheckedEquals(emboss_reserved_local_other.values())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericSizedArrayOfBiasedValuesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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_count") { + if (!element_count().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "bias") { + if (!bias().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "values") { + if (!values().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_count().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + element_count().IsAggregate() || element_count().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("element_count: "); + element_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !element_count().IsAggregate() && !element_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("# element_count: UNREADABLE\n"); + } + } + + if (has_bias().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + bias().IsAggregate() || bias().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("bias: "); + bias().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !bias().IsAggregate() && !bias().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("# bias: UNREADABLE\n"); + } + } + + if (has_values().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + values().IsAggregate() || values().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("values: "); + values().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !values().IsAggregate() && !values().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("# values: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + element_count() const; + ::emboss::support::Maybe has_element_count() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + bias() const; + ::emboss::support::Maybe has_bias() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericBiasedValueView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 8 , ::std::int32_t> + + values() const; + ::emboss::support::Maybe has_values() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericSizedArrayOfBiasedValuesView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.element_count(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericSizedArrayOfBiasedValuesView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericSizedArrayOfBiasedValuesView; +}; +using SizedArrayOfBiasedValuesView = + GenericSizedArrayOfBiasedValuesView; +using SizedArrayOfBiasedValuesWriter = + GenericSizedArrayOfBiasedValuesView; + +template +struct EmbossReservedInternalIsGenericSizedArrayOfBiasedValuesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericSizedArrayOfBiasedValuesView< + GenericSizedArrayOfBiasedValuesView> { + static constexpr const bool value = true; +}; + +template +inline GenericSizedArrayOfBiasedValuesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeSizedArrayOfBiasedValuesView( T &&emboss_reserved_local_arg) { + return GenericSizedArrayOfBiasedValuesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericSizedArrayOfBiasedValuesView> +MakeSizedArrayOfBiasedValuesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizedArrayOfBiasedValuesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericSizedArrayOfBiasedValuesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedSizedArrayOfBiasedValuesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizedArrayOfBiasedValuesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace MultiVersion { + +} // namespace MultiVersion + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::MessageId, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericMultiVersionView::message_id() + const { + + if ( has_message_id().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::MessageId, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::MessageId, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMultiVersionView::has_message_id() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericAxesView> + + GenericMultiVersionView::axes() + const { + const auto emboss_reserved_local_subexpr_1 = product(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(23))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(2LL))); + + if (emboss_reserved_local_subexpr_4.Known() && has_axes().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(12LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericAxesView> + +( + emboss_reserved_local_subexpr_4.ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericAxesView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMultiVersionView::has_axes() const { + return ::emboss::support::Equal((message_id().Ok() ? ::emboss::support::Maybe(static_cast(message_id().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))); +} + + +template +inline typename ::emboss::test::GenericConfigView>, 32>> + + GenericMultiVersionView::config() + const { + + if ( has_config().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericConfigView>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericConfigView>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMultiVersionView::has_config() const { + return ::emboss::support::Equal((message_id().Ok() ? ::emboss::support::Maybe(static_cast(message_id().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); +} + + +template +inline typename ::emboss::test::GenericConfigVXView> + + GenericMultiVersionView::config_vx() + const { + + if ( has_config_vx().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericConfigVXView> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericConfigVXView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericMultiVersionView::has_config_vx() const { + return ::emboss::support::And(::emboss::support::Equal((product().Ok() ? ::emboss::support::Maybe(static_cast(product().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(23))), ::emboss::support::Equal((message_id().Ok() ? ::emboss::support::Maybe(static_cast(message_id().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1)))); +} + + +template +inline typename GenericMultiVersionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericMultiVersionView::IntrinsicSizeInBytes() const { + return + typename GenericMultiVersionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericMultiVersionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace MultiVersion { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(13LL)).ValueOrDefault(); +} +} // namespace MultiVersion + +template +inline constexpr ::std::int32_t +GenericMultiVersionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return MultiVersion::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericMultiVersionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return MultiVersion::MaxSizeInBytes(); +} + +namespace MultiVersion { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace MultiVersion + +template +inline constexpr ::std::int32_t +GenericMultiVersionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return MultiVersion::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericMultiVersionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return MultiVersion::MinSizeInBytes(); +} +namespace Axes { + +} // namespace Axes + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericAxisView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 , ::emboss::test::AxisType> + + GenericAxesView::values() + const { + + if (::emboss::support::Maybe(static_cast(-1)).Known() && has_values().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = axes(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericAxisView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 , ::emboss::test::AxisType> + +( + ::emboss::support::Maybe(static_cast(-1)).ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericAxisView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 4, + 8 , ::emboss::test::AxisType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxesView::has_values() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericAxisView> + + GenericAxesView::x() + const { + + if (::emboss::support::Maybe(static_cast(1)).Known() && has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericAxisView> + +( + ::emboss::support::Maybe(static_cast(1)).ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericAxisView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxesView::has_x() const { + return ::emboss::support::GreaterThan((axes().Ok() ? ::emboss::support::Maybe(static_cast(axes().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename ::emboss::test::GenericAxisView> + + GenericAxesView::y() + const { + + if (::emboss::support::Maybe(static_cast(2)).Known() && has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericAxisView> + +( + ::emboss::support::Maybe(static_cast(2)).ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericAxisView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxesView::has_y() const { + return ::emboss::support::GreaterThan((axes().Ok() ? ::emboss::support::Maybe(static_cast(axes().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1LL))); +} + + +template +inline typename ::emboss::test::GenericAxisView> + + GenericAxesView::z() + const { + + if (::emboss::support::Maybe(static_cast(3)).Known() && has_z().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(8LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericAxisView> + +( + ::emboss::support::Maybe(static_cast(3)).ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 8>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericAxisView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxesView::has_z() const { + return ::emboss::support::GreaterThan((axes().Ok() ? ::emboss::support::Maybe(static_cast(axes().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2LL))); +} + + +template +inline typename GenericAxesView::EmbossReservedVirtualAxisCountPlusOneView +GenericAxesView::axis_count_plus_one() const { + return + typename GenericAxesView::EmbossReservedVirtualAxisCountPlusOneView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAxesView::has_axis_count_plus_one() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericAxesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericAxesView::IntrinsicSizeInBytes() const { + return + typename GenericAxesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAxesView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace Axes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(60LL)).ValueOrDefault(); +} +} // namespace Axes + +template +inline constexpr ::std::int32_t +GenericAxesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Axes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Axes::MaxSizeInBytes(); +} + +namespace Axes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(0LL)).ValueOrDefault(); +} +} // namespace Axes + +template +inline constexpr ::std::int32_t +GenericAxesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Axes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Axes::MinSizeInBytes(); +} +namespace AxisPair { + +} // namespace AxisPair + + +template +inline typename GenericAxisPairView::EmbossReservedVirtualAxisTypeAView +GenericAxisPairView::axis_type_a() const { + return + typename GenericAxisPairView::EmbossReservedVirtualAxisTypeAView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAxisPairView::has_axis_type_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericAxisView> + + GenericAxisPairView::axis_a() + const { + const auto emboss_reserved_local_subexpr_1 = axis_type_a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + if (emboss_reserved_local_subexpr_2.Known() && has_axis_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericAxisView> + +( + emboss_reserved_local_subexpr_2.ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericAxisView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxisPairView::has_axis_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericAxisPairView::EmbossReservedVirtualAxisTypeBView +GenericAxisPairView::axis_type_b() const { + return + typename GenericAxisPairView::EmbossReservedVirtualAxisTypeBView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAxisPairView::has_axis_type_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericAxisView> + + GenericAxisPairView::axis_b() + const { + const auto emboss_reserved_local_subexpr_1 = axis_type_b(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + if (emboss_reserved_local_subexpr_2.Known() && has_axis_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericAxisView> + +( + emboss_reserved_local_subexpr_2.ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericAxisView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxisPairView::has_axis_b() const { + return ::emboss::support::Maybe(true); +} + + +namespace AxisPair { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace AxisPair + +template +inline constexpr ::std::int32_t +GenericAxisPairView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return AxisPair::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxisPairView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return AxisPair::IntrinsicSizeInBytes(); +} + +namespace AxisPair { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace AxisPair + +template +inline constexpr ::std::int32_t +GenericAxisPairView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return AxisPair::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxisPairView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return AxisPair::MaxSizeInBytes(); +} + +namespace AxisPair { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace AxisPair + +template +inline constexpr ::std::int32_t +GenericAxisPairView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return AxisPair::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxisPairView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return AxisPair::MinSizeInBytes(); +} +namespace AxesEnvelope { + +} // namespace AxesEnvelope + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAxesEnvelopeView::axis_count() + const { + + if ( has_axis_count().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxesEnvelopeView::has_axis_count() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericAxesView> + + GenericAxesEnvelopeView::axes() + const { + const auto emboss_reserved_local_subexpr_1 = axis_count(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + if (emboss_reserved_local_subexpr_2.Known() && has_axes().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_3; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericAxesView> + +( + emboss_reserved_local_subexpr_2.ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericAxesView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxesEnvelopeView::has_axes() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericAxesEnvelopeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericAxesEnvelopeView::IntrinsicSizeInBytes() const { + return + typename GenericAxesEnvelopeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAxesEnvelopeView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace AxesEnvelope { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1021LL)).ValueOrDefault(); +} +} // namespace AxesEnvelope + +template +inline constexpr ::std::int32_t +GenericAxesEnvelopeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return AxesEnvelope::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxesEnvelopeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return AxesEnvelope::MaxSizeInBytes(); +} + +namespace AxesEnvelope { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace AxesEnvelope + +template +inline constexpr ::std::int32_t +GenericAxesEnvelopeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return AxesEnvelope::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxesEnvelopeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return AxesEnvelope::MinSizeInBytes(); +} +namespace Axis { + +} // namespace Axis + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericAxisView::value() + const { + + if ( has_value().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxisView::has_value() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericAxisView::EmbossReservedVirtualAxisTypeView +GenericAxisView::axis_type() const { + return + typename GenericAxisView::EmbossReservedVirtualAxisTypeView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericAxisView::has_axis_type() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericAxisView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxisView::has_x() const { + return ::emboss::support::Equal((axis_type().Ok() ? ::emboss::support::Maybe(static_cast(axis_type().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(1))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericAxisView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxisView::has_y() const { + return ::emboss::support::Equal((axis_type().Ok() ? ::emboss::support::Maybe(static_cast(axis_type().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2))); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericAxisView::z() + const { + + if ( has_z().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAxisView::has_z() const { + return ::emboss::support::Equal((axis_type().Ok() ? ::emboss::support::Maybe(static_cast(axis_type().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(3))); +} + + +namespace Axis { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Axis + +template +inline constexpr ::std::int32_t +GenericAxisView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Axis::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxisView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Axis::IntrinsicSizeInBytes(); +} + +namespace Axis { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Axis + +template +inline constexpr ::std::int32_t +GenericAxisView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Axis::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxisView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Axis::MaxSizeInBytes(); +} + +namespace Axis { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Axis + +template +inline constexpr ::std::int32_t +GenericAxisView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Axis::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAxisView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Axis::MinSizeInBytes(); +} +namespace Config { + +} // namespace Config + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericConfigView::power() + const { + + if ( has_power().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(31LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 31>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConfigView::has_power() const { + return ::emboss::support::Maybe(true); +} + + +namespace Config { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace Config + +template +inline constexpr ::std::int32_t +GenericConfigView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return Config::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericConfigView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return Config::IntrinsicSizeInBits(); +} + +namespace Config { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace Config + +template +inline constexpr ::std::int32_t +GenericConfigView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return Config::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericConfigView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return Config::MaxSizeInBits(); +} + +namespace Config { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace Config + +template +inline constexpr ::std::int32_t +GenericConfigView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return Config::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericConfigView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return Config::MinSizeInBits(); +} +namespace ConfigVX { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::power() + const { + + if ( has_power().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(31LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 31>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_power() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +} // namespace ConfigVX + + +template +inline typename ::emboss::test::ConfigVX::GenericEmbossReservedAnonymousField1View>, 32>> + + GenericConfigVXView::emboss_reserved_anonymous_field_1() + const { + + if ( has_emboss_reserved_anonymous_field_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::ConfigVX::GenericEmbossReservedAnonymousField1View>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::ConfigVX::GenericEmbossReservedAnonymousField1View>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConfigVXView::has_emboss_reserved_anonymous_field_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericConfigVXView::has_power() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericConfigVXView::gain() + const { + + if ( has_gain().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConfigVXView::has_gain() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConfigVX { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace ConfigVX + +template +inline constexpr ::std::int32_t +GenericConfigVXView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ConfigVX::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConfigVXView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ConfigVX::IntrinsicSizeInBytes(); +} + +namespace ConfigVX { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace ConfigVX + +template +inline constexpr ::std::int32_t +GenericConfigVXView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConfigVX::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConfigVXView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConfigVX::MaxSizeInBytes(); +} + +namespace ConfigVX { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace ConfigVX + +template +inline constexpr ::std::int32_t +GenericConfigVXView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConfigVX::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConfigVXView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConfigVX::MinSizeInBytes(); +} +namespace StructWithUnusedParameter { + +} // namespace StructWithUnusedParameter + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericStructWithUnusedParameterView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructWithUnusedParameterView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructWithUnusedParameter { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace StructWithUnusedParameter + +template +inline constexpr ::std::int32_t +GenericStructWithUnusedParameterView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructWithUnusedParameter::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithUnusedParameterView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructWithUnusedParameter::IntrinsicSizeInBytes(); +} + +namespace StructWithUnusedParameter { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace StructWithUnusedParameter + +template +inline constexpr ::std::int32_t +GenericStructWithUnusedParameterView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructWithUnusedParameter::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithUnusedParameterView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructWithUnusedParameter::MaxSizeInBytes(); +} + +namespace StructWithUnusedParameter { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace StructWithUnusedParameter + +template +inline constexpr ::std::int32_t +GenericStructWithUnusedParameterView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructWithUnusedParameter::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithUnusedParameterView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructWithUnusedParameter::MinSizeInBytes(); +} +namespace StructContainingStructWithUnusedParameter { + +} // namespace StructContainingStructWithUnusedParameter + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericStructContainingStructWithUnusedParameterView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructContainingStructWithUnusedParameterView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericStructWithUnusedParameterView> + + GenericStructContainingStructWithUnusedParameterView::swup() + const { + const auto emboss_reserved_local_subexpr_1 = x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + if (emboss_reserved_local_subexpr_2.Known() && has_swup().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericStructWithUnusedParameterView> + +( + emboss_reserved_local_subexpr_2.ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericStructWithUnusedParameterView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructContainingStructWithUnusedParameterView::has_swup() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructContainingStructWithUnusedParameter { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace StructContainingStructWithUnusedParameter + +template +inline constexpr ::std::int32_t +GenericStructContainingStructWithUnusedParameterView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructContainingStructWithUnusedParameter::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructContainingStructWithUnusedParameterView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructContainingStructWithUnusedParameter::IntrinsicSizeInBytes(); +} + +namespace StructContainingStructWithUnusedParameter { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace StructContainingStructWithUnusedParameter + +template +inline constexpr ::std::int32_t +GenericStructContainingStructWithUnusedParameterView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructContainingStructWithUnusedParameter::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructContainingStructWithUnusedParameterView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructContainingStructWithUnusedParameter::MaxSizeInBytes(); +} + +namespace StructContainingStructWithUnusedParameter { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace StructContainingStructWithUnusedParameter + +template +inline constexpr ::std::int32_t +GenericStructContainingStructWithUnusedParameterView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructContainingStructWithUnusedParameter::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructContainingStructWithUnusedParameterView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructContainingStructWithUnusedParameter::MinSizeInBytes(); +} +namespace BiasedValue { + +} // namespace BiasedValue + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericBiasedValueView::raw_value() + const { + + if ( has_raw_value().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBiasedValueView::has_raw_value() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericBiasedValueView::EmbossReservedVirtualValueView +GenericBiasedValueView::value() const { + return + typename GenericBiasedValueView::EmbossReservedVirtualValueView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericBiasedValueView::has_value() const { + return ::emboss::support::Maybe(true); +} + + +namespace BiasedValue { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace BiasedValue + +template +inline constexpr ::std::int32_t +GenericBiasedValueView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return BiasedValue::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBiasedValueView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return BiasedValue::IntrinsicSizeInBytes(); +} + +namespace BiasedValue { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace BiasedValue + +template +inline constexpr ::std::int32_t +GenericBiasedValueView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return BiasedValue::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBiasedValueView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return BiasedValue::MaxSizeInBytes(); +} + +namespace BiasedValue { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace BiasedValue + +template +inline constexpr ::std::int32_t +GenericBiasedValueView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return BiasedValue::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBiasedValueView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return BiasedValue::MinSizeInBytes(); +} +namespace VirtualFirstFieldWithParam { + +} // namespace VirtualFirstFieldWithParam + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericVirtualFirstFieldWithParamView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericVirtualFirstFieldWithParamView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericVirtualFirstFieldWithParamView::has_value() const { + return ::emboss::support::Maybe(true); +} + + +namespace VirtualFirstFieldWithParam { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace VirtualFirstFieldWithParam + +template +inline constexpr ::std::int32_t +GenericVirtualFirstFieldWithParamView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return VirtualFirstFieldWithParam::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericVirtualFirstFieldWithParamView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return VirtualFirstFieldWithParam::IntrinsicSizeInBytes(); +} + +namespace VirtualFirstFieldWithParam { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace VirtualFirstFieldWithParam + +template +inline constexpr ::std::int32_t +GenericVirtualFirstFieldWithParamView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return VirtualFirstFieldWithParam::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericVirtualFirstFieldWithParamView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return VirtualFirstFieldWithParam::MaxSizeInBytes(); +} + +namespace VirtualFirstFieldWithParam { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace VirtualFirstFieldWithParam + +template +inline constexpr ::std::int32_t +GenericVirtualFirstFieldWithParamView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return VirtualFirstFieldWithParam::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericVirtualFirstFieldWithParamView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return VirtualFirstFieldWithParam::MinSizeInBytes(); +} +namespace ConstVirtualFirstFieldWithParam { + +} // namespace ConstVirtualFirstFieldWithParam + + +namespace ConstVirtualFirstFieldWithParam { +inline constexpr ::std::int32_t value() { + return ::emboss::support::Maybe(static_cast(10LL)).ValueOrDefault(); +} +} // namespace ConstVirtualFirstFieldWithParam + +template +inline constexpr ::std::int32_t +GenericConstVirtualFirstFieldWithParamView::EmbossReservedVirtualValueView::Read() { + return ConstVirtualFirstFieldWithParam::value(); +} + +template +inline constexpr ::std::int32_t +GenericConstVirtualFirstFieldWithParamView< + Storage>::EmbossReservedVirtualValueView::UncheckedRead() { + return ConstVirtualFirstFieldWithParam::value(); +} + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericConstVirtualFirstFieldWithParamView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericConstVirtualFirstFieldWithParamView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +namespace ConstVirtualFirstFieldWithParam { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ConstVirtualFirstFieldWithParam + +template +inline constexpr ::std::int32_t +GenericConstVirtualFirstFieldWithParamView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ConstVirtualFirstFieldWithParam::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConstVirtualFirstFieldWithParamView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ConstVirtualFirstFieldWithParam::IntrinsicSizeInBytes(); +} + +namespace ConstVirtualFirstFieldWithParam { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ConstVirtualFirstFieldWithParam + +template +inline constexpr ::std::int32_t +GenericConstVirtualFirstFieldWithParamView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ConstVirtualFirstFieldWithParam::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConstVirtualFirstFieldWithParamView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ConstVirtualFirstFieldWithParam::MaxSizeInBytes(); +} + +namespace ConstVirtualFirstFieldWithParam { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ConstVirtualFirstFieldWithParam + +template +inline constexpr ::std::int32_t +GenericConstVirtualFirstFieldWithParamView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ConstVirtualFirstFieldWithParam::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericConstVirtualFirstFieldWithParamView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ConstVirtualFirstFieldWithParam::MinSizeInBytes(); +} +namespace SizedArrayOfBiasedValues { + +} // namespace SizedArrayOfBiasedValues + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericSizedArrayOfBiasedValuesView::element_count() + const { + + if ( has_element_count().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedArrayOfBiasedValuesView::has_element_count() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericSizedArrayOfBiasedValuesView::bias() + const { + + if ( has_bias().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedArrayOfBiasedValuesView::has_bias() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericBiasedValueView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 8 , ::std::int32_t> + + GenericSizedArrayOfBiasedValuesView::values() + const { + const auto emboss_reserved_local_subexpr_1 = bias(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + if (emboss_reserved_local_subexpr_2.Known() && has_values().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_3 = element_count(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_4; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericBiasedValueView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 8 , ::std::int32_t> + +( + emboss_reserved_local_subexpr_2.ValueOrDefault(), backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::GenericBiasedValueView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 8 , ::std::int32_t> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizedArrayOfBiasedValuesView::has_values() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericSizedArrayOfBiasedValuesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericSizedArrayOfBiasedValuesView::IntrinsicSizeInBytes() const { + return + typename GenericSizedArrayOfBiasedValuesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericSizedArrayOfBiasedValuesView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace SizedArrayOfBiasedValues { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(257LL)).ValueOrDefault(); +} +} // namespace SizedArrayOfBiasedValues + +template +inline constexpr ::std::int32_t +GenericSizedArrayOfBiasedValuesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return SizedArrayOfBiasedValues::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSizedArrayOfBiasedValuesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return SizedArrayOfBiasedValues::MaxSizeInBytes(); +} + +namespace SizedArrayOfBiasedValues { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace SizedArrayOfBiasedValues + +template +inline constexpr ::std::int32_t +GenericSizedArrayOfBiasedValuesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return SizedArrayOfBiasedValues::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSizedArrayOfBiasedValuesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return SizedArrayOfBiasedValues::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_PARAMETERS_EMB_H_ + diff --git a/testdata/golden_cpp/requires.emb.h b/testdata/golden_cpp/requires.emb.h new file mode 100644 index 00000000..500813b3 --- /dev/null +++ b/testdata/golden_cpp/requires.emb.h @@ -0,0 +1,7045 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_REQUIRES_EMB_H_ +#define TESTDATA_REQUIRES_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace RequiresIntegers { + +} // namespace RequiresIntegers + + +template +class GenericRequiresIntegersView; + +namespace RequiresBools { +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +class GenericEmbossReservedAnonymousField2View; + + +} // namespace RequiresBools + + +template +class GenericRequiresBoolsView; + +namespace RequiresEnums { +enum class Enum : ::std::uint64_t; + + +} // namespace RequiresEnums + + +template +class GenericRequiresEnumsView; + +namespace RequiresWithOptionalFields { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +class GenericEmbossReservedAnonymousField1View; + + +} // namespace RequiresWithOptionalFields + + +template +class GenericRequiresWithOptionalFieldsView; + +namespace RequiresInArrayElements { +namespace Element { + +} // namespace Element + + +template +class GenericElementView; + + +} // namespace RequiresInArrayElements + + +template +class GenericRequiresInArrayElementsView; + + +namespace RequiresIntegers { +struct EmbossReservedValidatorForZeroThroughNine { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(9LL))))).ValueOrDefault(); + } +}; + + +} // namespace RequiresIntegers + + + +namespace RequiresIntegers { +struct EmbossReservedValidatorForTenThroughTwenty { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(20LL))))).ValueOrDefault(); + } +}; + + +} // namespace RequiresIntegers + + + +namespace RequiresIntegers { +struct EmbossReservedValidatorForDisjoint { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::Or(::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL)))), ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(15LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(20LL)))))).ValueOrDefault(); + } +}; + + +} // namespace RequiresIntegers + + + + + + + + +namespace RequiresIntegers { + +} // namespace RequiresIntegers + + +template +struct EmbossReservedInternalIsGenericRequiresIntegersView; + +template +class GenericRequiresIntegersView final { + public: + GenericRequiresIntegersView() : backing_() {} + explicit GenericRequiresIntegersView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRequiresIntegersView( + const GenericRequiresIntegersView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRequiresIntegersView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRequiresIntegersView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRequiresIntegersView &operator=( + const GenericRequiresIntegersView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_zero_through_nine().Known()) return false; + if (has_zero_through_nine().ValueOrDefault() && !zero_through_nine().Ok()) return false; + + + if (!has_ten_through_twenty().Known()) return false; + if (has_ten_through_twenty().ValueOrDefault() && !ten_through_twenty().Ok()) return false; + + + if (!has_disjoint().Known()) return false; + if (has_disjoint().ValueOrDefault() && !disjoint().Ok()) return false; + + + if (!has_ztn_plus_ttt().Known()) return false; + if (has_ztn_plus_ttt().ValueOrDefault() && !ztn_plus_ttt().Ok()) return false; + + + if (!has_alias_of_zero_through_nine().Known()) return false; + if (has_alias_of_zero_through_nine().ValueOrDefault() && !alias_of_zero_through_nine().Ok()) return false; + + + if (!has_zero_through_nine_plus_five().Known()) return false; + if (has_zero_through_nine_plus_five().ValueOrDefault() && !zero_through_nine_plus_five().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 (!(::emboss::support::LessThanOrEqual((zero_through_nine().Ok() ? ::emboss::support::Maybe(static_cast(zero_through_nine().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Difference((ten_through_twenty().Ok() ? ::emboss::support::Maybe(static_cast(ten_through_twenty().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))))).ValueOr(false)) + return false; + return true; + } + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { + return backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericRequiresIntegersView emboss_reserved_local_other) const { + + if (!has_zero_through_nine().Known()) return false; + if (!emboss_reserved_local_other.has_zero_through_nine().Known()) return false; + + if (emboss_reserved_local_other.has_zero_through_nine().ValueOrDefault() && + !has_zero_through_nine().ValueOrDefault()) + return false; + if (has_zero_through_nine().ValueOrDefault() && + !emboss_reserved_local_other.has_zero_through_nine().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_zero_through_nine().ValueOrDefault() && + has_zero_through_nine().ValueOrDefault() && + !zero_through_nine().Equals(emboss_reserved_local_other.zero_through_nine())) + return false; + + + + if (!has_ten_through_twenty().Known()) return false; + if (!emboss_reserved_local_other.has_ten_through_twenty().Known()) return false; + + if (emboss_reserved_local_other.has_ten_through_twenty().ValueOrDefault() && + !has_ten_through_twenty().ValueOrDefault()) + return false; + if (has_ten_through_twenty().ValueOrDefault() && + !emboss_reserved_local_other.has_ten_through_twenty().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_ten_through_twenty().ValueOrDefault() && + has_ten_through_twenty().ValueOrDefault() && + !ten_through_twenty().Equals(emboss_reserved_local_other.ten_through_twenty())) + return false; + + + + if (!has_disjoint().Known()) return false; + if (!emboss_reserved_local_other.has_disjoint().Known()) return false; + + if (emboss_reserved_local_other.has_disjoint().ValueOrDefault() && + !has_disjoint().ValueOrDefault()) + return false; + if (has_disjoint().ValueOrDefault() && + !emboss_reserved_local_other.has_disjoint().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_disjoint().ValueOrDefault() && + has_disjoint().ValueOrDefault() && + !disjoint().Equals(emboss_reserved_local_other.disjoint())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericRequiresIntegersView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_zero_through_nine().ValueOr(false) && + !has_zero_through_nine().ValueOr(false)) + return false; + if (has_zero_through_nine().ValueOr(false) && + !emboss_reserved_local_other.has_zero_through_nine().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_zero_through_nine().ValueOr(false) && + has_zero_through_nine().ValueOr(false) && + !zero_through_nine().UncheckedEquals(emboss_reserved_local_other.zero_through_nine())) + return false; + + + + if (emboss_reserved_local_other.has_ten_through_twenty().ValueOr(false) && + !has_ten_through_twenty().ValueOr(false)) + return false; + if (has_ten_through_twenty().ValueOr(false) && + !emboss_reserved_local_other.has_ten_through_twenty().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_ten_through_twenty().ValueOr(false) && + has_ten_through_twenty().ValueOr(false) && + !ten_through_twenty().UncheckedEquals(emboss_reserved_local_other.ten_through_twenty())) + return false; + + + + if (emboss_reserved_local_other.has_disjoint().ValueOr(false) && + !has_disjoint().ValueOr(false)) + return false; + if (has_disjoint().ValueOr(false) && + !emboss_reserved_local_other.has_disjoint().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_disjoint().ValueOr(false) && + has_disjoint().ValueOr(false) && + !disjoint().UncheckedEquals(emboss_reserved_local_other.disjoint())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericRequiresIntegersView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericRequiresIntegersView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericRequiresIntegersView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "zero_through_nine") { + if (!zero_through_nine().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "ten_through_twenty") { + if (!ten_through_twenty().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "disjoint") { + if (!disjoint().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "alias_of_zero_through_nine") { + if (!alias_of_zero_through_nine().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "zero_through_nine_plus_five") { + if (!zero_through_nine_plus_five().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_zero_through_nine().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + zero_through_nine().IsAggregate() || zero_through_nine().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("zero_through_nine: "); + zero_through_nine().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !zero_through_nine().IsAggregate() && !zero_through_nine().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("# zero_through_nine: UNREADABLE\n"); + } + } + + if (has_ten_through_twenty().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten_through_twenty().IsAggregate() || ten_through_twenty().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("ten_through_twenty: "); + ten_through_twenty().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !ten_through_twenty().IsAggregate() && !ten_through_twenty().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("# ten_through_twenty: UNREADABLE\n"); + } + } + + if (has_disjoint().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + disjoint().IsAggregate() || disjoint().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("disjoint: "); + disjoint().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !disjoint().IsAggregate() && !disjoint().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("# disjoint: UNREADABLE\n"); + } + } + + if (has_ztn_plus_ttt().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ztn_plus_ttt().IsAggregate() || ztn_plus_ttt().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# ztn_plus_ttt: "); + ztn_plus_ttt().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("# ztn_plus_ttt: UNREADABLE\n"); + } + } + + if (has_alias_of_zero_through_nine().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_zero_through_nine().IsAggregate() || alias_of_zero_through_nine().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("alias_of_zero_through_nine: "); + alias_of_zero_through_nine().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !alias_of_zero_through_nine().IsAggregate() && !alias_of_zero_through_nine().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("# alias_of_zero_through_nine: UNREADABLE\n"); + } + } + + if (has_zero_through_nine_plus_five().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + zero_through_nine_plus_five().IsAggregate() || zero_through_nine_plus_five().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("zero_through_nine_plus_five: "); + zero_through_nine_plus_five().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !zero_through_nine_plus_five().IsAggregate() && !zero_through_nine_plus_five().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("# zero_through_nine_plus_five: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForZeroThroughNine>, + typename ::emboss::support::BitBlock>, 8>> + + zero_through_nine() const; + ::emboss::support::Maybe has_zero_through_nine() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForTenThroughTwenty>, + typename ::emboss::support::BitBlock>, 8>> + + ten_through_twenty() const; + ::emboss::support::Maybe has_ten_through_twenty() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForDisjoint>, + typename ::emboss::support::BitBlock>, 8>> + + disjoint() const; + ::emboss::support::Maybe has_disjoint() const; + + public: + class EmbossReservedVirtualZtnPlusTttView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualZtnPlusTttView( + const GenericRequiresIntegersView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualZtnPlusTttView() = delete; + EmbossReservedVirtualZtnPlusTttView(const EmbossReservedVirtualZtnPlusTttView &) = default; + EmbossReservedVirtualZtnPlusTttView(EmbossReservedVirtualZtnPlusTttView &&) = default; + EmbossReservedVirtualZtnPlusTttView &operator=(const EmbossReservedVirtualZtnPlusTttView &) = + default; + EmbossReservedVirtualZtnPlusTttView &operator=(EmbossReservedVirtualZtnPlusTttView &&) = + default; + ~EmbossReservedVirtualZtnPlusTttView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_ztn_plus_ttt().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.ten_through_twenty(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(19LL)))).ValueOr(false); + } + + const GenericRequiresIntegersView view_; + }; + EmbossReservedVirtualZtnPlusTttView ztn_plus_ttt() const; + ::emboss::support::Maybe has_ztn_plus_ttt() const; + + public: + class EmbossReservedVirtualAliasOfZeroThroughNineView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualAliasOfZeroThroughNineView( + const GenericRequiresIntegersView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualAliasOfZeroThroughNineView() = delete; + EmbossReservedVirtualAliasOfZeroThroughNineView(const EmbossReservedVirtualAliasOfZeroThroughNineView &) = default; + EmbossReservedVirtualAliasOfZeroThroughNineView(EmbossReservedVirtualAliasOfZeroThroughNineView &&) = default; + EmbossReservedVirtualAliasOfZeroThroughNineView &operator=(const EmbossReservedVirtualAliasOfZeroThroughNineView &) = + default; + EmbossReservedVirtualAliasOfZeroThroughNineView &operator=(EmbossReservedVirtualAliasOfZeroThroughNineView &&) = + default; + ~EmbossReservedVirtualAliasOfZeroThroughNineView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_alias_of_zero_through_nine().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()); + } + template + 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; } + + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.zero_through_nine().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int32_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { + view_.zero_through_nine().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); + } + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.zero_through_nine().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + return emboss_reserved_local_subexpr_2; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(7LL)))).ValueOr(false); + } + + const GenericRequiresIntegersView view_; + }; + EmbossReservedVirtualAliasOfZeroThroughNineView alias_of_zero_through_nine() const; + ::emboss::support::Maybe has_alias_of_zero_through_nine() const; + + public: + class EmbossReservedVirtualZeroThroughNinePlusFiveView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualZeroThroughNinePlusFiveView( + const GenericRequiresIntegersView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualZeroThroughNinePlusFiveView() = delete; + EmbossReservedVirtualZeroThroughNinePlusFiveView(const EmbossReservedVirtualZeroThroughNinePlusFiveView &) = default; + EmbossReservedVirtualZeroThroughNinePlusFiveView(EmbossReservedVirtualZeroThroughNinePlusFiveView &&) = default; + EmbossReservedVirtualZeroThroughNinePlusFiveView &operator=(const EmbossReservedVirtualZeroThroughNinePlusFiveView &) = + default; + EmbossReservedVirtualZeroThroughNinePlusFiveView &operator=(EmbossReservedVirtualZeroThroughNinePlusFiveView &&) = + default; + ~EmbossReservedVirtualZeroThroughNinePlusFiveView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_zero_through_nine_plus_five().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()); + } + template + 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; } + + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.zero_through_nine().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int32_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { + view_.zero_through_nine().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL)))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(5LL))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.zero_through_nine().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.zero_through_nine(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(5LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(5LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOr(false); + } + + const GenericRequiresIntegersView view_; + }; + EmbossReservedVirtualZeroThroughNinePlusFiveView zero_through_nine_plus_five() const; + ::emboss::support::Maybe has_zero_through_nine_plus_five() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRequiresIntegersView; +}; +using RequiresIntegersView = + GenericRequiresIntegersView; +using RequiresIntegersWriter = + GenericRequiresIntegersView; + +template +struct EmbossReservedInternalIsGenericRequiresIntegersView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRequiresIntegersView< + GenericRequiresIntegersView> { + static constexpr const bool value = true; +}; + +template +inline GenericRequiresIntegersView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRequiresIntegersView( T &&emboss_reserved_local_arg) { + return GenericRequiresIntegersView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRequiresIntegersView> +MakeRequiresIntegersView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresIntegersView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRequiresIntegersView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRequiresIntegersView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresIntegersView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + + +namespace RequiresBools { + + +namespace EmbossReservedAnonymousField2 { +struct EmbossReservedValidatorForMustBeTrue { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault(); + } +}; + + +} // namespace EmbossReservedAnonymousField2 + + + +namespace EmbossReservedAnonymousField2 { +struct EmbossReservedValidatorForMustBeFalse { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(false))).ValueOrDefault(); + } +}; + + +} // namespace EmbossReservedAnonymousField2 + + + + + +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View; + +template +class GenericEmbossReservedAnonymousField2View final { + public: + GenericEmbossReservedAnonymousField2View() : backing_() {} + explicit GenericEmbossReservedAnonymousField2View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField2View( + const GenericEmbossReservedAnonymousField2View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField2View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField2View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField2View &operator=( + const GenericEmbossReservedAnonymousField2View &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_must_be_true().Known()) return false; + if (has_must_be_true().ValueOrDefault() && !must_be_true().Ok()) return false; + + + if (!has_must_be_false().Known()) return false; + if (has_must_be_false().ValueOrDefault() && !must_be_false().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField2View 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_must_be_true().Known()) return false; + if (!emboss_reserved_local_other.has_must_be_true().Known()) return false; + + if (emboss_reserved_local_other.has_must_be_true().ValueOrDefault() && + !has_must_be_true().ValueOrDefault()) + return false; + if (has_must_be_true().ValueOrDefault() && + !emboss_reserved_local_other.has_must_be_true().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_must_be_true().ValueOrDefault() && + has_must_be_true().ValueOrDefault() && + !must_be_true().Equals(emboss_reserved_local_other.must_be_true())) + return false; + + + + if (!has_must_be_false().Known()) return false; + if (!emboss_reserved_local_other.has_must_be_false().Known()) return false; + + if (emboss_reserved_local_other.has_must_be_false().ValueOrDefault() && + !has_must_be_false().ValueOrDefault()) + return false; + if (has_must_be_false().ValueOrDefault() && + !emboss_reserved_local_other.has_must_be_false().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_must_be_false().ValueOrDefault() && + has_must_be_false().ValueOrDefault() && + !must_be_false().Equals(emboss_reserved_local_other.must_be_false())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField2View 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_must_be_true().ValueOr(false) && + !has_must_be_true().ValueOr(false)) + return false; + if (has_must_be_true().ValueOr(false) && + !emboss_reserved_local_other.has_must_be_true().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_must_be_true().ValueOr(false) && + has_must_be_true().ValueOr(false) && + !must_be_true().UncheckedEquals(emboss_reserved_local_other.must_be_true())) + return false; + + + + if (emboss_reserved_local_other.has_must_be_false().ValueOr(false) && + !has_must_be_false().ValueOr(false)) + return false; + if (has_must_be_false().ValueOr(false) && + !emboss_reserved_local_other.has_must_be_false().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_must_be_false().ValueOr(false) && + has_must_be_false().ValueOr(false) && + !must_be_false().UncheckedEquals(emboss_reserved_local_other.must_be_false())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField2View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "must_be_true") { + if (!must_be_true().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "must_be_false") { + if (!must_be_false().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_must_be_true().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + must_be_true().IsAggregate() || must_be_true().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("must_be_true: "); + must_be_true().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !must_be_true().IsAggregate() && !must_be_true().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("# must_be_true: UNREADABLE\n"); + } + } + + if (has_must_be_false().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + must_be_false().IsAggregate() || must_be_false().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("must_be_false: "); + must_be_false().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !must_be_false().IsAggregate() && !must_be_false().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("# must_be_false: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeTrue>, + typename Storage::template OffsetStorageType> + + must_be_true() const; + ::emboss::support::Maybe has_must_be_true() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeFalse>, + typename Storage::template OffsetStorageType> + + must_be_false() const; + ::emboss::support::Maybe has_must_be_false() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField2View; +}; +using EmbossReservedAnonymousField2View = + GenericEmbossReservedAnonymousField2View; +using EmbossReservedAnonymousField2Writer = + GenericEmbossReservedAnonymousField2View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField2View< + GenericEmbossReservedAnonymousField2View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField2View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField2View> +MakeEmbossReservedAnonymousField2View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField2View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField2View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField2View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace RequiresBools + + +template +struct EmbossReservedInternalIsGenericRequiresBoolsView; + +template +class GenericRequiresBoolsView final { + public: + GenericRequiresBoolsView() : backing_() {} + explicit GenericRequiresBoolsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRequiresBoolsView( + const GenericRequiresBoolsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRequiresBoolsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRequiresBoolsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRequiresBoolsView &operator=( + const GenericRequiresBoolsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_emboss_reserved_anonymous_field_2().Known()) return false; + if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && !emboss_reserved_anonymous_field_2().Ok()) 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_must_be_true().Known()) return false; + if (has_must_be_true().ValueOrDefault() && !must_be_true().Ok()) return false; + + + if (!has_must_be_false().Known()) return false; + if (has_must_be_false().ValueOrDefault() && !must_be_false().Ok()) return false; + + + if (!has_b_must_be_false().Known()) return false; + if (has_b_must_be_false().ValueOrDefault() && !b_must_be_false().Ok()) return false; + + + if (!has_alias_of_a_must_be_true().Known()) return false; + if (has_alias_of_a_must_be_true().ValueOrDefault() && !alias_of_a_must_be_true().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 (!(::emboss::support::Or((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), (b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()))).ValueOr(false)) + return false; + return true; + } + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { + return backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericRequiresBoolsView emboss_reserved_local_other) const { + + if (!has_emboss_reserved_anonymous_field_2().Known()) return false; + if (!emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().Known()) return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !has_emboss_reserved_anonymous_field_2().ValueOrDefault()) + return false; + if (has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + has_emboss_reserved_anonymous_field_2().ValueOrDefault() && + !emboss_reserved_anonymous_field_2().Equals(emboss_reserved_local_other.emboss_reserved_anonymous_field_2())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericRequiresBoolsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !has_emboss_reserved_anonymous_field_2().ValueOr(false)) + return false; + if (has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_emboss_reserved_anonymous_field_2().ValueOr(false) && + has_emboss_reserved_anonymous_field_2().ValueOr(false) && + !emboss_reserved_anonymous_field_2().UncheckedEquals(emboss_reserved_local_other.emboss_reserved_anonymous_field_2())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericRequiresBoolsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericRequiresBoolsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericRequiresBoolsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "must_be_true") { + if (!must_be_true().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "must_be_false") { + if (!must_be_false().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "alias_of_a_must_be_true") { + if (!alias_of_a_must_be_true().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_must_be_true().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + must_be_true().IsAggregate() || must_be_true().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("must_be_true: "); + must_be_true().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !must_be_true().IsAggregate() && !must_be_true().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("# must_be_true: UNREADABLE\n"); + } + } + + if (has_must_be_false().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + must_be_false().IsAggregate() || must_be_false().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("must_be_false: "); + must_be_false().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !must_be_false().IsAggregate() && !must_be_false().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("# must_be_false: UNREADABLE\n"); + } + } + + if (has_b_must_be_false().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b_must_be_false().IsAggregate() || b_must_be_false().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# b_must_be_false: "); + b_must_be_false().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("# b_must_be_false: UNREADABLE\n"); + } + } + + if (has_alias_of_a_must_be_true().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_a_must_be_true().IsAggregate() || alias_of_a_must_be_true().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("alias_of_a_must_be_true: "); + alias_of_a_must_be_true().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !alias_of_a_must_be_true().IsAggregate() && !alias_of_a_must_be_true().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("# alias_of_a_must_be_true: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + typename ::emboss::test::RequiresBools::GenericEmbossReservedAnonymousField2View>, 8>> + + emboss_reserved_anonymous_field_2() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_2() const; + + public: + auto a() const -> decltype(this->emboss_reserved_anonymous_field_2().a()) { + return has_a().ValueOrDefault() ? emboss_reserved_anonymous_field_2().a() + : decltype(this->emboss_reserved_anonymous_field_2().a())(); + } + ::emboss::support::Maybe has_a() const; + + public: + auto b() const -> decltype(this->emboss_reserved_anonymous_field_2().b()) { + return has_b().ValueOrDefault() ? emboss_reserved_anonymous_field_2().b() + : decltype(this->emboss_reserved_anonymous_field_2().b())(); + } + ::emboss::support::Maybe has_b() const; + + public: + auto must_be_true() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_true()) { + return has_must_be_true().ValueOrDefault() ? emboss_reserved_anonymous_field_2().must_be_true() + : decltype(this->emboss_reserved_anonymous_field_2().must_be_true())(); + } + ::emboss::support::Maybe has_must_be_true() const; + + public: + auto must_be_false() const -> decltype(this->emboss_reserved_anonymous_field_2().must_be_false()) { + return has_must_be_false().ValueOrDefault() ? emboss_reserved_anonymous_field_2().must_be_false() + : decltype(this->emboss_reserved_anonymous_field_2().must_be_false())(); + } + ::emboss::support::Maybe has_must_be_false() const; + + public: + class EmbossReservedVirtualBMustBeFalseView final { + public: + using ValueType = bool; + + explicit EmbossReservedVirtualBMustBeFalseView( + const GenericRequiresBoolsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualBMustBeFalseView() = delete; + EmbossReservedVirtualBMustBeFalseView(const EmbossReservedVirtualBMustBeFalseView &) = default; + EmbossReservedVirtualBMustBeFalseView(EmbossReservedVirtualBMustBeFalseView &&) = default; + EmbossReservedVirtualBMustBeFalseView &operator=(const EmbossReservedVirtualBMustBeFalseView &) = + default; + EmbossReservedVirtualBMustBeFalseView &operator=(EmbossReservedVirtualBMustBeFalseView &&) = + default; + ~EmbossReservedVirtualBMustBeFalseView() = default; + + bool Read() const { + EMBOSS_CHECK(view_.has_b_must_be_false().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.b(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(false)); + + 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(emboss_reserved_local_value).ValueOr(false); + } + + const GenericRequiresBoolsView view_; + }; + EmbossReservedVirtualBMustBeFalseView b_must_be_false() const; + ::emboss::support::Maybe has_b_must_be_false() const; + + public: + class EmbossReservedVirtualAliasOfAMustBeTrueView final { + public: + using ValueType = bool; + + explicit EmbossReservedVirtualAliasOfAMustBeTrueView( + const GenericRequiresBoolsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualAliasOfAMustBeTrueView() = delete; + EmbossReservedVirtualAliasOfAMustBeTrueView(const EmbossReservedVirtualAliasOfAMustBeTrueView &) = default; + EmbossReservedVirtualAliasOfAMustBeTrueView(EmbossReservedVirtualAliasOfAMustBeTrueView &&) = default; + EmbossReservedVirtualAliasOfAMustBeTrueView &operator=(const EmbossReservedVirtualAliasOfAMustBeTrueView &) = + default; + EmbossReservedVirtualAliasOfAMustBeTrueView &operator=(EmbossReservedVirtualAliasOfAMustBeTrueView &&) = + default; + ~EmbossReservedVirtualAliasOfAMustBeTrueView() = default; + + bool Read() const { + EMBOSS_CHECK(view_.has_alias_of_a_must_be_true().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()); + } + template + 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; } + + bool TryToWrite(bool emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.a().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(bool emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(bool emboss_reserved_local_value) { + view_.a().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); + } + bool CouldWriteValue(bool emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.a().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + return emboss_reserved_local_subexpr_2; + } + + static constexpr bool ValueIsOk( + bool emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(emboss_reserved_local_value).ValueOr(false); + } + + const GenericRequiresBoolsView view_; + }; + EmbossReservedVirtualAliasOfAMustBeTrueView alias_of_a_must_be_true() const; + ::emboss::support::Maybe has_alias_of_a_must_be_true() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRequiresBoolsView; +}; +using RequiresBoolsView = + GenericRequiresBoolsView; +using RequiresBoolsWriter = + GenericRequiresBoolsView; + +template +struct EmbossReservedInternalIsGenericRequiresBoolsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRequiresBoolsView< + GenericRequiresBoolsView> { + static constexpr const bool value = true; +}; + +template +inline GenericRequiresBoolsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRequiresBoolsView( T &&emboss_reserved_local_arg) { + return GenericRequiresBoolsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRequiresBoolsView> +MakeRequiresBoolsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresBoolsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRequiresBoolsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRequiresBoolsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresBoolsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + +namespace RequiresEnums { +struct EmbossReservedValidatorForC { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::Or(::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(0))), ::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1))))).ValueOrDefault(); + } +}; + + +} // namespace RequiresEnums + + + + + + + +namespace RequiresEnums { +enum class Enum : ::std::uint64_t { + EN0 = static_cast(0LL), + EN1 = static_cast(1LL), + EN2 = static_cast(2LL), + EN3 = static_cast(3LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Enum *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("EN0", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::EN0; + return true; + } + + if (!strcmp("EN1", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::EN1; + return true; + } + + if (!strcmp("EN2", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::EN2; + return true; + } + + if (!strcmp("EN3", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::EN3; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Enum emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Enum::EN0: return "EN0"; + + case Enum::EN1: return "EN1"; + + case Enum::EN2: return "EN2"; + + case Enum::EN3: return "EN3"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Enum emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Enum::EN0: return true; + + case Enum::EN1: return true; + + case Enum::EN2: return true; + + case Enum::EN3: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Enum 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::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, + Enum *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Enum emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Enum emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Enum emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +} // namespace RequiresEnums + + +template +struct EmbossReservedInternalIsGenericRequiresEnumsView; + +template +class GenericRequiresEnumsView final { + public: + GenericRequiresEnumsView() : backing_() {} + explicit GenericRequiresEnumsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRequiresEnumsView( + const GenericRequiresEnumsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRequiresEnumsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRequiresEnumsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRequiresEnumsView &operator=( + const GenericRequiresEnumsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + using Enum = ::emboss::test::RequiresEnums::Enum; + + 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_filtered_a().Known()) return false; + if (has_filtered_a().ValueOrDefault() && !filtered_a().Ok()) return false; + + + if (!has_alias_of_a().Known()) return false; + if (has_alias_of_a().ValueOrDefault() && !alias_of_a().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 (!(::emboss::support::Or(::emboss::support::Equal((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))), ::emboss::support::Equal((b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0))))).ValueOr(false)) + return false; + return true; + } + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { + return backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericRequiresEnumsView 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 + bool UncheckedEquals( + GenericRequiresEnumsView 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 + void UncheckedCopyFrom( + GenericRequiresEnumsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericRequiresEnumsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericRequiresEnumsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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; + } + + if (emboss_reserved_local_name == "alias_of_a") { + if (!alias_of_a().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_c().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + c().IsAggregate() || c().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_filtered_a().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + filtered_a().IsAggregate() || filtered_a().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# filtered_a: "); + filtered_a().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("# filtered_a: UNREADABLE\n"); + } + } + + if (has_alias_of_a().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_a().IsAggregate() || alias_of_a().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("alias_of_a: "); + alias_of_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !alias_of_a().IsAggregate() && !alias_of_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("# alias_of_a: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, RequiresEnums::EmbossReservedValidatorForC>, + typename ::emboss::support::BitBlock>, 8>> + + c() const; + ::emboss::support::Maybe has_c() const; + + public: + class EmbossReservedVirtualFilteredAView final { + public: + using ValueType = ::emboss::test::RequiresEnums::Enum; + + explicit EmbossReservedVirtualFilteredAView( + const GenericRequiresEnumsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualFilteredAView() = delete; + EmbossReservedVirtualFilteredAView(const EmbossReservedVirtualFilteredAView &) = default; + EmbossReservedVirtualFilteredAView(EmbossReservedVirtualFilteredAView &&) = default; + EmbossReservedVirtualFilteredAView &operator=(const EmbossReservedVirtualFilteredAView &) = + default; + EmbossReservedVirtualFilteredAView &operator=(EmbossReservedVirtualFilteredAView &&) = + default; + ~EmbossReservedVirtualFilteredAView() = default; + + ::emboss::test::RequiresEnums::Enum Read() const { + EMBOSS_CHECK(view_.has_filtered_a().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(); + } + ::emboss::test::RequiresEnums::Enum 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()); + } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteEnumViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(1)), emboss_reserved_local_subexpr_2); + + return emboss_reserved_local_subexpr_4; + } + + static constexpr bool ValueIsOk( + ::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1))).ValueOr(false); + } + + const GenericRequiresEnumsView view_; + }; + EmbossReservedVirtualFilteredAView filtered_a() const; + ::emboss::support::Maybe has_filtered_a() const; + + public: + class EmbossReservedVirtualAliasOfAView final { + public: + using ValueType = ::emboss::test::RequiresEnums::Enum; + + explicit EmbossReservedVirtualAliasOfAView( + const GenericRequiresEnumsView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualAliasOfAView() = delete; + EmbossReservedVirtualAliasOfAView(const EmbossReservedVirtualAliasOfAView &) = default; + EmbossReservedVirtualAliasOfAView(EmbossReservedVirtualAliasOfAView &&) = default; + EmbossReservedVirtualAliasOfAView &operator=(const EmbossReservedVirtualAliasOfAView &) = + default; + EmbossReservedVirtualAliasOfAView &operator=(EmbossReservedVirtualAliasOfAView &&) = + default; + ~EmbossReservedVirtualAliasOfAView() = default; + + ::emboss::test::RequiresEnums::Enum Read() const { + EMBOSS_CHECK(view_.has_alias_of_a().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(); + } + ::emboss::test::RequiresEnums::Enum 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()); + } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteEnumViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + + bool TryToWrite(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.a().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + view_.a().UncheckedWrite((::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault()); + } + bool CouldWriteValue(::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Maybe(emboss_reserved_local_value); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.a().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + return emboss_reserved_local_subexpr_2; + } + + static constexpr bool ValueIsOk( + ::emboss::test::RequiresEnums::Enum emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Equal(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1))).ValueOr(false); + } + + const GenericRequiresEnumsView view_; + }; + EmbossReservedVirtualAliasOfAView alias_of_a() const; + ::emboss::support::Maybe has_alias_of_a() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRequiresEnumsView; +}; +using RequiresEnumsView = + GenericRequiresEnumsView; +using RequiresEnumsWriter = + GenericRequiresEnumsView; + +template +struct EmbossReservedInternalIsGenericRequiresEnumsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRequiresEnumsView< + GenericRequiresEnumsView> { + static constexpr const bool value = true; +}; + +template +inline GenericRequiresEnumsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRequiresEnumsView( T &&emboss_reserved_local_arg) { + return GenericRequiresEnumsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRequiresEnumsView> +MakeRequiresEnumsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresEnumsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRequiresEnumsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRequiresEnumsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresEnumsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + +namespace RequiresWithOptionalFields { + + + +namespace EmbossReservedAnonymousField1 { +struct EmbossReservedValidatorForBTrue { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::Maybe(emboss_reserved_local_value)).ValueOrDefault(); + } +}; + + +} // namespace EmbossReservedAnonymousField1 + + + + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; + +template +class GenericEmbossReservedAnonymousField1View final { + public: + GenericEmbossReservedAnonymousField1View() : backing_() {} + explicit GenericEmbossReservedAnonymousField1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField1View( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField1View &operator=( + const GenericEmbossReservedAnonymousField1View &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_exists().Known()) return false; + if (has_b_exists().ValueOrDefault() && !b_exists().Ok()) return false; + + + if (!has_b().Known()) return false; + if (has_b().ValueOrDefault() && !b().Ok()) return false; + + + if (!has_b_true().Known()) return false; + if (has_b_true().ValueOrDefault() && !b_true().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + ::std::size_t SizeInBits() const { + return static_cast(IntrinsicSizeInBits().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBits().Ok(); } + + + + template + bool Equals( + GenericEmbossReservedAnonymousField1View 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_exists().Known()) return false; + if (!emboss_reserved_local_other.has_b_exists().Known()) return false; + + if (emboss_reserved_local_other.has_b_exists().ValueOrDefault() && + !has_b_exists().ValueOrDefault()) + return false; + if (has_b_exists().ValueOrDefault() && + !emboss_reserved_local_other.has_b_exists().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_b_exists().ValueOrDefault() && + has_b_exists().ValueOrDefault() && + !b_exists().Equals(emboss_reserved_local_other.b_exists())) + 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_b_true().Known()) return false; + if (!emboss_reserved_local_other.has_b_true().Known()) return false; + + if (emboss_reserved_local_other.has_b_true().ValueOrDefault() && + !has_b_true().ValueOrDefault()) + return false; + if (has_b_true().ValueOrDefault() && + !emboss_reserved_local_other.has_b_true().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_b_true().ValueOrDefault() && + has_b_true().ValueOrDefault() && + !b_true().Equals(emboss_reserved_local_other.b_true())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField1View 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_exists().ValueOr(false) && + !has_b_exists().ValueOr(false)) + return false; + if (has_b_exists().ValueOr(false) && + !emboss_reserved_local_other.has_b_exists().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_b_exists().ValueOr(false) && + has_b_exists().ValueOr(false) && + !b_exists().UncheckedEquals(emboss_reserved_local_other.b_exists())) + 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_b_true().ValueOr(false) && + !has_b_true().ValueOr(false)) + return false; + if (has_b_true().ValueOr(false) && + !emboss_reserved_local_other.has_b_true().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_b_true().ValueOr(false) && + has_b_true().ValueOr(false) && + !b_true().UncheckedEquals(emboss_reserved_local_other.b_true())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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_exists") { + if (!b_exists().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 == "b_true") { + if (!b_true().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_exists().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b_exists().IsAggregate() || b_exists().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("b_exists: "); + b_exists().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !b_exists().IsAggregate() && !b_exists().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_exists: UNREADABLE\n"); + } + } + + if (has_b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b().IsAggregate() || b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_b_true().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b_true().IsAggregate() || b_true().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("b_true: "); + b_true().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !b_true().IsAggregate() && !b_true().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_true: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + b_exists() const; + ::emboss::support::Maybe has_b_exists() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField1::EmbossReservedValidatorForBTrue>, + typename Storage::template OffsetStorageType> + + b_true() const; + ::emboss::support::Maybe has_b_true() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBitsView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBitsView( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = delete; + EmbossReservedDollarVirtualIntrinsicSizeInBitsView(const EmbossReservedDollarVirtualIntrinsicSizeInBitsView &) = default; + EmbossReservedDollarVirtualIntrinsicSizeInBitsView(EmbossReservedDollarVirtualIntrinsicSizeInBitsView &&) = default; + EmbossReservedDollarVirtualIntrinsicSizeInBitsView &operator=(const EmbossReservedDollarVirtualIntrinsicSizeInBitsView &) = + default; + EmbossReservedDollarVirtualIntrinsicSizeInBitsView &operator=(EmbossReservedDollarVirtualIntrinsicSizeInBitsView &&) = + default; + ~EmbossReservedDollarVirtualIntrinsicSizeInBitsView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_IntrinsicSizeInBits().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.b_exists(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Choice(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(2LL)), emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_3); + + return emboss_reserved_local_subexpr_4; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericEmbossReservedAnonymousField1View view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBitsView IntrinsicSizeInBits() const; + ::emboss::support::Maybe has_IntrinsicSizeInBits() const; + + 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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField1View; +}; +using EmbossReservedAnonymousField1View = + GenericEmbossReservedAnonymousField1View; +using EmbossReservedAnonymousField1Writer = + GenericEmbossReservedAnonymousField1View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< + GenericEmbossReservedAnonymousField1View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField1View> +MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace RequiresWithOptionalFields + + +template +struct EmbossReservedInternalIsGenericRequiresWithOptionalFieldsView; + +template +class GenericRequiresWithOptionalFieldsView final { + public: + GenericRequiresWithOptionalFieldsView() : backing_() {} + explicit GenericRequiresWithOptionalFieldsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRequiresWithOptionalFieldsView( + const GenericRequiresWithOptionalFieldsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRequiresWithOptionalFieldsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRequiresWithOptionalFieldsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRequiresWithOptionalFieldsView &operator=( + const GenericRequiresWithOptionalFieldsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) 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_a().Known()) return false; + if (has_a().ValueOrDefault() && !a().Ok()) return false; + + + if (!has_b_exists().Known()) return false; + if (has_b_exists().ValueOrDefault() && !b_exists().Ok()) return false; + + + if (!has_b().Known()) return false; + if (has_b().ValueOrDefault() && !b().Ok()) return false; + + + if (!has_b_true().Known()) return false; + if (has_b_true().ValueOrDefault() && !b_true().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 (!(::emboss::support::Or((a().Ok() ? ::emboss::support::Maybe(static_cast(a().UncheckedRead())) : ::emboss::support::Maybe()), (b().Ok() ? ::emboss::support::Maybe(static_cast(b().UncheckedRead())) : ::emboss::support::Maybe()))).ValueOr(false)) + return false; + return true; + } + Storage BackingStorage() const { return backing_; } + bool IsComplete() const { + return backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { + + 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; + + return true; + } + template + bool UncheckedEquals( + GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { + + 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; + + return true; + } + template + void UncheckedCopyFrom( + GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericRequiresWithOptionalFieldsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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_exists") { + if (!b_exists().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 == "b_true") { + if (!b_true().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_exists().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b_exists().IsAggregate() || b_exists().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("b_exists: "); + b_exists().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !b_exists().IsAggregate() && !b_exists().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_exists: UNREADABLE\n"); + } + } + + if (has_b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b().IsAggregate() || b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_b_true().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b_true().IsAggregate() || b_true().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("b_true: "); + b_true().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !b_true().IsAggregate() && !b_true().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_true: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + private: + typename ::emboss::test::RequiresWithOptionalFields::GenericEmbossReservedAnonymousField1View>, 8>> + + emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + + public: + auto a() const -> decltype(this->emboss_reserved_anonymous_field_1().a()) { + return has_a().ValueOrDefault() ? emboss_reserved_anonymous_field_1().a() + : decltype(this->emboss_reserved_anonymous_field_1().a())(); + } + ::emboss::support::Maybe has_a() const; + + public: + auto b_exists() const -> decltype(this->emboss_reserved_anonymous_field_1().b_exists()) { + return has_b_exists().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b_exists() + : decltype(this->emboss_reserved_anonymous_field_1().b_exists())(); + } + ::emboss::support::Maybe has_b_exists() const; + + public: + auto b() const -> decltype(this->emboss_reserved_anonymous_field_1().b()) { + return has_b().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b() + : decltype(this->emboss_reserved_anonymous_field_1().b())(); + } + ::emboss::support::Maybe has_b() const; + + public: + auto b_true() const -> decltype(this->emboss_reserved_anonymous_field_1().b_true()) { + return has_b_true().ValueOrDefault() ? emboss_reserved_anonymous_field_1().b_true() + : decltype(this->emboss_reserved_anonymous_field_1().b_true())(); + } + ::emboss::support::Maybe has_b_true() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRequiresWithOptionalFieldsView; +}; +using RequiresWithOptionalFieldsView = + GenericRequiresWithOptionalFieldsView; +using RequiresWithOptionalFieldsWriter = + GenericRequiresWithOptionalFieldsView; + +template +struct EmbossReservedInternalIsGenericRequiresWithOptionalFieldsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRequiresWithOptionalFieldsView< + GenericRequiresWithOptionalFieldsView> { + static constexpr const bool value = true; +}; + +template +inline GenericRequiresWithOptionalFieldsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRequiresWithOptionalFieldsView( T &&emboss_reserved_local_arg) { + return GenericRequiresWithOptionalFieldsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRequiresWithOptionalFieldsView> +MakeRequiresWithOptionalFieldsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresWithOptionalFieldsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRequiresWithOptionalFieldsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRequiresWithOptionalFieldsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresWithOptionalFieldsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + +namespace RequiresInArrayElements { +namespace Element { +struct EmbossReservedValidatorForX { + template + static constexpr bool ValueIsOk(ValueType emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + (::emboss::support::And(::emboss::support::LessThanOrEqual(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(emboss_reserved_local_value)), ::emboss::support::LessThanOrEqual(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))))).ValueOrDefault(); + } +}; + + +} // namespace Element + + + + + +namespace Element { + +} // namespace Element + + +template +struct EmbossReservedInternalIsGenericElementView; + +template +class GenericElementView final { + public: + GenericElementView() : backing_() {} + explicit GenericElementView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericElementView( + const GenericElementView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericElementView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericElementView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericElementView &operator=( + const GenericElementView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericElementView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericElementView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericElementView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericElementView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericElementView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, Element::EmbossReservedValidatorForX>, + typename ::emboss::support::BitBlock>, 8>> + + x() const; + ::emboss::support::Maybe has_x() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericElementView; +}; +using ElementView = + GenericElementView; +using ElementWriter = + GenericElementView; + +template +struct EmbossReservedInternalIsGenericElementView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericElementView< + GenericElementView> { + static constexpr const bool value = true; +}; + +template +inline GenericElementView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeElementView( T &&emboss_reserved_local_arg) { + return GenericElementView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericElementView> +MakeElementView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericElementView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericElementView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedElementView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericElementView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace RequiresInArrayElements + + +template +struct EmbossReservedInternalIsGenericRequiresInArrayElementsView; + +template +class GenericRequiresInArrayElementsView final { + public: + GenericRequiresInArrayElementsView() : backing_() {} + explicit GenericRequiresInArrayElementsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRequiresInArrayElementsView( + const GenericRequiresInArrayElementsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRequiresInArrayElementsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRequiresInArrayElementsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRequiresInArrayElementsView &operator=( + const GenericRequiresInArrayElementsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_xs().Known()) return false; + if (has_xs().ValueOrDefault() && !xs().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericRequiresInArrayElementsView emboss_reserved_local_other) const { + + if (!has_xs().Known()) return false; + if (!emboss_reserved_local_other.has_xs().Known()) return false; + + if (emboss_reserved_local_other.has_xs().ValueOrDefault() && + !has_xs().ValueOrDefault()) + return false; + if (has_xs().ValueOrDefault() && + !emboss_reserved_local_other.has_xs().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xs().ValueOrDefault() && + has_xs().ValueOrDefault() && + !xs().Equals(emboss_reserved_local_other.xs())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericRequiresInArrayElementsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_xs().ValueOr(false) && + !has_xs().ValueOr(false)) + return false; + if (has_xs().ValueOr(false) && + !emboss_reserved_local_other.has_xs().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xs().ValueOr(false) && + has_xs().ValueOr(false) && + !xs().UncheckedEquals(emboss_reserved_local_other.xs())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericRequiresInArrayElementsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericRequiresInArrayElementsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericRequiresInArrayElementsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "xs") { + if (!xs().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_xs().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xs().IsAggregate() || xs().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xs: "); + xs().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xs().IsAggregate() && !xs().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("# xs: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::test::RequiresInArrayElements::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + xs() const; + ::emboss::support::Maybe has_xs() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRequiresInArrayElementsView; +}; +using RequiresInArrayElementsView = + GenericRequiresInArrayElementsView; +using RequiresInArrayElementsWriter = + GenericRequiresInArrayElementsView; + +template +struct EmbossReservedInternalIsGenericRequiresInArrayElementsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRequiresInArrayElementsView< + GenericRequiresInArrayElementsView> { + static constexpr const bool value = true; +}; + +template +inline GenericRequiresInArrayElementsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRequiresInArrayElementsView( T &&emboss_reserved_local_arg) { + return GenericRequiresInArrayElementsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRequiresInArrayElementsView> +MakeRequiresInArrayElementsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresInArrayElementsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRequiresInArrayElementsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRequiresInArrayElementsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRequiresInArrayElementsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace RequiresIntegers { + +} // namespace RequiresIntegers + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForZeroThroughNine>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRequiresIntegersView::zero_through_nine() + const { + + if ( has_zero_through_nine().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForZeroThroughNine>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForZeroThroughNine>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresIntegersView::has_zero_through_nine() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForTenThroughTwenty>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRequiresIntegersView::ten_through_twenty() + const { + + if ( has_ten_through_twenty().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForTenThroughTwenty>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForTenThroughTwenty>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresIntegersView::has_ten_through_twenty() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForDisjoint>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRequiresIntegersView::disjoint() + const { + + if ( has_disjoint().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForDisjoint>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, RequiresIntegers::EmbossReservedValidatorForDisjoint>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresIntegersView::has_disjoint() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericRequiresIntegersView::EmbossReservedVirtualZtnPlusTttView +GenericRequiresIntegersView::ztn_plus_ttt() const { + return + typename GenericRequiresIntegersView::EmbossReservedVirtualZtnPlusTttView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRequiresIntegersView::has_ztn_plus_ttt() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericRequiresIntegersView::EmbossReservedVirtualAliasOfZeroThroughNineView +GenericRequiresIntegersView::alias_of_zero_through_nine() const { + return + typename GenericRequiresIntegersView::EmbossReservedVirtualAliasOfZeroThroughNineView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRequiresIntegersView::has_alias_of_zero_through_nine() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericRequiresIntegersView::EmbossReservedVirtualZeroThroughNinePlusFiveView +GenericRequiresIntegersView::zero_through_nine_plus_five() const { + return + typename GenericRequiresIntegersView::EmbossReservedVirtualZeroThroughNinePlusFiveView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRequiresIntegersView::has_zero_through_nine_plus_five() const { + return ::emboss::support::Maybe(true); +} + + +namespace RequiresIntegers { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace RequiresIntegers + +template +inline constexpr ::std::int32_t +GenericRequiresIntegersView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return RequiresIntegers::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresIntegersView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return RequiresIntegers::IntrinsicSizeInBytes(); +} + +namespace RequiresIntegers { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace RequiresIntegers + +template +inline constexpr ::std::int32_t +GenericRequiresIntegersView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return RequiresIntegers::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresIntegersView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return RequiresIntegers::MaxSizeInBytes(); +} + +namespace RequiresIntegers { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace RequiresIntegers + +template +inline constexpr ::std::int32_t +GenericRequiresIntegersView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return RequiresIntegers::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresIntegersView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return RequiresIntegers::MinSizeInBytes(); +} +namespace RequiresBools { +namespace EmbossReservedAnonymousField2 { + +} // namespace EmbossReservedAnonymousField2 + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeTrue>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::must_be_true() + const { + + if ( has_must_be_true().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeTrue>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeTrue>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_must_be_true() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeFalse>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField2View::must_be_false() + const { + + if ( has_must_be_false().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeFalse>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField2::EmbossReservedValidatorForMustBeFalse>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField2View::has_must_be_false() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField2 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField2 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField2::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField2View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField2::MinSizeInBits(); +} + +} // namespace RequiresBools + + +template +inline typename ::emboss::test::RequiresBools::GenericEmbossReservedAnonymousField2View>, 8>> + + GenericRequiresBoolsView::emboss_reserved_anonymous_field_2() + const { + + if ( has_emboss_reserved_anonymous_field_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::RequiresBools::GenericEmbossReservedAnonymousField2View>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::RequiresBools::GenericEmbossReservedAnonymousField2View>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresBoolsView::has_emboss_reserved_anonymous_field_2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericRequiresBoolsView::has_a() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericRequiresBoolsView::has_b() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericRequiresBoolsView::has_must_be_true() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericRequiresBoolsView::has_must_be_false() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline typename GenericRequiresBoolsView::EmbossReservedVirtualBMustBeFalseView +GenericRequiresBoolsView::b_must_be_false() const { + return + typename GenericRequiresBoolsView::EmbossReservedVirtualBMustBeFalseView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRequiresBoolsView::has_b_must_be_false() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericRequiresBoolsView::EmbossReservedVirtualAliasOfAMustBeTrueView +GenericRequiresBoolsView::alias_of_a_must_be_true() const { + return + typename GenericRequiresBoolsView::EmbossReservedVirtualAliasOfAMustBeTrueView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRequiresBoolsView::has_alias_of_a_must_be_true() const { + return ::emboss::support::Maybe(true); +} + + +namespace RequiresBools { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace RequiresBools + +template +inline constexpr ::std::int32_t +GenericRequiresBoolsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return RequiresBools::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresBoolsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return RequiresBools::IntrinsicSizeInBytes(); +} + +namespace RequiresBools { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace RequiresBools + +template +inline constexpr ::std::int32_t +GenericRequiresBoolsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return RequiresBools::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresBoolsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return RequiresBools::MaxSizeInBytes(); +} + +namespace RequiresBools { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace RequiresBools + +template +inline constexpr ::std::int32_t +GenericRequiresBoolsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return RequiresBools::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresBoolsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return RequiresBools::MinSizeInBytes(); +} +namespace RequiresEnums { + +} // namespace RequiresEnums + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRequiresEnumsView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresEnumsView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRequiresEnumsView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresEnumsView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, RequiresEnums::EmbossReservedValidatorForC>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRequiresEnumsView::c() + const { + + if ( has_c().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, RequiresEnums::EmbossReservedValidatorForC>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::RequiresEnums::Enum, + ::emboss::support::FixedSizeViewParameters<8, RequiresEnums::EmbossReservedValidatorForC>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresEnumsView::has_c() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericRequiresEnumsView::EmbossReservedVirtualFilteredAView +GenericRequiresEnumsView::filtered_a() const { + return + typename GenericRequiresEnumsView::EmbossReservedVirtualFilteredAView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRequiresEnumsView::has_filtered_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericRequiresEnumsView::EmbossReservedVirtualAliasOfAView +GenericRequiresEnumsView::alias_of_a() const { + return + typename GenericRequiresEnumsView::EmbossReservedVirtualAliasOfAView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRequiresEnumsView::has_alias_of_a() const { + return ::emboss::support::Maybe(true); +} + + +namespace RequiresEnums { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace RequiresEnums + +template +inline constexpr ::std::int32_t +GenericRequiresEnumsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return RequiresEnums::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresEnumsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return RequiresEnums::IntrinsicSizeInBytes(); +} + +namespace RequiresEnums { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace RequiresEnums + +template +inline constexpr ::std::int32_t +GenericRequiresEnumsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return RequiresEnums::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresEnumsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return RequiresEnums::MaxSizeInBytes(); +} + +namespace RequiresEnums { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace RequiresEnums + +template +inline constexpr ::std::int32_t +GenericRequiresEnumsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return RequiresEnums::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresEnumsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return RequiresEnums::MinSizeInBytes(); +} +namespace RequiresWithOptionalFields { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::b_exists() + const { + + if ( has_b_exists().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_b_exists() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_b() const { + return (b_exists().Ok() ? ::emboss::support::Maybe(static_cast(b_exists().UncheckedRead())) : ::emboss::support::Maybe()); +} + + +template +inline typename ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField1::EmbossReservedValidatorForBTrue>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::b_true() + const { + + if ( has_b_true().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField1::EmbossReservedValidatorForBTrue>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::FlagView< + /**/ ::emboss::support::FixedSizeViewParameters<1, EmbossReservedAnonymousField1::EmbossReservedValidatorForBTrue>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_b_true() const { + return (b_exists().Ok() ? ::emboss::support::Maybe(static_cast(b_exists().UncheckedRead())) : ::emboss::support::Maybe()); +} + + +template +inline typename GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView +GenericEmbossReservedAnonymousField1View::IntrinsicSizeInBits() const { + return + typename GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_IntrinsicSizeInBits() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +} // namespace RequiresWithOptionalFields + + +template +inline typename ::emboss::test::RequiresWithOptionalFields::GenericEmbossReservedAnonymousField1View>, 8>> + + GenericRequiresWithOptionalFieldsView::emboss_reserved_anonymous_field_1() + const { + + if ( has_emboss_reserved_anonymous_field_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::RequiresWithOptionalFields::GenericEmbossReservedAnonymousField1View>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::RequiresWithOptionalFields::GenericEmbossReservedAnonymousField1View>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresWithOptionalFieldsView::has_emboss_reserved_anonymous_field_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericRequiresWithOptionalFieldsView::has_a() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericRequiresWithOptionalFieldsView::has_b_exists() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +template +inline ::emboss::support::Maybe +GenericRequiresWithOptionalFieldsView::has_b() const { + return ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_anonymous_field_1().has_b()); +} + + +template +inline ::emboss::support::Maybe +GenericRequiresWithOptionalFieldsView::has_b_true() const { + return ::emboss::support::And(::emboss::support::Maybe(true), emboss_reserved_anonymous_field_1().has_b_true()); +} + + +namespace RequiresWithOptionalFields { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace RequiresWithOptionalFields + +template +inline constexpr ::std::int32_t +GenericRequiresWithOptionalFieldsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return RequiresWithOptionalFields::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresWithOptionalFieldsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return RequiresWithOptionalFields::IntrinsicSizeInBytes(); +} + +namespace RequiresWithOptionalFields { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace RequiresWithOptionalFields + +template +inline constexpr ::std::int32_t +GenericRequiresWithOptionalFieldsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return RequiresWithOptionalFields::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresWithOptionalFieldsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return RequiresWithOptionalFields::MaxSizeInBytes(); +} + +namespace RequiresWithOptionalFields { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace RequiresWithOptionalFields + +template +inline constexpr ::std::int32_t +GenericRequiresWithOptionalFieldsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return RequiresWithOptionalFields::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresWithOptionalFieldsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return RequiresWithOptionalFields::MinSizeInBytes(); +} +namespace RequiresInArrayElements { +namespace Element { + +} // namespace Element + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, Element::EmbossReservedValidatorForX>, + typename ::emboss::support::BitBlock>, 8>> + + GenericElementView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, Element::EmbossReservedValidatorForX>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, Element::EmbossReservedValidatorForX>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericElementView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +namespace Element { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Element + +template +inline constexpr ::std::int32_t +GenericElementView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Element::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericElementView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Element::IntrinsicSizeInBytes(); +} + +namespace Element { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Element + +template +inline constexpr ::std::int32_t +GenericElementView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Element::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericElementView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Element::MaxSizeInBytes(); +} + +namespace Element { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace Element + +template +inline constexpr ::std::int32_t +GenericElementView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Element::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericElementView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Element::MinSizeInBytes(); +} + +} // namespace RequiresInArrayElements + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::test::RequiresInArrayElements::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericRequiresInArrayElementsView::xs() + const { + + if ( has_xs().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::test::RequiresInArrayElements::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::test::RequiresInArrayElements::GenericElementView::template OffsetStorageType> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericRequiresInArrayElementsView::has_xs() const { + return ::emboss::support::Maybe(true); +} + + +namespace RequiresInArrayElements { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace RequiresInArrayElements + +template +inline constexpr ::std::int32_t +GenericRequiresInArrayElementsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return RequiresInArrayElements::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresInArrayElementsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return RequiresInArrayElements::IntrinsicSizeInBytes(); +} + +namespace RequiresInArrayElements { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace RequiresInArrayElements + +template +inline constexpr ::std::int32_t +GenericRequiresInArrayElementsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return RequiresInArrayElements::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresInArrayElementsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return RequiresInArrayElements::MaxSizeInBytes(); +} + +namespace RequiresInArrayElements { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace RequiresInArrayElements + +template +inline constexpr ::std::int32_t +GenericRequiresInArrayElementsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return RequiresInArrayElements::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRequiresInArrayElementsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return RequiresInArrayElements::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_REQUIRES_EMB_H_ + diff --git a/testdata/golden_cpp/start_size_range.emb.h b/testdata/golden_cpp/start_size_range.emb.h new file mode 100644 index 00000000..d9f01663 --- /dev/null +++ b/testdata/golden_cpp/start_size_range.emb.h @@ -0,0 +1,992 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_START_SIZE_RANGE_EMB_H_ +#define TESTDATA_START_SIZE_RANGE_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace StartSize { + +} // namespace StartSize + + +template +class GenericStartSizeView; + + + + + + + + +namespace StartSize { + +} // namespace StartSize + + +template +struct EmbossReservedInternalIsGenericStartSizeView; + +template +class GenericStartSizeView final { + public: + GenericStartSizeView() : backing_() {} + explicit GenericStartSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStartSizeView( + const GenericStartSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStartSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStartSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStartSizeView &operator=( + const GenericStartSizeView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_size().Known()) return false; + if (has_size().ValueOrDefault() && !size().Ok()) return false; + + + if (!has_start_size_constants().Known()) return false; + if (has_start_size_constants().ValueOrDefault() && !start_size_constants().Ok()) return false; + + + if (!has_payload().Known()) return false; + if (has_payload().ValueOrDefault() && !payload().Ok()) return false; + + + if (!has_counter().Known()) return false; + if (has_counter().ValueOrDefault() && !counter().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericStartSizeView emboss_reserved_local_other) const { + + if (!has_size().Known()) return false; + if (!emboss_reserved_local_other.has_size().Known()) return false; + + if (emboss_reserved_local_other.has_size().ValueOrDefault() && + !has_size().ValueOrDefault()) + return false; + if (has_size().ValueOrDefault() && + !emboss_reserved_local_other.has_size().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_size().ValueOrDefault() && + has_size().ValueOrDefault() && + !size().Equals(emboss_reserved_local_other.size())) + return false; + + + + if (!has_start_size_constants().Known()) return false; + if (!emboss_reserved_local_other.has_start_size_constants().Known()) return false; + + if (emboss_reserved_local_other.has_start_size_constants().ValueOrDefault() && + !has_start_size_constants().ValueOrDefault()) + return false; + if (has_start_size_constants().ValueOrDefault() && + !emboss_reserved_local_other.has_start_size_constants().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_start_size_constants().ValueOrDefault() && + has_start_size_constants().ValueOrDefault() && + !start_size_constants().Equals(emboss_reserved_local_other.start_size_constants())) + return false; + + + + if (!has_payload().Known()) return false; + if (!emboss_reserved_local_other.has_payload().Known()) return false; + + if (emboss_reserved_local_other.has_payload().ValueOrDefault() && + !has_payload().ValueOrDefault()) + return false; + if (has_payload().ValueOrDefault() && + !emboss_reserved_local_other.has_payload().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_payload().ValueOrDefault() && + has_payload().ValueOrDefault() && + !payload().Equals(emboss_reserved_local_other.payload())) + return false; + + + + if (!has_counter().Known()) return false; + if (!emboss_reserved_local_other.has_counter().Known()) return false; + + if (emboss_reserved_local_other.has_counter().ValueOrDefault() && + !has_counter().ValueOrDefault()) + return false; + if (has_counter().ValueOrDefault() && + !emboss_reserved_local_other.has_counter().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_counter().ValueOrDefault() && + has_counter().ValueOrDefault() && + !counter().Equals(emboss_reserved_local_other.counter())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStartSizeView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_size().ValueOr(false) && + !has_size().ValueOr(false)) + return false; + if (has_size().ValueOr(false) && + !emboss_reserved_local_other.has_size().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_size().ValueOr(false) && + has_size().ValueOr(false) && + !size().UncheckedEquals(emboss_reserved_local_other.size())) + return false; + + + + if (emboss_reserved_local_other.has_start_size_constants().ValueOr(false) && + !has_start_size_constants().ValueOr(false)) + return false; + if (has_start_size_constants().ValueOr(false) && + !emboss_reserved_local_other.has_start_size_constants().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_start_size_constants().ValueOr(false) && + has_start_size_constants().ValueOr(false) && + !start_size_constants().UncheckedEquals(emboss_reserved_local_other.start_size_constants())) + return false; + + + + if (emboss_reserved_local_other.has_payload().ValueOr(false) && + !has_payload().ValueOr(false)) + return false; + if (has_payload().ValueOr(false) && + !emboss_reserved_local_other.has_payload().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_payload().ValueOr(false) && + has_payload().ValueOr(false) && + !payload().UncheckedEquals(emboss_reserved_local_other.payload())) + return false; + + + + if (emboss_reserved_local_other.has_counter().ValueOr(false) && + !has_counter().ValueOr(false)) + return false; + if (has_counter().ValueOr(false) && + !emboss_reserved_local_other.has_counter().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_counter().ValueOr(false) && + has_counter().ValueOr(false) && + !counter().UncheckedEquals(emboss_reserved_local_other.counter())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStartSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStartSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStartSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "size") { + if (!size().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "start_size_constants") { + if (!start_size_constants().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "payload") { + if (!payload().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "counter") { + if (!counter().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_size().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + size().IsAggregate() || size().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("size: "); + size().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !size().IsAggregate() && !size().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("# size: UNREADABLE\n"); + } + } + + if (has_start_size_constants().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + start_size_constants().IsAggregate() || start_size_constants().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("start_size_constants: "); + start_size_constants().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !start_size_constants().IsAggregate() && !start_size_constants().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("# start_size_constants: UNREADABLE\n"); + } + } + + if (has_payload().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + payload().IsAggregate() || payload().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("payload: "); + payload().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !payload().IsAggregate() && !payload().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("# payload: UNREADABLE\n"); + } + } + + if (has_counter().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + counter().IsAggregate() || counter().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("counter: "); + counter().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !counter().IsAggregate() && !counter().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("# counter: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + size() const; + ::emboss::support::Maybe has_size() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + start_size_constants() const; + ::emboss::support::Maybe has_start_size_constants() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + payload() const; + ::emboss::support::Maybe has_payload() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + counter() const; + ::emboss::support::Maybe has_counter() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericStartSizeView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.size(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), ::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6); + + return emboss_reserved_local_subexpr_7; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStartSizeView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStartSizeView; +}; +using StartSizeView = + GenericStartSizeView; +using StartSizeWriter = + GenericStartSizeView; + +template +struct EmbossReservedInternalIsGenericStartSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStartSizeView< + GenericStartSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericStartSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStartSizeView( T &&emboss_reserved_local_arg) { + return GenericStartSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStartSizeView> +MakeStartSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStartSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStartSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStartSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStartSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace StartSize { + +} // namespace StartSize + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericStartSizeView::size() + const { + + if ( has_size().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStartSizeView::has_size() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericStartSizeView::start_size_constants() + const { + + if ( has_start_size_constants().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStartSizeView::has_start_size_constants() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericStartSizeView::payload() + const { + + if ( has_payload().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = size(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_2; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericStartSizeView::has_payload() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStartSizeView::counter() + const { + + if ( has_counter().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = size(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(3LL)), emboss_reserved_local_subexpr_2); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_3; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStartSizeView::has_counter() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStartSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericStartSizeView::IntrinsicSizeInBytes() const { + return + typename GenericStartSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStartSizeView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace StartSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(262LL)).ValueOrDefault(); +} +} // namespace StartSize + +template +inline constexpr ::std::int32_t +GenericStartSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StartSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStartSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StartSize::MaxSizeInBytes(); +} + +namespace StartSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(7LL)).ValueOrDefault(); +} +} // namespace StartSize + +template +inline constexpr ::std::int32_t +GenericStartSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StartSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStartSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StartSize::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_START_SIZE_RANGE_EMB_H_ + diff --git a/testdata/golden_cpp/subtypes.emb.h b/testdata/golden_cpp/subtypes.emb.h new file mode 100644 index 00000000..860d5548 --- /dev/null +++ b/testdata/golden_cpp/subtypes.emb.h @@ -0,0 +1,3920 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_SUBTYPES_EMB_H_ +#define TESTDATA_SUBTYPES_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Out { +namespace In { +namespace InIn { +enum class InInIn : ::std::uint64_t; + + +} // namespace InIn + + +template +class GenericInInView; + + +} // namespace In + + +template +class GenericInView; + + +namespace In2 { + +} // namespace In2 + + +template +class GenericIn2View; + + +} // namespace Out + + +template +class GenericOutView; + + + + + + + + + + + + +namespace Out { + + + + + + + + +namespace In { + + + + + +namespace InIn { +enum class InInIn : ::std::uint64_t { + NO = static_cast(0LL), + YES = static_cast(1LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + InInIn *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("NO", emboss_reserved_local_name)) { + *emboss_reserved_local_result = InInIn::NO; + return true; + } + + if (!strcmp("YES", emboss_reserved_local_name)) { + *emboss_reserved_local_result = InInIn::YES; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + InInIn emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case InInIn::NO: return "NO"; + + case InInIn::YES: return "YES"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(InInIn emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case InInIn::NO: return true; + + case InInIn::YES: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + InInIn 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::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, + InInIn *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + InInIn emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(InInIn emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + InInIn emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +} // namespace InIn + + +template +struct EmbossReservedInternalIsGenericInInView; + +template +class GenericInInView final { + public: + GenericInInView() : backing_() {} + explicit GenericInInView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericInInView( + const GenericInInView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericInInView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericInInView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericInInView &operator=( + const GenericInInView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + using InInIn = ::emboss::test::Out::In::InIn::InInIn; + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_outer_offset().Known()) return false; + if (has_outer_offset().ValueOrDefault() && !outer_offset().Ok()) return false; + + + if (!has_field_enum().Known()) return false; + if (has_field_enum().ValueOrDefault() && !field_enum().Ok()) return false; + + + if (!has_in_2().Known()) return false; + if (has_in_2().ValueOrDefault() && !in_2().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericInInView emboss_reserved_local_other) const { + + if (!has_field_enum().Known()) return false; + if (!emboss_reserved_local_other.has_field_enum().Known()) return false; + + if (emboss_reserved_local_other.has_field_enum().ValueOrDefault() && + !has_field_enum().ValueOrDefault()) + return false; + if (has_field_enum().ValueOrDefault() && + !emboss_reserved_local_other.has_field_enum().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_field_enum().ValueOrDefault() && + has_field_enum().ValueOrDefault() && + !field_enum().Equals(emboss_reserved_local_other.field_enum())) + return false; + + + + if (!has_in_2().Known()) return false; + if (!emboss_reserved_local_other.has_in_2().Known()) return false; + + if (emboss_reserved_local_other.has_in_2().ValueOrDefault() && + !has_in_2().ValueOrDefault()) + return false; + if (has_in_2().ValueOrDefault() && + !emboss_reserved_local_other.has_in_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_2().ValueOrDefault() && + has_in_2().ValueOrDefault() && + !in_2().Equals(emboss_reserved_local_other.in_2())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericInInView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_field_enum().ValueOr(false) && + !has_field_enum().ValueOr(false)) + return false; + if (has_field_enum().ValueOr(false) && + !emboss_reserved_local_other.has_field_enum().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_field_enum().ValueOr(false) && + has_field_enum().ValueOr(false) && + !field_enum().UncheckedEquals(emboss_reserved_local_other.field_enum())) + return false; + + + + if (emboss_reserved_local_other.has_in_2().ValueOr(false) && + !has_in_2().ValueOr(false)) + return false; + if (has_in_2().ValueOr(false) && + !emboss_reserved_local_other.has_in_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_2().ValueOr(false) && + has_in_2().ValueOr(false) && + !in_2().UncheckedEquals(emboss_reserved_local_other.in_2())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericInInView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericInInView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericInInView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "field_enum") { + if (!field_enum().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_2") { + if (!in_2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_outer_offset().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + outer_offset().IsAggregate() || outer_offset().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# outer_offset: "); + outer_offset().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("# outer_offset: UNREADABLE\n"); + } + } + + if (has_field_enum().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + field_enum().IsAggregate() || field_enum().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("field_enum: "); + field_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !field_enum().IsAggregate() && !field_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("# field_enum: UNREADABLE\n"); + } + } + + if (has_in_2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_2().IsAggregate() || in_2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_2: "); + in_2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_2().IsAggregate() && !in_2().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("# in_2: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + class EmbossReservedVirtualOuterOffsetView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualOuterOffsetView() {} + EmbossReservedVirtualOuterOffsetView(const EmbossReservedVirtualOuterOffsetView &) = default; + EmbossReservedVirtualOuterOffsetView(EmbossReservedVirtualOuterOffsetView &&) = default; + EmbossReservedVirtualOuterOffsetView &operator=(const EmbossReservedVirtualOuterOffsetView &) = + default; + EmbossReservedVirtualOuterOffsetView &operator=(EmbossReservedVirtualOuterOffsetView &&) = + default; + ~EmbossReservedVirtualOuterOffsetView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualOuterOffsetView outer_offset() { + return EmbossReservedVirtualOuterOffsetView(); + } + static constexpr ::emboss::support::Maybe has_outer_offset() { + return ::emboss::support::Maybe(true); + } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + field_enum() const; + ::emboss::support::Maybe has_field_enum() const; + + public: + typename ::emboss::test::Out::GenericIn2View> + + in_2() const; + ::emboss::support::Maybe has_in_2() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericInInView; +}; +using InInView = + GenericInInView; +using InInWriter = + GenericInInView; + +template +struct EmbossReservedInternalIsGenericInInView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericInInView< + GenericInInView> { + static constexpr const bool value = true; +}; + +template +inline GenericInInView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeInInView( T &&emboss_reserved_local_arg) { + return GenericInInView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericInInView> +MakeInInView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericInInView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericInInView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedInInView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericInInView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace In + + +template +struct EmbossReservedInternalIsGenericInView; + +template +class GenericInView final { + public: + GenericInView() : backing_() {} + explicit GenericInView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericInView( + const GenericInView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericInView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericInView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericInView &operator=( + const GenericInView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_in_in_1().Known()) return false; + if (has_in_in_1().ValueOrDefault() && !in_in_1().Ok()) return false; + + + if (!has_in_in_2().Known()) return false; + if (has_in_in_2().ValueOrDefault() && !in_in_2().Ok()) return false; + + + if (!has_in_in_in_1().Known()) return false; + if (has_in_in_in_1().ValueOrDefault() && !in_in_in_1().Ok()) return false; + + + if (!has_in_2().Known()) return false; + if (has_in_2().ValueOrDefault() && !in_2().Ok()) return false; + + + if (!has_name_collision().Known()) return false; + if (has_name_collision().ValueOrDefault() && !name_collision().Ok()) return false; + + + if (!has_name_collision_check().Known()) return false; + if (has_name_collision_check().ValueOrDefault() && !name_collision_check().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericInView emboss_reserved_local_other) const { + + if (!has_in_in_1().Known()) return false; + if (!emboss_reserved_local_other.has_in_in_1().Known()) return false; + + if (emboss_reserved_local_other.has_in_in_1().ValueOrDefault() && + !has_in_in_1().ValueOrDefault()) + return false; + if (has_in_in_1().ValueOrDefault() && + !emboss_reserved_local_other.has_in_in_1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_in_1().ValueOrDefault() && + has_in_in_1().ValueOrDefault() && + !in_in_1().Equals(emboss_reserved_local_other.in_in_1())) + return false; + + + + if (!has_in_in_2().Known()) return false; + if (!emboss_reserved_local_other.has_in_in_2().Known()) return false; + + if (emboss_reserved_local_other.has_in_in_2().ValueOrDefault() && + !has_in_in_2().ValueOrDefault()) + return false; + if (has_in_in_2().ValueOrDefault() && + !emboss_reserved_local_other.has_in_in_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_in_2().ValueOrDefault() && + has_in_in_2().ValueOrDefault() && + !in_in_2().Equals(emboss_reserved_local_other.in_in_2())) + return false; + + + + if (!has_in_in_in_1().Known()) return false; + if (!emboss_reserved_local_other.has_in_in_in_1().Known()) return false; + + if (emboss_reserved_local_other.has_in_in_in_1().ValueOrDefault() && + !has_in_in_in_1().ValueOrDefault()) + return false; + if (has_in_in_in_1().ValueOrDefault() && + !emboss_reserved_local_other.has_in_in_in_1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_in_in_1().ValueOrDefault() && + has_in_in_in_1().ValueOrDefault() && + !in_in_in_1().Equals(emboss_reserved_local_other.in_in_in_1())) + return false; + + + + if (!has_in_2().Known()) return false; + if (!emboss_reserved_local_other.has_in_2().Known()) return false; + + if (emboss_reserved_local_other.has_in_2().ValueOrDefault() && + !has_in_2().ValueOrDefault()) + return false; + if (has_in_2().ValueOrDefault() && + !emboss_reserved_local_other.has_in_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_2().ValueOrDefault() && + has_in_2().ValueOrDefault() && + !in_2().Equals(emboss_reserved_local_other.in_2())) + return false; + + + + if (!has_name_collision().Known()) return false; + if (!emboss_reserved_local_other.has_name_collision().Known()) return false; + + if (emboss_reserved_local_other.has_name_collision().ValueOrDefault() && + !has_name_collision().ValueOrDefault()) + return false; + if (has_name_collision().ValueOrDefault() && + !emboss_reserved_local_other.has_name_collision().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_name_collision().ValueOrDefault() && + has_name_collision().ValueOrDefault() && + !name_collision().Equals(emboss_reserved_local_other.name_collision())) + return false; + + + + if (!has_name_collision_check().Known()) return false; + if (!emboss_reserved_local_other.has_name_collision_check().Known()) return false; + + if (emboss_reserved_local_other.has_name_collision_check().ValueOrDefault() && + !has_name_collision_check().ValueOrDefault()) + return false; + if (has_name_collision_check().ValueOrDefault() && + !emboss_reserved_local_other.has_name_collision_check().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_name_collision_check().ValueOrDefault() && + has_name_collision_check().ValueOrDefault() && + !name_collision_check().Equals(emboss_reserved_local_other.name_collision_check())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericInView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_in_in_1().ValueOr(false) && + !has_in_in_1().ValueOr(false)) + return false; + if (has_in_in_1().ValueOr(false) && + !emboss_reserved_local_other.has_in_in_1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_in_1().ValueOr(false) && + has_in_in_1().ValueOr(false) && + !in_in_1().UncheckedEquals(emboss_reserved_local_other.in_in_1())) + return false; + + + + if (emboss_reserved_local_other.has_in_in_2().ValueOr(false) && + !has_in_in_2().ValueOr(false)) + return false; + if (has_in_in_2().ValueOr(false) && + !emboss_reserved_local_other.has_in_in_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_in_2().ValueOr(false) && + has_in_in_2().ValueOr(false) && + !in_in_2().UncheckedEquals(emboss_reserved_local_other.in_in_2())) + return false; + + + + if (emboss_reserved_local_other.has_in_in_in_1().ValueOr(false) && + !has_in_in_in_1().ValueOr(false)) + return false; + if (has_in_in_in_1().ValueOr(false) && + !emboss_reserved_local_other.has_in_in_in_1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_in_in_1().ValueOr(false) && + has_in_in_in_1().ValueOr(false) && + !in_in_in_1().UncheckedEquals(emboss_reserved_local_other.in_in_in_1())) + return false; + + + + if (emboss_reserved_local_other.has_in_2().ValueOr(false) && + !has_in_2().ValueOr(false)) + return false; + if (has_in_2().ValueOr(false) && + !emboss_reserved_local_other.has_in_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_2().ValueOr(false) && + has_in_2().ValueOr(false) && + !in_2().UncheckedEquals(emboss_reserved_local_other.in_2())) + return false; + + + + if (emboss_reserved_local_other.has_name_collision().ValueOr(false) && + !has_name_collision().ValueOr(false)) + return false; + if (has_name_collision().ValueOr(false) && + !emboss_reserved_local_other.has_name_collision().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_name_collision().ValueOr(false) && + has_name_collision().ValueOr(false) && + !name_collision().UncheckedEquals(emboss_reserved_local_other.name_collision())) + return false; + + + + if (emboss_reserved_local_other.has_name_collision_check().ValueOr(false) && + !has_name_collision_check().ValueOr(false)) + return false; + if (has_name_collision_check().ValueOr(false) && + !emboss_reserved_local_other.has_name_collision_check().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_name_collision_check().ValueOr(false) && + has_name_collision_check().ValueOr(false) && + !name_collision_check().UncheckedEquals(emboss_reserved_local_other.name_collision_check())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericInView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericInView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericInView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "in_in_1") { + if (!in_in_1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_in_2") { + if (!in_in_2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_in_in_1") { + if (!in_in_in_1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_2") { + if (!in_2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "name_collision") { + if (!name_collision().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "name_collision_check") { + if (!name_collision_check().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_in_in_1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_in_1().IsAggregate() || in_in_1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_in_1: "); + in_in_1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_in_1().IsAggregate() && !in_in_1().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("# in_in_1: UNREADABLE\n"); + } + } + + if (has_in_in_2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_in_2().IsAggregate() || in_in_2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_in_2: "); + in_in_2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_in_2().IsAggregate() && !in_in_2().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("# in_in_2: UNREADABLE\n"); + } + } + + if (has_in_in_in_1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_in_in_1().IsAggregate() || in_in_in_1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_in_in_1: "); + in_in_in_1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_in_in_1().IsAggregate() && !in_in_in_1().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("# in_in_in_1: UNREADABLE\n"); + } + } + + if (has_in_2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_2().IsAggregate() || in_2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_2: "); + in_2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_2().IsAggregate() && !in_2().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("# in_2: UNREADABLE\n"); + } + } + + if (has_name_collision().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + name_collision().IsAggregate() || name_collision().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("name_collision: "); + name_collision().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !name_collision().IsAggregate() && !name_collision().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("# name_collision: UNREADABLE\n"); + } + } + + if (has_name_collision_check().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + name_collision_check().IsAggregate() || name_collision_check().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("name_collision_check: "); + name_collision_check().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !name_collision_check().IsAggregate() && !name_collision_check().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("# name_collision_check: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::Out::In::GenericInInView> + + in_in_1() const; + ::emboss::support::Maybe has_in_in_1() const; + + public: + typename ::emboss::test::Out::In::GenericInInView> + + in_in_2() const; + ::emboss::support::Maybe has_in_in_2() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + in_in_in_1() const; + ::emboss::support::Maybe has_in_in_in_1() const; + + public: + typename ::emboss::test::Out::GenericIn2View> + + in_2() const; + ::emboss::support::Maybe has_in_2() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + name_collision() const; + ::emboss::support::Maybe has_name_collision() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + name_collision_check() const; + ::emboss::support::Maybe has_name_collision_check() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericInView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.name_collision(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(4LL)), ::emboss::support::Maybe(static_cast(5LL)), ::emboss::support::Maybe(static_cast(6LL)), ::emboss::support::Maybe(static_cast(7LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericInView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericInView; +}; +using InView = + GenericInView; +using InWriter = + GenericInView; + +template +struct EmbossReservedInternalIsGenericInView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericInView< + GenericInView> { + static constexpr const bool value = true; +}; + +template +inline GenericInView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeInView( T &&emboss_reserved_local_arg) { + return GenericInView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericInView> +MakeInView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericInView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericInView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedInView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericInView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace In2 { + +} // namespace In2 + + +template +struct EmbossReservedInternalIsGenericIn2View; + +template +class GenericIn2View final { + public: + GenericIn2View() : backing_() {} + explicit GenericIn2View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericIn2View( + const GenericIn2View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericIn2View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericIn2View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericIn2View &operator=( + const GenericIn2View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_field_byte().Known()) return false; + if (has_field_byte().ValueOrDefault() && !field_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericIn2View emboss_reserved_local_other) const { + + if (!has_field_byte().Known()) return false; + if (!emboss_reserved_local_other.has_field_byte().Known()) return false; + + if (emboss_reserved_local_other.has_field_byte().ValueOrDefault() && + !has_field_byte().ValueOrDefault()) + return false; + if (has_field_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_field_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_field_byte().ValueOrDefault() && + has_field_byte().ValueOrDefault() && + !field_byte().Equals(emboss_reserved_local_other.field_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericIn2View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_field_byte().ValueOr(false) && + !has_field_byte().ValueOr(false)) + return false; + if (has_field_byte().ValueOr(false) && + !emboss_reserved_local_other.has_field_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_field_byte().ValueOr(false) && + has_field_byte().ValueOr(false) && + !field_byte().UncheckedEquals(emboss_reserved_local_other.field_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericIn2View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericIn2View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericIn2View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "field_byte") { + if (!field_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_field_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + field_byte().IsAggregate() || field_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("field_byte: "); + field_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !field_byte().IsAggregate() && !field_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("# field_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + field_byte() const; + ::emboss::support::Maybe has_field_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericIn2View; +}; +using In2View = + GenericIn2View; +using In2Writer = + GenericIn2View; + +template +struct EmbossReservedInternalIsGenericIn2View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericIn2View< + GenericIn2View> { + static constexpr const bool value = true; +}; + +template +inline GenericIn2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeIn2View( T &&emboss_reserved_local_arg) { + return GenericIn2View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericIn2View> +MakeIn2View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericIn2View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericIn2View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedIn2View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericIn2View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace Out + + +template +struct EmbossReservedInternalIsGenericOutView; + +template +class GenericOutView final { + public: + GenericOutView() : backing_() {} + explicit GenericOutView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericOutView( + const GenericOutView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericOutView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericOutView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericOutView &operator=( + const GenericOutView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_in_1().Known()) return false; + if (has_in_1().ValueOrDefault() && !in_1().Ok()) return false; + + + if (!has_in_2().Known()) return false; + if (has_in_2().ValueOrDefault() && !in_2().Ok()) return false; + + + if (!has_in_in_1().Known()) return false; + if (has_in_in_1().ValueOrDefault() && !in_in_1().Ok()) return false; + + + if (!has_in_in_2().Known()) return false; + if (has_in_in_2().ValueOrDefault() && !in_in_2().Ok()) return false; + + + if (!has_in_in_in_1().Known()) return false; + if (has_in_in_in_1().ValueOrDefault() && !in_in_in_1().Ok()) return false; + + + if (!has_in_in_in_2().Known()) return false; + if (has_in_in_in_2().ValueOrDefault() && !in_in_in_2().Ok()) return false; + + + if (!has_name_collision().Known()) return false; + if (has_name_collision().ValueOrDefault() && !name_collision().Ok()) return false; + + + if (!has_nested_constant_check().Known()) return false; + if (has_nested_constant_check().ValueOrDefault() && !nested_constant_check().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericOutView emboss_reserved_local_other) const { + + if (!has_in_1().Known()) return false; + if (!emboss_reserved_local_other.has_in_1().Known()) return false; + + if (emboss_reserved_local_other.has_in_1().ValueOrDefault() && + !has_in_1().ValueOrDefault()) + return false; + if (has_in_1().ValueOrDefault() && + !emboss_reserved_local_other.has_in_1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_1().ValueOrDefault() && + has_in_1().ValueOrDefault() && + !in_1().Equals(emboss_reserved_local_other.in_1())) + return false; + + + + if (!has_in_2().Known()) return false; + if (!emboss_reserved_local_other.has_in_2().Known()) return false; + + if (emboss_reserved_local_other.has_in_2().ValueOrDefault() && + !has_in_2().ValueOrDefault()) + return false; + if (has_in_2().ValueOrDefault() && + !emboss_reserved_local_other.has_in_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_2().ValueOrDefault() && + has_in_2().ValueOrDefault() && + !in_2().Equals(emboss_reserved_local_other.in_2())) + return false; + + + + if (!has_in_in_1().Known()) return false; + if (!emboss_reserved_local_other.has_in_in_1().Known()) return false; + + if (emboss_reserved_local_other.has_in_in_1().ValueOrDefault() && + !has_in_in_1().ValueOrDefault()) + return false; + if (has_in_in_1().ValueOrDefault() && + !emboss_reserved_local_other.has_in_in_1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_in_1().ValueOrDefault() && + has_in_in_1().ValueOrDefault() && + !in_in_1().Equals(emboss_reserved_local_other.in_in_1())) + return false; + + + + if (!has_in_in_2().Known()) return false; + if (!emboss_reserved_local_other.has_in_in_2().Known()) return false; + + if (emboss_reserved_local_other.has_in_in_2().ValueOrDefault() && + !has_in_in_2().ValueOrDefault()) + return false; + if (has_in_in_2().ValueOrDefault() && + !emboss_reserved_local_other.has_in_in_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_in_2().ValueOrDefault() && + has_in_in_2().ValueOrDefault() && + !in_in_2().Equals(emboss_reserved_local_other.in_in_2())) + return false; + + + + if (!has_in_in_in_1().Known()) return false; + if (!emboss_reserved_local_other.has_in_in_in_1().Known()) return false; + + if (emboss_reserved_local_other.has_in_in_in_1().ValueOrDefault() && + !has_in_in_in_1().ValueOrDefault()) + return false; + if (has_in_in_in_1().ValueOrDefault() && + !emboss_reserved_local_other.has_in_in_in_1().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_in_in_1().ValueOrDefault() && + has_in_in_in_1().ValueOrDefault() && + !in_in_in_1().Equals(emboss_reserved_local_other.in_in_in_1())) + return false; + + + + if (!has_in_in_in_2().Known()) return false; + if (!emboss_reserved_local_other.has_in_in_in_2().Known()) return false; + + if (emboss_reserved_local_other.has_in_in_in_2().ValueOrDefault() && + !has_in_in_in_2().ValueOrDefault()) + return false; + if (has_in_in_in_2().ValueOrDefault() && + !emboss_reserved_local_other.has_in_in_in_2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_in_in_in_2().ValueOrDefault() && + has_in_in_in_2().ValueOrDefault() && + !in_in_in_2().Equals(emboss_reserved_local_other.in_in_in_2())) + return false; + + + + if (!has_name_collision().Known()) return false; + if (!emboss_reserved_local_other.has_name_collision().Known()) return false; + + if (emboss_reserved_local_other.has_name_collision().ValueOrDefault() && + !has_name_collision().ValueOrDefault()) + return false; + if (has_name_collision().ValueOrDefault() && + !emboss_reserved_local_other.has_name_collision().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_name_collision().ValueOrDefault() && + has_name_collision().ValueOrDefault() && + !name_collision().Equals(emboss_reserved_local_other.name_collision())) + return false; + + + + if (!has_nested_constant_check().Known()) return false; + if (!emboss_reserved_local_other.has_nested_constant_check().Known()) return false; + + if (emboss_reserved_local_other.has_nested_constant_check().ValueOrDefault() && + !has_nested_constant_check().ValueOrDefault()) + return false; + if (has_nested_constant_check().ValueOrDefault() && + !emboss_reserved_local_other.has_nested_constant_check().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_nested_constant_check().ValueOrDefault() && + has_nested_constant_check().ValueOrDefault() && + !nested_constant_check().Equals(emboss_reserved_local_other.nested_constant_check())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericOutView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_in_1().ValueOr(false) && + !has_in_1().ValueOr(false)) + return false; + if (has_in_1().ValueOr(false) && + !emboss_reserved_local_other.has_in_1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_1().ValueOr(false) && + has_in_1().ValueOr(false) && + !in_1().UncheckedEquals(emboss_reserved_local_other.in_1())) + return false; + + + + if (emboss_reserved_local_other.has_in_2().ValueOr(false) && + !has_in_2().ValueOr(false)) + return false; + if (has_in_2().ValueOr(false) && + !emboss_reserved_local_other.has_in_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_2().ValueOr(false) && + has_in_2().ValueOr(false) && + !in_2().UncheckedEquals(emboss_reserved_local_other.in_2())) + return false; + + + + if (emboss_reserved_local_other.has_in_in_1().ValueOr(false) && + !has_in_in_1().ValueOr(false)) + return false; + if (has_in_in_1().ValueOr(false) && + !emboss_reserved_local_other.has_in_in_1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_in_1().ValueOr(false) && + has_in_in_1().ValueOr(false) && + !in_in_1().UncheckedEquals(emboss_reserved_local_other.in_in_1())) + return false; + + + + if (emboss_reserved_local_other.has_in_in_2().ValueOr(false) && + !has_in_in_2().ValueOr(false)) + return false; + if (has_in_in_2().ValueOr(false) && + !emboss_reserved_local_other.has_in_in_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_in_2().ValueOr(false) && + has_in_in_2().ValueOr(false) && + !in_in_2().UncheckedEquals(emboss_reserved_local_other.in_in_2())) + return false; + + + + if (emboss_reserved_local_other.has_in_in_in_1().ValueOr(false) && + !has_in_in_in_1().ValueOr(false)) + return false; + if (has_in_in_in_1().ValueOr(false) && + !emboss_reserved_local_other.has_in_in_in_1().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_in_in_1().ValueOr(false) && + has_in_in_in_1().ValueOr(false) && + !in_in_in_1().UncheckedEquals(emboss_reserved_local_other.in_in_in_1())) + return false; + + + + if (emboss_reserved_local_other.has_in_in_in_2().ValueOr(false) && + !has_in_in_in_2().ValueOr(false)) + return false; + if (has_in_in_in_2().ValueOr(false) && + !emboss_reserved_local_other.has_in_in_in_2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_in_in_in_2().ValueOr(false) && + has_in_in_in_2().ValueOr(false) && + !in_in_in_2().UncheckedEquals(emboss_reserved_local_other.in_in_in_2())) + return false; + + + + if (emboss_reserved_local_other.has_name_collision().ValueOr(false) && + !has_name_collision().ValueOr(false)) + return false; + if (has_name_collision().ValueOr(false) && + !emboss_reserved_local_other.has_name_collision().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_name_collision().ValueOr(false) && + has_name_collision().ValueOr(false) && + !name_collision().UncheckedEquals(emboss_reserved_local_other.name_collision())) + return false; + + + + if (emboss_reserved_local_other.has_nested_constant_check().ValueOr(false) && + !has_nested_constant_check().ValueOr(false)) + return false; + if (has_nested_constant_check().ValueOr(false) && + !emboss_reserved_local_other.has_nested_constant_check().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_nested_constant_check().ValueOr(false) && + has_nested_constant_check().ValueOr(false) && + !nested_constant_check().UncheckedEquals(emboss_reserved_local_other.nested_constant_check())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericOutView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericOutView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericOutView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "in_1") { + if (!in_1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_2") { + if (!in_2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_in_1") { + if (!in_in_1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_in_2") { + if (!in_in_2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_in_in_1") { + if (!in_in_in_1().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "in_in_in_2") { + if (!in_in_in_2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "name_collision") { + if (!name_collision().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "nested_constant_check") { + if (!nested_constant_check().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_in_1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_1().IsAggregate() || in_1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_1: "); + in_1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_1().IsAggregate() && !in_1().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("# in_1: UNREADABLE\n"); + } + } + + if (has_in_2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_2().IsAggregate() || in_2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_2: "); + in_2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_2().IsAggregate() && !in_2().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("# in_2: UNREADABLE\n"); + } + } + + if (has_in_in_1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_in_1().IsAggregate() || in_in_1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_in_1: "); + in_in_1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_in_1().IsAggregate() && !in_in_1().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("# in_in_1: UNREADABLE\n"); + } + } + + if (has_in_in_2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_in_2().IsAggregate() || in_in_2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_in_2: "); + in_in_2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_in_2().IsAggregate() && !in_in_2().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("# in_in_2: UNREADABLE\n"); + } + } + + if (has_in_in_in_1().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_in_in_1().IsAggregate() || in_in_in_1().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_in_in_1: "); + in_in_in_1().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_in_in_1().IsAggregate() && !in_in_in_1().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("# in_in_in_1: UNREADABLE\n"); + } + } + + if (has_in_in_in_2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + in_in_in_2().IsAggregate() || in_in_in_2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("in_in_in_2: "); + in_in_in_2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !in_in_in_2().IsAggregate() && !in_in_in_2().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("# in_in_in_2: UNREADABLE\n"); + } + } + + if (has_name_collision().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + name_collision().IsAggregate() || name_collision().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("name_collision: "); + name_collision().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !name_collision().IsAggregate() && !name_collision().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("# name_collision: UNREADABLE\n"); + } + } + + if (has_nested_constant_check().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + nested_constant_check().IsAggregate() || nested_constant_check().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("nested_constant_check: "); + nested_constant_check().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !nested_constant_check().IsAggregate() && !nested_constant_check().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("# nested_constant_check: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::Out::GenericInView> + + in_1() const; + ::emboss::support::Maybe has_in_1() const; + + public: + typename ::emboss::test::Out::GenericInView> + + in_2() const; + ::emboss::support::Maybe has_in_2() const; + + public: + typename ::emboss::test::Out::In::GenericInInView> + + in_in_1() const; + ::emboss::support::Maybe has_in_in_1() const; + + public: + typename ::emboss::test::Out::In::GenericInInView> + + in_in_2() const; + ::emboss::support::Maybe has_in_in_2() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + in_in_in_1() const; + ::emboss::support::Maybe has_in_in_in_1() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + in_in_in_2() const; + ::emboss::support::Maybe has_in_in_in_2() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + name_collision() const; + ::emboss::support::Maybe has_name_collision() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + nested_constant_check() const; + ::emboss::support::Maybe has_nested_constant_check() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericOutView; +}; +using OutView = + GenericOutView; +using OutWriter = + GenericOutView; + +template +struct EmbossReservedInternalIsGenericOutView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericOutView< + GenericOutView> { + static constexpr const bool value = true; +}; + +template +inline GenericOutView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeOutView( T &&emboss_reserved_local_arg) { + return GenericOutView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericOutView> +MakeOutView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOutView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericOutView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedOutView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericOutView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Out { +namespace In { +namespace InIn { + +} // namespace InIn + + +namespace InIn { +inline constexpr ::std::int32_t outer_offset() { + return ::emboss::support::Maybe(static_cast(24LL)).ValueOrDefault(); +} +} // namespace InIn + +template +inline constexpr ::std::int32_t +GenericInInView::EmbossReservedVirtualOuterOffsetView::Read() { + return InIn::outer_offset(); +} + +template +inline constexpr ::std::int32_t +GenericInInView< + Storage>::EmbossReservedVirtualOuterOffsetView::UncheckedRead() { + return InIn::outer_offset(); +} + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericInInView::field_enum() + const { + + if ( has_field_enum().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInInView::has_field_enum() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::Out::GenericIn2View> + + GenericInInView::in_2() + const { + + if ( has_in_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Out::GenericIn2View> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Out::GenericIn2View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInInView::has_in_2() const { + return ::emboss::support::Maybe(true); +} + + +namespace InIn { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace InIn + +template +inline constexpr ::std::int32_t +GenericInInView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return InIn::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInInView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return InIn::IntrinsicSizeInBytes(); +} + +namespace InIn { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace InIn + +template +inline constexpr ::std::int32_t +GenericInInView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return InIn::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInInView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return InIn::MaxSizeInBytes(); +} + +namespace InIn { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace InIn + +template +inline constexpr ::std::int32_t +GenericInInView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return InIn::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInInView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return InIn::MinSizeInBytes(); +} + +} // namespace In + + +template +inline typename ::emboss::test::Out::In::GenericInInView> + + GenericInView::in_in_1() + const { + + if ( has_in_in_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Out::In::GenericInInView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Out::In::GenericInInView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInView::has_in_in_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::Out::In::GenericInInView> + + GenericInView::in_in_2() + const { + + if ( has_in_in_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Out::In::GenericInInView> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Out::In::GenericInInView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInView::has_in_in_2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericInView::in_in_in_1() + const { + + if ( has_in_in_in_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInView::has_in_in_in_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::Out::GenericIn2View> + + GenericInView::in_2() + const { + + if ( has_in_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(5LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Out::GenericIn2View> + +( + backing_ + .template GetOffsetStorage<0, + 5>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Out::GenericIn2View> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInView::has_in_2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericInView::name_collision() + const { + + if ( has_name_collision().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInView::has_name_collision() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericInView::name_collision_check() + const { + + if ( has_name_collision_check().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = name_collision(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<1, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericInView::has_name_collision_check() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericInView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericInView::IntrinsicSizeInBytes() const { + return + typename GenericInView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericInView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace In { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(256LL)).ValueOrDefault(); +} +} // namespace In + +template +inline constexpr ::std::int32_t +GenericInView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return In::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return In::MaxSizeInBytes(); +} + +namespace In { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(7LL)).ValueOrDefault(); +} +} // namespace In + +template +inline constexpr ::std::int32_t +GenericInView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return In::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericInView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return In::MinSizeInBytes(); +} + +namespace In2 { + +} // namespace In2 + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericIn2View::field_byte() + const { + + if ( has_field_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericIn2View::has_field_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace In2 { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace In2 + +template +inline constexpr ::std::int32_t +GenericIn2View::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return In2::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericIn2View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return In2::IntrinsicSizeInBytes(); +} + +namespace In2 { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace In2 + +template +inline constexpr ::std::int32_t +GenericIn2View::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return In2::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericIn2View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return In2::MaxSizeInBytes(); +} + +namespace In2 { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace In2 + +template +inline constexpr ::std::int32_t +GenericIn2View::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return In2::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericIn2View< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return In2::MinSizeInBytes(); +} + +} // namespace Out + + +template +inline typename ::emboss::test::Out::GenericInView> + + GenericOutView::in_1() + const { + + if ( has_in_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Out::GenericInView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Out::GenericInView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOutView::has_in_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::Out::GenericInView> + + GenericOutView::in_2() + const { + + if ( has_in_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(8LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Out::GenericInView> + +( + backing_ + .template GetOffsetStorage<0, + 8>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Out::GenericInView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOutView::has_in_2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::Out::In::GenericInInView> + + GenericOutView::in_in_1() + const { + + if ( has_in_in_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(16LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Out::In::GenericInInView> + +( + backing_ + .template GetOffsetStorage<0, + 16>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Out::In::GenericInInView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOutView::has_in_in_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::Out::In::GenericInInView> + + GenericOutView::in_in_2() + const { + + if ( has_in_in_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(18LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::Out::In::GenericInInView> + +( + backing_ + .template GetOffsetStorage<0, + 18>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::Out::In::GenericInInView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOutView::has_in_in_2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericOutView::in_in_in_1() + const { + + if ( has_in_in_in_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(20LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 20>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOutView::has_in_in_in_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericOutView::in_in_in_2() + const { + + if ( has_in_in_in_2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(21LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 21>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Out::In::InIn::InInIn, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOutView::has_in_in_in_2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericOutView::name_collision() + const { + + if ( has_name_collision().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(22LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 22>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOutView::has_name_collision() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericOutView::nested_constant_check() + const { + + if ( has_nested_constant_check().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(24LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 24>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericOutView::has_nested_constant_check() const { + return ::emboss::support::Maybe(true); +} + + +namespace Out { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(25LL)).ValueOrDefault(); +} +} // namespace Out + +template +inline constexpr ::std::int32_t +GenericOutView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Out::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOutView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Out::IntrinsicSizeInBytes(); +} + +namespace Out { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(25LL)).ValueOrDefault(); +} +} // namespace Out + +template +inline constexpr ::std::int32_t +GenericOutView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Out::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOutView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Out::MaxSizeInBytes(); +} + +namespace Out { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(25LL)).ValueOrDefault(); +} +} // namespace Out + +template +inline constexpr ::std::int32_t +GenericOutView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Out::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericOutView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Out::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_SUBTYPES_EMB_H_ + diff --git a/testdata/golden_cpp/text_format.emb.h b/testdata/golden_cpp/text_format.emb.h new file mode 100644 index 00000000..46f257d1 --- /dev/null +++ b/testdata/golden_cpp/text_format.emb.h @@ -0,0 +1,2165 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_TEXT_FORMAT_EMB_H_ +#define TESTDATA_TEXT_FORMAT_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Vanilla { + +} // namespace Vanilla + + +template +class GenericVanillaView; + +namespace StructWithSkippedFields { + +} // namespace StructWithSkippedFields + + +template +class GenericStructWithSkippedFieldsView; + +namespace StructWithSkippedStructureFields { + +} // namespace StructWithSkippedStructureFields + + +template +class GenericStructWithSkippedStructureFieldsView; + + + + + + +namespace Vanilla { + +} // namespace Vanilla + + +template +struct EmbossReservedInternalIsGenericVanillaView; + +template +class GenericVanillaView final { + public: + GenericVanillaView() : backing_() {} + explicit GenericVanillaView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericVanillaView( + const GenericVanillaView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericVanillaView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericVanillaView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericVanillaView &operator=( + const GenericVanillaView &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericVanillaView 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 + bool UncheckedEquals( + GenericVanillaView 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 + void UncheckedCopyFrom( + GenericVanillaView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericVanillaView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericVanillaView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericVanillaView; +}; +using VanillaView = + GenericVanillaView; +using VanillaWriter = + GenericVanillaView; + +template +struct EmbossReservedInternalIsGenericVanillaView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericVanillaView< + GenericVanillaView> { + static constexpr const bool value = true; +}; + +template +inline GenericVanillaView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeVanillaView( T &&emboss_reserved_local_arg) { + return GenericVanillaView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericVanillaView> +MakeVanillaView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericVanillaView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericVanillaView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedVanillaView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericVanillaView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace StructWithSkippedFields { + +} // namespace StructWithSkippedFields + + +template +struct EmbossReservedInternalIsGenericStructWithSkippedFieldsView; + +template +class GenericStructWithSkippedFieldsView final { + public: + GenericStructWithSkippedFieldsView() : backing_() {} + explicit GenericStructWithSkippedFieldsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructWithSkippedFieldsView( + const GenericStructWithSkippedFieldsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructWithSkippedFieldsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructWithSkippedFieldsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructWithSkippedFieldsView &operator=( + const GenericStructWithSkippedFieldsView &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructWithSkippedFieldsView 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 + bool UncheckedEquals( + GenericStructWithSkippedFieldsView 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 + void UncheckedCopyFrom( + GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructWithSkippedFieldsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + c() const; + ::emboss::support::Maybe 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructWithSkippedFieldsView; +}; +using StructWithSkippedFieldsView = + GenericStructWithSkippedFieldsView; +using StructWithSkippedFieldsWriter = + GenericStructWithSkippedFieldsView; + +template +struct EmbossReservedInternalIsGenericStructWithSkippedFieldsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructWithSkippedFieldsView< + GenericStructWithSkippedFieldsView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructWithSkippedFieldsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructWithSkippedFieldsView( T &&emboss_reserved_local_arg) { + return GenericStructWithSkippedFieldsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructWithSkippedFieldsView> +MakeStructWithSkippedFieldsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructWithSkippedFieldsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructWithSkippedFieldsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructWithSkippedFieldsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructWithSkippedFieldsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace StructWithSkippedStructureFields { + +} // namespace StructWithSkippedStructureFields + + +template +struct EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView; + +template +class GenericStructWithSkippedStructureFieldsView final { + public: + GenericStructWithSkippedStructureFieldsView() : backing_() {} + explicit GenericStructWithSkippedStructureFieldsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructWithSkippedStructureFieldsView( + const GenericStructWithSkippedStructureFieldsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructWithSkippedStructureFieldsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructWithSkippedStructureFieldsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructWithSkippedStructureFieldsView &operator=( + const GenericStructWithSkippedStructureFieldsView &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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructWithSkippedStructureFieldsView 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 + bool UncheckedEquals( + GenericStructWithSkippedStructureFieldsView 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 + void UncheckedCopyFrom( + GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructWithSkippedStructureFieldsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericVanillaView> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::test::GenericVanillaView> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + typename ::emboss::test::GenericVanillaView> + + c() const; + ::emboss::support::Maybe 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructWithSkippedStructureFieldsView; +}; +using StructWithSkippedStructureFieldsView = + GenericStructWithSkippedStructureFieldsView; +using StructWithSkippedStructureFieldsWriter = + GenericStructWithSkippedStructureFieldsView; + +template +struct EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructWithSkippedStructureFieldsView< + GenericStructWithSkippedStructureFieldsView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructWithSkippedStructureFieldsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructWithSkippedStructureFieldsView( T &&emboss_reserved_local_arg) { + return GenericStructWithSkippedStructureFieldsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructWithSkippedStructureFieldsView> +MakeStructWithSkippedStructureFieldsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructWithSkippedStructureFieldsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructWithSkippedStructureFieldsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructWithSkippedStructureFieldsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructWithSkippedStructureFieldsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Vanilla { + +} // namespace Vanilla + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericVanillaView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericVanillaView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericVanillaView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericVanillaView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +namespace Vanilla { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Vanilla + +template +inline constexpr ::std::int32_t +GenericVanillaView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Vanilla::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericVanillaView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Vanilla::IntrinsicSizeInBytes(); +} + +namespace Vanilla { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Vanilla + +template +inline constexpr ::std::int32_t +GenericVanillaView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Vanilla::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericVanillaView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Vanilla::MaxSizeInBytes(); +} + +namespace Vanilla { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace Vanilla + +template +inline constexpr ::std::int32_t +GenericVanillaView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Vanilla::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericVanillaView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Vanilla::MinSizeInBytes(); +} +namespace StructWithSkippedFields { + +} // namespace StructWithSkippedFields + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericStructWithSkippedFieldsView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructWithSkippedFieldsView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericStructWithSkippedFieldsView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructWithSkippedFieldsView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericStructWithSkippedFieldsView::c() + const { + + if ( has_c().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructWithSkippedFieldsView::has_c() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructWithSkippedFields { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace StructWithSkippedFields + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedFieldsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructWithSkippedFields::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedFieldsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructWithSkippedFields::IntrinsicSizeInBytes(); +} + +namespace StructWithSkippedFields { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace StructWithSkippedFields + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedFieldsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructWithSkippedFields::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedFieldsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructWithSkippedFields::MaxSizeInBytes(); +} + +namespace StructWithSkippedFields { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace StructWithSkippedFields + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedFieldsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructWithSkippedFields::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedFieldsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructWithSkippedFields::MinSizeInBytes(); +} +namespace StructWithSkippedStructureFields { + +} // namespace StructWithSkippedStructureFields + + +template +inline typename ::emboss::test::GenericVanillaView> + + GenericStructWithSkippedStructureFieldsView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericVanillaView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericVanillaView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructWithSkippedStructureFieldsView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericVanillaView> + + GenericStructWithSkippedStructureFieldsView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericVanillaView> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericVanillaView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructWithSkippedStructureFieldsView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericVanillaView> + + GenericStructWithSkippedStructureFieldsView::c() + const { + + if ( has_c().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericVanillaView> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericVanillaView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructWithSkippedStructureFieldsView::has_c() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructWithSkippedStructureFields { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(6LL)).ValueOrDefault(); +} +} // namespace StructWithSkippedStructureFields + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedStructureFieldsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructWithSkippedStructureFields::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedStructureFieldsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructWithSkippedStructureFields::IntrinsicSizeInBytes(); +} + +namespace StructWithSkippedStructureFields { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(6LL)).ValueOrDefault(); +} +} // namespace StructWithSkippedStructureFields + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedStructureFieldsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructWithSkippedStructureFields::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedStructureFieldsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructWithSkippedStructureFields::MaxSizeInBytes(); +} + +namespace StructWithSkippedStructureFields { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(6LL)).ValueOrDefault(); +} +} // namespace StructWithSkippedStructureFields + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedStructureFieldsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructWithSkippedStructureFields::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructWithSkippedStructureFieldsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructWithSkippedStructureFields::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_TEXT_FORMAT_EMB_H_ + diff --git a/testdata/golden_cpp/uint_sizes.emb.h b/testdata/golden_cpp/uint_sizes.emb.h new file mode 100644 index 00000000..df5eb3f3 --- /dev/null +++ b/testdata/golden_cpp/uint_sizes.emb.h @@ -0,0 +1,8942 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_UINT_SIZES_EMB_H_ +#define TESTDATA_UINT_SIZES_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace Sizes { + +} // namespace Sizes + + +template +class GenericSizesView; + +namespace BigEndianSizes { + +} // namespace BigEndianSizes + + +template +class GenericBigEndianSizesView; + +namespace AlternatingEndianSizes { + +} // namespace AlternatingEndianSizes + + +template +class GenericAlternatingEndianSizesView; + +namespace EnumSizes { + +} // namespace EnumSizes + + +template +class GenericEnumSizesView; + +namespace ExplicitlySizedEnumSizes { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +class GenericEmbossReservedAnonymousField1View; + + +} // namespace ExplicitlySizedEnumSizes + + +template +class GenericExplicitlySizedEnumSizesView; + +enum class Enum : ::std::uint64_t; + +enum class ExplicitlySizedEnum : ::std::uint32_t; + +namespace ArraySizes { + +} // namespace ArraySizes + + +template +class GenericArraySizesView; + + + + + + + + + + + + +namespace Sizes { + +} // namespace Sizes + + +template +struct EmbossReservedInternalIsGenericSizesView; + +template +class GenericSizesView final { + public: + GenericSizesView() : backing_() {} + explicit GenericSizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericSizesView( + const GenericSizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericSizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericSizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericSizesView &operator=( + const GenericSizesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_three_byte().Known()) return false; + if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + + if (!has_five_byte().Known()) return false; + if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + + if (!has_six_byte().Known()) return false; + if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + + + if (!has_seven_byte().Known()) return false; + if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + + + if (!has_eight_byte().Known()) return false; + if (has_eight_byte().ValueOrDefault() && !eight_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericSizesView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_three_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + !has_three_byte().ValueOrDefault()) + return false; + if (has_three_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + has_three_byte().ValueOrDefault() && + !three_byte().Equals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (!has_five_byte().Known()) return false; + if (!emboss_reserved_local_other.has_five_byte().Known()) return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + !has_five_byte().ValueOrDefault()) + return false; + if (has_five_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_five_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + has_five_byte().ValueOrDefault() && + !five_byte().Equals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (!has_six_byte().Known()) return false; + if (!emboss_reserved_local_other.has_six_byte().Known()) return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + !has_six_byte().ValueOrDefault()) + return false; + if (has_six_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_six_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + has_six_byte().ValueOrDefault() && + !six_byte().Equals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (!has_seven_byte().Known()) return false; + if (!emboss_reserved_local_other.has_seven_byte().Known()) return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + !has_seven_byte().ValueOrDefault()) + return false; + if (has_seven_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_seven_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + has_seven_byte().ValueOrDefault() && + !seven_byte().Equals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (!has_eight_byte().Known()) return false; + if (!emboss_reserved_local_other.has_eight_byte().Known()) return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + !has_eight_byte().ValueOrDefault()) + return false; + if (has_eight_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_eight_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + has_eight_byte().ValueOrDefault() && + !eight_byte().Equals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericSizesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + !has_three_byte().ValueOr(false)) + return false; + if (has_three_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + has_three_byte().ValueOr(false) && + !three_byte().UncheckedEquals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + !has_five_byte().ValueOr(false)) + return false; + if (has_five_byte().ValueOr(false) && + !emboss_reserved_local_other.has_five_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + has_five_byte().ValueOr(false) && + !five_byte().UncheckedEquals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + !has_six_byte().ValueOr(false)) + return false; + if (has_six_byte().ValueOr(false) && + !emboss_reserved_local_other.has_six_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + has_six_byte().ValueOr(false) && + !six_byte().UncheckedEquals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + !has_seven_byte().ValueOr(false)) + return false; + if (has_seven_byte().ValueOr(false) && + !emboss_reserved_local_other.has_seven_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + has_seven_byte().ValueOr(false) && + !seven_byte().UncheckedEquals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + !has_eight_byte().ValueOr(false)) + return false; + if (has_eight_byte().ValueOr(false) && + !emboss_reserved_local_other.has_eight_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + has_eight_byte().ValueOr(false) && + !eight_byte().UncheckedEquals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericSizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericSizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericSizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_byte") { + if (!three_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "five_byte") { + if (!five_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_byte") { + if (!six_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "seven_byte") { + if (!seven_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "eight_byte") { + if (!eight_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_three_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_byte().IsAggregate() || three_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_byte: "); + three_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_byte().IsAggregate() && !three_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("# three_byte: UNREADABLE\n"); + } + } + + if (has_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + if (has_five_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + five_byte().IsAggregate() || five_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("five_byte: "); + five_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !five_byte().IsAggregate() && !five_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("# five_byte: UNREADABLE\n"); + } + } + + if (has_six_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_byte().IsAggregate() || six_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_byte: "); + six_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_byte().IsAggregate() && !six_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("# six_byte: UNREADABLE\n"); + } + } + + if (has_seven_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + seven_byte().IsAggregate() || seven_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("seven_byte: "); + seven_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !seven_byte().IsAggregate() && !seven_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("# seven_byte: UNREADABLE\n"); + } + } + + if (has_eight_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + eight_byte().IsAggregate() || eight_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("eight_byte: "); + eight_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !eight_byte().IsAggregate() && !eight_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("# eight_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + three_byte() const; + ::emboss::support::Maybe has_three_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + four_byte() const; + ::emboss::support::Maybe has_four_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + five_byte() const; + ::emboss::support::Maybe has_five_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + six_byte() const; + ::emboss::support::Maybe has_six_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + eight_byte() const; + ::emboss::support::Maybe has_eight_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericSizesView; +}; +using SizesView = + GenericSizesView; +using SizesWriter = + GenericSizesView; + +template +struct EmbossReservedInternalIsGenericSizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericSizesView< + GenericSizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeSizesView( T &&emboss_reserved_local_arg) { + return GenericSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericSizesView> +MakeSizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericSizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedSizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + + + +namespace BigEndianSizes { + +} // namespace BigEndianSizes + + +template +struct EmbossReservedInternalIsGenericBigEndianSizesView; + +template +class GenericBigEndianSizesView final { + public: + GenericBigEndianSizesView() : backing_() {} + explicit GenericBigEndianSizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBigEndianSizesView( + const GenericBigEndianSizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBigEndianSizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBigEndianSizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBigEndianSizesView &operator=( + const GenericBigEndianSizesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_three_byte().Known()) return false; + if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + + if (!has_five_byte().Known()) return false; + if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + + if (!has_six_byte().Known()) return false; + if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + + + if (!has_seven_byte().Known()) return false; + if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + + + if (!has_eight_byte().Known()) return false; + if (has_eight_byte().ValueOrDefault() && !eight_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericBigEndianSizesView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_three_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + !has_three_byte().ValueOrDefault()) + return false; + if (has_three_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + has_three_byte().ValueOrDefault() && + !three_byte().Equals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (!has_five_byte().Known()) return false; + if (!emboss_reserved_local_other.has_five_byte().Known()) return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + !has_five_byte().ValueOrDefault()) + return false; + if (has_five_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_five_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + has_five_byte().ValueOrDefault() && + !five_byte().Equals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (!has_six_byte().Known()) return false; + if (!emboss_reserved_local_other.has_six_byte().Known()) return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + !has_six_byte().ValueOrDefault()) + return false; + if (has_six_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_six_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + has_six_byte().ValueOrDefault() && + !six_byte().Equals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (!has_seven_byte().Known()) return false; + if (!emboss_reserved_local_other.has_seven_byte().Known()) return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + !has_seven_byte().ValueOrDefault()) + return false; + if (has_seven_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_seven_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + has_seven_byte().ValueOrDefault() && + !seven_byte().Equals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (!has_eight_byte().Known()) return false; + if (!emboss_reserved_local_other.has_eight_byte().Known()) return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + !has_eight_byte().ValueOrDefault()) + return false; + if (has_eight_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_eight_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + has_eight_byte().ValueOrDefault() && + !eight_byte().Equals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericBigEndianSizesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + !has_three_byte().ValueOr(false)) + return false; + if (has_three_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + has_three_byte().ValueOr(false) && + !three_byte().UncheckedEquals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + !has_five_byte().ValueOr(false)) + return false; + if (has_five_byte().ValueOr(false) && + !emboss_reserved_local_other.has_five_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + has_five_byte().ValueOr(false) && + !five_byte().UncheckedEquals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + !has_six_byte().ValueOr(false)) + return false; + if (has_six_byte().ValueOr(false) && + !emboss_reserved_local_other.has_six_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + has_six_byte().ValueOr(false) && + !six_byte().UncheckedEquals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + !has_seven_byte().ValueOr(false)) + return false; + if (has_seven_byte().ValueOr(false) && + !emboss_reserved_local_other.has_seven_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + has_seven_byte().ValueOr(false) && + !seven_byte().UncheckedEquals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + !has_eight_byte().ValueOr(false)) + return false; + if (has_eight_byte().ValueOr(false) && + !emboss_reserved_local_other.has_eight_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + has_eight_byte().ValueOr(false) && + !eight_byte().UncheckedEquals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericBigEndianSizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericBigEndianSizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericBigEndianSizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_byte") { + if (!three_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "five_byte") { + if (!five_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_byte") { + if (!six_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "seven_byte") { + if (!seven_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "eight_byte") { + if (!eight_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_three_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_byte().IsAggregate() || three_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_byte: "); + three_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_byte().IsAggregate() && !three_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("# three_byte: UNREADABLE\n"); + } + } + + if (has_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + if (has_five_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + five_byte().IsAggregate() || five_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("five_byte: "); + five_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !five_byte().IsAggregate() && !five_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("# five_byte: UNREADABLE\n"); + } + } + + if (has_six_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_byte().IsAggregate() || six_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_byte: "); + six_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_byte().IsAggregate() && !six_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("# six_byte: UNREADABLE\n"); + } + } + + if (has_seven_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + seven_byte().IsAggregate() || seven_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("seven_byte: "); + seven_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !seven_byte().IsAggregate() && !seven_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("# seven_byte: UNREADABLE\n"); + } + } + + if (has_eight_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + eight_byte().IsAggregate() || eight_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("eight_byte: "); + eight_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !eight_byte().IsAggregate() && !eight_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("# eight_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + three_byte() const; + ::emboss::support::Maybe has_three_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + four_byte() const; + ::emboss::support::Maybe has_four_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + five_byte() const; + ::emboss::support::Maybe has_five_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + six_byte() const; + ::emboss::support::Maybe has_six_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + eight_byte() const; + ::emboss::support::Maybe has_eight_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBigEndianSizesView; +}; +using BigEndianSizesView = + GenericBigEndianSizesView; +using BigEndianSizesWriter = + GenericBigEndianSizesView; + +template +struct EmbossReservedInternalIsGenericBigEndianSizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBigEndianSizesView< + GenericBigEndianSizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericBigEndianSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBigEndianSizesView( T &&emboss_reserved_local_arg) { + return GenericBigEndianSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBigEndianSizesView> +MakeBigEndianSizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBigEndianSizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBigEndianSizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBigEndianSizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBigEndianSizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + + + +namespace AlternatingEndianSizes { + +} // namespace AlternatingEndianSizes + + +template +struct EmbossReservedInternalIsGenericAlternatingEndianSizesView; + +template +class GenericAlternatingEndianSizesView final { + public: + GenericAlternatingEndianSizesView() : backing_() {} + explicit GenericAlternatingEndianSizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericAlternatingEndianSizesView( + const GenericAlternatingEndianSizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericAlternatingEndianSizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericAlternatingEndianSizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericAlternatingEndianSizesView &operator=( + const GenericAlternatingEndianSizesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_three_byte().Known()) return false; + if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + + if (!has_five_byte().Known()) return false; + if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + + if (!has_six_byte().Known()) return false; + if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + + + if (!has_seven_byte().Known()) return false; + if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + + + if (!has_eight_byte().Known()) return false; + if (has_eight_byte().ValueOrDefault() && !eight_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericAlternatingEndianSizesView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_three_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + !has_three_byte().ValueOrDefault()) + return false; + if (has_three_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + has_three_byte().ValueOrDefault() && + !three_byte().Equals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (!has_five_byte().Known()) return false; + if (!emboss_reserved_local_other.has_five_byte().Known()) return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + !has_five_byte().ValueOrDefault()) + return false; + if (has_five_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_five_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + has_five_byte().ValueOrDefault() && + !five_byte().Equals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (!has_six_byte().Known()) return false; + if (!emboss_reserved_local_other.has_six_byte().Known()) return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + !has_six_byte().ValueOrDefault()) + return false; + if (has_six_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_six_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + has_six_byte().ValueOrDefault() && + !six_byte().Equals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (!has_seven_byte().Known()) return false; + if (!emboss_reserved_local_other.has_seven_byte().Known()) return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + !has_seven_byte().ValueOrDefault()) + return false; + if (has_seven_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_seven_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + has_seven_byte().ValueOrDefault() && + !seven_byte().Equals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (!has_eight_byte().Known()) return false; + if (!emboss_reserved_local_other.has_eight_byte().Known()) return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + !has_eight_byte().ValueOrDefault()) + return false; + if (has_eight_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_eight_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + has_eight_byte().ValueOrDefault() && + !eight_byte().Equals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericAlternatingEndianSizesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + !has_three_byte().ValueOr(false)) + return false; + if (has_three_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + has_three_byte().ValueOr(false) && + !three_byte().UncheckedEquals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + !has_five_byte().ValueOr(false)) + return false; + if (has_five_byte().ValueOr(false) && + !emboss_reserved_local_other.has_five_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + has_five_byte().ValueOr(false) && + !five_byte().UncheckedEquals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + !has_six_byte().ValueOr(false)) + return false; + if (has_six_byte().ValueOr(false) && + !emboss_reserved_local_other.has_six_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + has_six_byte().ValueOr(false) && + !six_byte().UncheckedEquals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + !has_seven_byte().ValueOr(false)) + return false; + if (has_seven_byte().ValueOr(false) && + !emboss_reserved_local_other.has_seven_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + has_seven_byte().ValueOr(false) && + !seven_byte().UncheckedEquals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + !has_eight_byte().ValueOr(false)) + return false; + if (has_eight_byte().ValueOr(false) && + !emboss_reserved_local_other.has_eight_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + has_eight_byte().ValueOr(false) && + !eight_byte().UncheckedEquals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericAlternatingEndianSizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericAlternatingEndianSizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericAlternatingEndianSizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_byte") { + if (!three_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "five_byte") { + if (!five_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_byte") { + if (!six_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "seven_byte") { + if (!seven_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "eight_byte") { + if (!eight_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_three_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_byte().IsAggregate() || three_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_byte: "); + three_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_byte().IsAggregate() && !three_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("# three_byte: UNREADABLE\n"); + } + } + + if (has_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + if (has_five_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + five_byte().IsAggregate() || five_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("five_byte: "); + five_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !five_byte().IsAggregate() && !five_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("# five_byte: UNREADABLE\n"); + } + } + + if (has_six_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_byte().IsAggregate() || six_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_byte: "); + six_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_byte().IsAggregate() && !six_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("# six_byte: UNREADABLE\n"); + } + } + + if (has_seven_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + seven_byte().IsAggregate() || seven_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("seven_byte: "); + seven_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !seven_byte().IsAggregate() && !seven_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("# seven_byte: UNREADABLE\n"); + } + } + + if (has_eight_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + eight_byte().IsAggregate() || eight_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("eight_byte: "); + eight_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !eight_byte().IsAggregate() && !eight_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("# eight_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + three_byte() const; + ::emboss::support::Maybe has_three_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + four_byte() const; + ::emboss::support::Maybe has_four_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + five_byte() const; + ::emboss::support::Maybe has_five_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + six_byte() const; + ::emboss::support::Maybe has_six_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + eight_byte() const; + ::emboss::support::Maybe has_eight_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericAlternatingEndianSizesView; +}; +using AlternatingEndianSizesView = + GenericAlternatingEndianSizesView; +using AlternatingEndianSizesWriter = + GenericAlternatingEndianSizesView; + +template +struct EmbossReservedInternalIsGenericAlternatingEndianSizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericAlternatingEndianSizesView< + GenericAlternatingEndianSizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericAlternatingEndianSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeAlternatingEndianSizesView( T &&emboss_reserved_local_arg) { + return GenericAlternatingEndianSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericAlternatingEndianSizesView> +MakeAlternatingEndianSizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAlternatingEndianSizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericAlternatingEndianSizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedAlternatingEndianSizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericAlternatingEndianSizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + + + +namespace EnumSizes { + +} // namespace EnumSizes + + +template +struct EmbossReservedInternalIsGenericEnumSizesView; + +template +class GenericEnumSizesView final { + public: + GenericEnumSizesView() : backing_() {} + explicit GenericEnumSizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEnumSizesView( + const GenericEnumSizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEnumSizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEnumSizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEnumSizesView &operator=( + const GenericEnumSizesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_three_byte().Known()) return false; + if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + + if (!has_five_byte().Known()) return false; + if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + + if (!has_six_byte().Known()) return false; + if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + + + if (!has_seven_byte().Known()) return false; + if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + + + if (!has_eight_byte().Known()) return false; + if (has_eight_byte().ValueOrDefault() && !eight_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericEnumSizesView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_three_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + !has_three_byte().ValueOrDefault()) + return false; + if (has_three_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + has_three_byte().ValueOrDefault() && + !three_byte().Equals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (!has_five_byte().Known()) return false; + if (!emboss_reserved_local_other.has_five_byte().Known()) return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + !has_five_byte().ValueOrDefault()) + return false; + if (has_five_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_five_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + has_five_byte().ValueOrDefault() && + !five_byte().Equals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (!has_six_byte().Known()) return false; + if (!emboss_reserved_local_other.has_six_byte().Known()) return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + !has_six_byte().ValueOrDefault()) + return false; + if (has_six_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_six_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + has_six_byte().ValueOrDefault() && + !six_byte().Equals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (!has_seven_byte().Known()) return false; + if (!emboss_reserved_local_other.has_seven_byte().Known()) return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + !has_seven_byte().ValueOrDefault()) + return false; + if (has_seven_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_seven_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + has_seven_byte().ValueOrDefault() && + !seven_byte().Equals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (!has_eight_byte().Known()) return false; + if (!emboss_reserved_local_other.has_eight_byte().Known()) return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + !has_eight_byte().ValueOrDefault()) + return false; + if (has_eight_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_eight_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + has_eight_byte().ValueOrDefault() && + !eight_byte().Equals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEnumSizesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + !has_three_byte().ValueOr(false)) + return false; + if (has_three_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + has_three_byte().ValueOr(false) && + !three_byte().UncheckedEquals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + !has_five_byte().ValueOr(false)) + return false; + if (has_five_byte().ValueOr(false) && + !emboss_reserved_local_other.has_five_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + has_five_byte().ValueOr(false) && + !five_byte().UncheckedEquals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + !has_six_byte().ValueOr(false)) + return false; + if (has_six_byte().ValueOr(false) && + !emboss_reserved_local_other.has_six_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + has_six_byte().ValueOr(false) && + !six_byte().UncheckedEquals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + !has_seven_byte().ValueOr(false)) + return false; + if (has_seven_byte().ValueOr(false) && + !emboss_reserved_local_other.has_seven_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + has_seven_byte().ValueOr(false) && + !seven_byte().UncheckedEquals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + !has_eight_byte().ValueOr(false)) + return false; + if (has_eight_byte().ValueOr(false) && + !emboss_reserved_local_other.has_eight_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + has_eight_byte().ValueOr(false) && + !eight_byte().UncheckedEquals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEnumSizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericEnumSizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericEnumSizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_byte") { + if (!three_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "five_byte") { + if (!five_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_byte") { + if (!six_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "seven_byte") { + if (!seven_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "eight_byte") { + if (!eight_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_three_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_byte().IsAggregate() || three_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_byte: "); + three_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_byte().IsAggregate() && !three_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("# three_byte: UNREADABLE\n"); + } + } + + if (has_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + if (has_five_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + five_byte().IsAggregate() || five_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("five_byte: "); + five_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !five_byte().IsAggregate() && !five_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("# five_byte: UNREADABLE\n"); + } + } + + if (has_six_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_byte().IsAggregate() || six_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_byte: "); + six_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_byte().IsAggregate() && !six_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("# six_byte: UNREADABLE\n"); + } + } + + if (has_seven_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + seven_byte().IsAggregate() || seven_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("seven_byte: "); + seven_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !seven_byte().IsAggregate() && !seven_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("# seven_byte: UNREADABLE\n"); + } + } + + if (has_eight_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + eight_byte().IsAggregate() || eight_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("eight_byte: "); + eight_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !eight_byte().IsAggregate() && !eight_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("# eight_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + three_byte() const; + ::emboss::support::Maybe has_three_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + four_byte() const; + ::emboss::support::Maybe has_four_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + five_byte() const; + ::emboss::support::Maybe has_five_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + six_byte() const; + ::emboss::support::Maybe has_six_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + eight_byte() const; + ::emboss::support::Maybe has_eight_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEnumSizesView; +}; +using EnumSizesView = + GenericEnumSizesView; +using EnumSizesWriter = + GenericEnumSizesView; + +template +struct EmbossReservedInternalIsGenericEnumSizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEnumSizesView< + GenericEnumSizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericEnumSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEnumSizesView( T &&emboss_reserved_local_arg) { + return GenericEnumSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEnumSizesView> +MakeEnumSizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEnumSizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEnumSizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEnumSizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEnumSizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + +namespace ExplicitlySizedEnumSizes { + + + +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View; + +template +class GenericEmbossReservedAnonymousField1View final { + public: + GenericEmbossReservedAnonymousField1View() : backing_() {} + explicit GenericEmbossReservedAnonymousField1View( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericEmbossReservedAnonymousField1View( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericEmbossReservedAnonymousField1View( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericEmbossReservedAnonymousField1View( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericEmbossReservedAnonymousField1View &operator=( + const GenericEmbossReservedAnonymousField1View &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_three_and_a_half_byte().Known()) return false; + if (has_three_and_a_half_byte().ValueOrDefault() && !three_and_a_half_byte().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (!has_three_and_a_half_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_and_a_half_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_and_a_half_byte().ValueOrDefault() && + !has_three_and_a_half_byte().ValueOrDefault()) + return false; + if (has_three_and_a_half_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_and_a_half_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_and_a_half_byte().ValueOrDefault() && + has_three_and_a_half_byte().ValueOrDefault() && + !three_and_a_half_byte().Equals(emboss_reserved_local_other.three_and_a_half_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_three_and_a_half_byte().ValueOr(false) && + !has_three_and_a_half_byte().ValueOr(false)) + return false; + if (has_three_and_a_half_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_and_a_half_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_and_a_half_byte().ValueOr(false) && + has_three_and_a_half_byte().ValueOr(false) && + !three_and_a_half_byte().UncheckedEquals(emboss_reserved_local_other.three_and_a_half_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericEmbossReservedAnonymousField1View emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "three_and_a_half_byte") { + if (!three_and_a_half_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_three_and_a_half_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_and_a_half_byte().IsAggregate() || three_and_a_half_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_and_a_half_byte: "); + three_and_a_half_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_and_a_half_byte().IsAggregate() && !three_and_a_half_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("# three_and_a_half_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<28, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + three_and_a_half_byte() const; + ::emboss::support::Maybe has_three_and_a_half_byte() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericEmbossReservedAnonymousField1View; +}; +using EmbossReservedAnonymousField1View = + GenericEmbossReservedAnonymousField1View; +using EmbossReservedAnonymousField1Writer = + GenericEmbossReservedAnonymousField1View; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericEmbossReservedAnonymousField1View< + GenericEmbossReservedAnonymousField1View> { + static constexpr const bool value = true; +}; + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeEmbossReservedAnonymousField1View( T &&emboss_reserved_local_arg) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericEmbossReservedAnonymousField1View> +MakeEmbossReservedAnonymousField1View( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedEmbossReservedAnonymousField1View( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericEmbossReservedAnonymousField1View< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace ExplicitlySizedEnumSizes + + +template +struct EmbossReservedInternalIsGenericExplicitlySizedEnumSizesView; + +template +class GenericExplicitlySizedEnumSizesView final { + public: + GenericExplicitlySizedEnumSizesView() : backing_() {} + explicit GenericExplicitlySizedEnumSizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericExplicitlySizedEnumSizesView( + const GenericExplicitlySizedEnumSizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericExplicitlySizedEnumSizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericExplicitlySizedEnumSizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericExplicitlySizedEnumSizesView &operator=( + const GenericExplicitlySizedEnumSizesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_three_byte().Known()) return false; + if (has_three_byte().ValueOrDefault() && !three_byte().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_three_and_a_half_byte().Known()) return false; + if (has_three_and_a_half_byte().ValueOrDefault() && !three_and_a_half_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_three_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + !has_three_byte().ValueOrDefault()) + return false; + if (has_three_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + has_three_byte().ValueOrDefault() && + !three_byte().Equals(emboss_reserved_local_other.three_byte())) + 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; + + return true; + } + template + bool UncheckedEquals( + GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + !has_three_byte().ValueOr(false)) + return false; + if (has_three_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + has_three_byte().ValueOr(false) && + !three_byte().UncheckedEquals(emboss_reserved_local_other.three_byte())) + 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; + + return true; + } + template + void UncheckedCopyFrom( + GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericExplicitlySizedEnumSizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_byte") { + if (!three_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_and_a_half_byte") { + if (!three_and_a_half_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_three_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_byte().IsAggregate() || three_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_byte: "); + three_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_byte().IsAggregate() && !three_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("# three_byte: UNREADABLE\n"); + } + } + + if (has_three_and_a_half_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_and_a_half_byte().IsAggregate() || three_and_a_half_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_and_a_half_byte: "); + three_and_a_half_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_and_a_half_byte().IsAggregate() && !three_and_a_half_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("# three_and_a_half_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + three_byte() const; + ::emboss::support::Maybe has_three_byte() const; + + private: + typename ::emboss::test::ExplicitlySizedEnumSizes::GenericEmbossReservedAnonymousField1View>, 32>> + + emboss_reserved_anonymous_field_1() const; + ::emboss::support::Maybe has_emboss_reserved_anonymous_field_1() const; + + public: + auto three_and_a_half_byte() const -> decltype(this->emboss_reserved_anonymous_field_1().three_and_a_half_byte()) { + return has_three_and_a_half_byte().ValueOrDefault() ? emboss_reserved_anonymous_field_1().three_and_a_half_byte() + : decltype(this->emboss_reserved_anonymous_field_1().three_and_a_half_byte())(); + } + ::emboss::support::Maybe has_three_and_a_half_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericExplicitlySizedEnumSizesView; +}; +using ExplicitlySizedEnumSizesView = + GenericExplicitlySizedEnumSizesView; +using ExplicitlySizedEnumSizesWriter = + GenericExplicitlySizedEnumSizesView; + +template +struct EmbossReservedInternalIsGenericExplicitlySizedEnumSizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericExplicitlySizedEnumSizesView< + GenericExplicitlySizedEnumSizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericExplicitlySizedEnumSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeExplicitlySizedEnumSizesView( T &&emboss_reserved_local_arg) { + return GenericExplicitlySizedEnumSizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericExplicitlySizedEnumSizesView> +MakeExplicitlySizedEnumSizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericExplicitlySizedEnumSizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericExplicitlySizedEnumSizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedExplicitlySizedEnumSizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericExplicitlySizedEnumSizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} +enum class Enum : ::std::uint64_t { + VALUE1 = static_cast(1LL), + VALUE10 = static_cast(10LL), + VALUE100 = static_cast(100LL), + VALUE1000 = static_cast(1000LL), + VALUE10000 = static_cast(10000LL), + VALUE100000 = static_cast(100000LL), + VALUE1000000 = static_cast(1000000LL), + VALUE10000000 = static_cast(10000000LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Enum *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("VALUE1", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE1; + return true; + } + + if (!strcmp("VALUE10", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE10; + return true; + } + + if (!strcmp("VALUE100", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE100; + return true; + } + + if (!strcmp("VALUE1000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE1000; + return true; + } + + if (!strcmp("VALUE10000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE10000; + return true; + } + + if (!strcmp("VALUE100000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE100000; + return true; + } + + if (!strcmp("VALUE1000000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE1000000; + return true; + } + + if (!strcmp("VALUE10000000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Enum::VALUE10000000; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Enum emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Enum::VALUE1: return "VALUE1"; + + case Enum::VALUE10: return "VALUE10"; + + case Enum::VALUE100: return "VALUE100"; + + case Enum::VALUE1000: return "VALUE1000"; + + case Enum::VALUE10000: return "VALUE10000"; + + case Enum::VALUE100000: return "VALUE100000"; + + case Enum::VALUE1000000: return "VALUE1000000"; + + case Enum::VALUE10000000: return "VALUE10000000"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Enum emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Enum::VALUE1: return true; + + case Enum::VALUE10: return true; + + case Enum::VALUE100: return true; + + case Enum::VALUE1000: return true; + + case Enum::VALUE10000: return true; + + case Enum::VALUE100000: return true; + + case Enum::VALUE1000000: return true; + + case Enum::VALUE10000000: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Enum 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::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, + Enum *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Enum emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Enum emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Enum emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} +enum class ExplicitlySizedEnum : ::std::uint32_t { + VALUE1 = static_cast(1LL), + VALUE10 = static_cast(10LL), + VALUE100 = static_cast(100LL), + VALUE1000 = static_cast(1000LL), + VALUE10000 = static_cast(10000LL), + VALUE100000 = static_cast(100000LL), + VALUE1000000 = static_cast(1000000LL), + VALUE10000000 = static_cast(10000000LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + ExplicitlySizedEnum *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("VALUE1", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedEnum::VALUE1; + return true; + } + + if (!strcmp("VALUE10", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedEnum::VALUE10; + return true; + } + + if (!strcmp("VALUE100", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedEnum::VALUE100; + return true; + } + + if (!strcmp("VALUE1000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedEnum::VALUE1000; + return true; + } + + if (!strcmp("VALUE10000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedEnum::VALUE10000; + return true; + } + + if (!strcmp("VALUE100000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedEnum::VALUE100000; + return true; + } + + if (!strcmp("VALUE1000000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedEnum::VALUE1000000; + return true; + } + + if (!strcmp("VALUE10000000", emboss_reserved_local_name)) { + *emboss_reserved_local_result = ExplicitlySizedEnum::VALUE10000000; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + ExplicitlySizedEnum emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySizedEnum::VALUE1: return "VALUE1"; + + case ExplicitlySizedEnum::VALUE10: return "VALUE10"; + + case ExplicitlySizedEnum::VALUE100: return "VALUE100"; + + case ExplicitlySizedEnum::VALUE1000: return "VALUE1000"; + + case ExplicitlySizedEnum::VALUE10000: return "VALUE10000"; + + case ExplicitlySizedEnum::VALUE100000: return "VALUE100000"; + + case ExplicitlySizedEnum::VALUE1000000: return "VALUE1000000"; + + case ExplicitlySizedEnum::VALUE10000000: return "VALUE10000000"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(ExplicitlySizedEnum emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case ExplicitlySizedEnum::VALUE1: return true; + + case ExplicitlySizedEnum::VALUE10: return true; + + case ExplicitlySizedEnum::VALUE100: return true; + + case ExplicitlySizedEnum::VALUE1000: return true; + + case ExplicitlySizedEnum::VALUE10000: return true; + + case ExplicitlySizedEnum::VALUE100000: return true; + + case ExplicitlySizedEnum::VALUE1000000: return true; + + case ExplicitlySizedEnum::VALUE10000000: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + ExplicitlySizedEnum 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::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, + ExplicitlySizedEnum *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + ExplicitlySizedEnum emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(ExplicitlySizedEnum emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + ExplicitlySizedEnum emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + + + + + + + + + + +namespace ArraySizes { + +} // namespace ArraySizes + + +template +struct EmbossReservedInternalIsGenericArraySizesView; + +template +class GenericArraySizesView final { + public: + GenericArraySizesView() : backing_() {} + explicit GenericArraySizesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericArraySizesView( + const GenericArraySizesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericArraySizesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericArraySizesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericArraySizesView &operator=( + const GenericArraySizesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_one_byte().Known()) return false; + if (has_one_byte().ValueOrDefault() && !one_byte().Ok()) return false; + + + if (!has_two_byte().Known()) return false; + if (has_two_byte().ValueOrDefault() && !two_byte().Ok()) return false; + + + if (!has_three_byte().Known()) return false; + if (has_three_byte().ValueOrDefault() && !three_byte().Ok()) return false; + + + if (!has_four_byte().Known()) return false; + if (has_four_byte().ValueOrDefault() && !four_byte().Ok()) return false; + + + if (!has_five_byte().Known()) return false; + if (has_five_byte().ValueOrDefault() && !five_byte().Ok()) return false; + + + if (!has_six_byte().Known()) return false; + if (has_six_byte().ValueOrDefault() && !six_byte().Ok()) return false; + + + if (!has_seven_byte().Known()) return false; + if (has_seven_byte().ValueOrDefault() && !seven_byte().Ok()) return false; + + + if (!has_eight_byte().Known()) return false; + if (has_eight_byte().ValueOrDefault() && !eight_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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericArraySizesView emboss_reserved_local_other) const { + + if (!has_one_byte().Known()) return false; + if (!emboss_reserved_local_other.has_one_byte().Known()) return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + !has_one_byte().ValueOrDefault()) + return false; + if (has_one_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_one_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOrDefault() && + has_one_byte().ValueOrDefault() && + !one_byte().Equals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (!has_two_byte().Known()) return false; + if (!emboss_reserved_local_other.has_two_byte().Known()) return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + !has_two_byte().ValueOrDefault()) + return false; + if (has_two_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_two_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOrDefault() && + has_two_byte().ValueOrDefault() && + !two_byte().Equals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (!has_three_byte().Known()) return false; + if (!emboss_reserved_local_other.has_three_byte().Known()) return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + !has_three_byte().ValueOrDefault()) + return false; + if (has_three_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_three_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOrDefault() && + has_three_byte().ValueOrDefault() && + !three_byte().Equals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (!has_four_byte().Known()) return false; + if (!emboss_reserved_local_other.has_four_byte().Known()) return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + !has_four_byte().ValueOrDefault()) + return false; + if (has_four_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_four_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOrDefault() && + has_four_byte().ValueOrDefault() && + !four_byte().Equals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (!has_five_byte().Known()) return false; + if (!emboss_reserved_local_other.has_five_byte().Known()) return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + !has_five_byte().ValueOrDefault()) + return false; + if (has_five_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_five_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOrDefault() && + has_five_byte().ValueOrDefault() && + !five_byte().Equals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (!has_six_byte().Known()) return false; + if (!emboss_reserved_local_other.has_six_byte().Known()) return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + !has_six_byte().ValueOrDefault()) + return false; + if (has_six_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_six_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOrDefault() && + has_six_byte().ValueOrDefault() && + !six_byte().Equals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (!has_seven_byte().Known()) return false; + if (!emboss_reserved_local_other.has_seven_byte().Known()) return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + !has_seven_byte().ValueOrDefault()) + return false; + if (has_seven_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_seven_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOrDefault() && + has_seven_byte().ValueOrDefault() && + !seven_byte().Equals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (!has_eight_byte().Known()) return false; + if (!emboss_reserved_local_other.has_eight_byte().Known()) return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + !has_eight_byte().ValueOrDefault()) + return false; + if (has_eight_byte().ValueOrDefault() && + !emboss_reserved_local_other.has_eight_byte().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOrDefault() && + has_eight_byte().ValueOrDefault() && + !eight_byte().Equals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericArraySizesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + !has_one_byte().ValueOr(false)) + return false; + if (has_one_byte().ValueOr(false) && + !emboss_reserved_local_other.has_one_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_one_byte().ValueOr(false) && + has_one_byte().ValueOr(false) && + !one_byte().UncheckedEquals(emboss_reserved_local_other.one_byte())) + return false; + + + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + !has_two_byte().ValueOr(false)) + return false; + if (has_two_byte().ValueOr(false) && + !emboss_reserved_local_other.has_two_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_two_byte().ValueOr(false) && + has_two_byte().ValueOr(false) && + !two_byte().UncheckedEquals(emboss_reserved_local_other.two_byte())) + return false; + + + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + !has_three_byte().ValueOr(false)) + return false; + if (has_three_byte().ValueOr(false) && + !emboss_reserved_local_other.has_three_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_three_byte().ValueOr(false) && + has_three_byte().ValueOr(false) && + !three_byte().UncheckedEquals(emboss_reserved_local_other.three_byte())) + return false; + + + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + !has_four_byte().ValueOr(false)) + return false; + if (has_four_byte().ValueOr(false) && + !emboss_reserved_local_other.has_four_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_four_byte().ValueOr(false) && + has_four_byte().ValueOr(false) && + !four_byte().UncheckedEquals(emboss_reserved_local_other.four_byte())) + return false; + + + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + !has_five_byte().ValueOr(false)) + return false; + if (has_five_byte().ValueOr(false) && + !emboss_reserved_local_other.has_five_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_five_byte().ValueOr(false) && + has_five_byte().ValueOr(false) && + !five_byte().UncheckedEquals(emboss_reserved_local_other.five_byte())) + return false; + + + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + !has_six_byte().ValueOr(false)) + return false; + if (has_six_byte().ValueOr(false) && + !emboss_reserved_local_other.has_six_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_six_byte().ValueOr(false) && + has_six_byte().ValueOr(false) && + !six_byte().UncheckedEquals(emboss_reserved_local_other.six_byte())) + return false; + + + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + !has_seven_byte().ValueOr(false)) + return false; + if (has_seven_byte().ValueOr(false) && + !emboss_reserved_local_other.has_seven_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_seven_byte().ValueOr(false) && + has_seven_byte().ValueOr(false) && + !seven_byte().UncheckedEquals(emboss_reserved_local_other.seven_byte())) + return false; + + + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + !has_eight_byte().ValueOr(false)) + return false; + if (has_eight_byte().ValueOr(false) && + !emboss_reserved_local_other.has_eight_byte().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_eight_byte().ValueOr(false) && + has_eight_byte().ValueOr(false) && + !eight_byte().UncheckedEquals(emboss_reserved_local_other.eight_byte())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericArraySizesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericArraySizesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericArraySizesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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") { + if (!one_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "two_byte") { + if (!two_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "three_byte") { + if (!three_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "four_byte") { + if (!four_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "five_byte") { + if (!five_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "six_byte") { + if (!six_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "seven_byte") { + if (!seven_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "eight_byte") { + if (!eight_byte().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_byte().IsAggregate() || one_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("one_byte: "); + one_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !one_byte().IsAggregate() && !one_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("# one_byte: UNREADABLE\n"); + } + } + + if (has_two_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_byte().IsAggregate() || two_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("two_byte: "); + two_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !two_byte().IsAggregate() && !two_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("# two_byte: UNREADABLE\n"); + } + } + + if (has_three_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + three_byte().IsAggregate() || three_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("three_byte: "); + three_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !three_byte().IsAggregate() && !three_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("# three_byte: UNREADABLE\n"); + } + } + + if (has_four_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_byte().IsAggregate() || four_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("four_byte: "); + four_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !four_byte().IsAggregate() && !four_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("# four_byte: UNREADABLE\n"); + } + } + + if (has_five_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + five_byte().IsAggregate() || five_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("five_byte: "); + five_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !five_byte().IsAggregate() && !five_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("# five_byte: UNREADABLE\n"); + } + } + + if (has_six_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + six_byte().IsAggregate() || six_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("six_byte: "); + six_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !six_byte().IsAggregate() && !six_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("# six_byte: UNREADABLE\n"); + } + } + + if (has_seven_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + seven_byte().IsAggregate() || seven_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("seven_byte: "); + seven_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !seven_byte().IsAggregate() && !seven_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("# seven_byte: UNREADABLE\n"); + } + } + + if (has_eight_byte().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + eight_byte().IsAggregate() || eight_byte().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("eight_byte: "); + eight_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !eight_byte().IsAggregate() && !eight_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("# eight_byte: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + one_byte() const; + ::emboss::support::Maybe has_one_byte() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 16>> + +, typename Storage::template OffsetStorageType, 2, + 8 > + + two_byte() const; + ::emboss::support::Maybe has_two_byte() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 24>> + +, typename Storage::template OffsetStorageType, 3, + 8 > + + three_byte() const; + ::emboss::support::Maybe has_three_byte() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> + +, typename Storage::template OffsetStorageType, 4, + 8 > + + four_byte() const; + ::emboss::support::Maybe has_four_byte() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 40>> + +, typename Storage::template OffsetStorageType, 5, + 8 > + + five_byte() const; + ::emboss::support::Maybe has_five_byte() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 48>> + +, typename Storage::template OffsetStorageType, 6, + 8 > + + six_byte() const; + ::emboss::support::Maybe has_six_byte() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 56>> + +, typename Storage::template OffsetStorageType, 7, + 8 > + + seven_byte() const; + ::emboss::support::Maybe has_seven_byte() const; + + public: + typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 64>> + +, typename Storage::template OffsetStorageType, 8, + 8 > + + eight_byte() const; + ::emboss::support::Maybe has_eight_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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericArraySizesView; +}; +using ArraySizesView = + GenericArraySizesView; +using ArraySizesWriter = + GenericArraySizesView; + +template +struct EmbossReservedInternalIsGenericArraySizesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericArraySizesView< + GenericArraySizesView> { + static constexpr const bool value = true; +}; + +template +inline GenericArraySizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeArraySizesView( T &&emboss_reserved_local_arg) { + return GenericArraySizesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericArraySizesView> +MakeArraySizesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericArraySizesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericArraySizesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedArraySizesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericArraySizesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace Sizes { + +} // namespace Sizes + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericSizesView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericSizesView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + GenericSizesView::three_byte() + const { + + if ( has_three_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_three_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericSizesView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + GenericSizesView::five_byte() + const { + + if ( has_five_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(5LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_five_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + GenericSizesView::six_byte() + const { + + if ( has_six_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(15LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +( + backing_ + .template GetOffsetStorage<0, + 15>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_six_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + GenericSizesView::seven_byte() + const { + + if ( has_seven_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(7LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(21LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +( + backing_ + .template GetOffsetStorage<0, + 21>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_seven_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericSizesView::eight_byte() + const { + + if ( has_eight_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(28LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 28>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSizesView::has_eight_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace Sizes { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace Sizes + +template +inline constexpr ::std::int32_t +GenericSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Sizes::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSizesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Sizes::IntrinsicSizeInBytes(); +} + +namespace Sizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace Sizes + +template +inline constexpr ::std::int32_t +GenericSizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Sizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Sizes::MaxSizeInBytes(); +} + +namespace Sizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace Sizes + +template +inline constexpr ::std::int32_t +GenericSizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Sizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Sizes::MinSizeInBytes(); +} +namespace BigEndianSizes { + +} // namespace BigEndianSizes + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericBigEndianSizesView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBigEndianSizesView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericBigEndianSizesView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBigEndianSizesView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + GenericBigEndianSizesView::three_byte() + const { + + if ( has_three_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBigEndianSizesView::has_three_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericBigEndianSizesView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBigEndianSizesView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + GenericBigEndianSizesView::five_byte() + const { + + if ( has_five_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(5LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBigEndianSizesView::has_five_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + GenericBigEndianSizesView::six_byte() + const { + + if ( has_six_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(15LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +( + backing_ + .template GetOffsetStorage<0, + 15>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBigEndianSizesView::has_six_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + GenericBigEndianSizesView::seven_byte() + const { + + if ( has_seven_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(7LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(21LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +( + backing_ + .template GetOffsetStorage<0, + 21>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBigEndianSizesView::has_seven_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericBigEndianSizesView::eight_byte() + const { + + if ( has_eight_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(28LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 28>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBigEndianSizesView::has_eight_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace BigEndianSizes { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace BigEndianSizes + +template +inline constexpr ::std::int32_t +GenericBigEndianSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return BigEndianSizes::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBigEndianSizesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return BigEndianSizes::IntrinsicSizeInBytes(); +} + +namespace BigEndianSizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace BigEndianSizes + +template +inline constexpr ::std::int32_t +GenericBigEndianSizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return BigEndianSizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBigEndianSizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return BigEndianSizes::MaxSizeInBytes(); +} + +namespace BigEndianSizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace BigEndianSizes + +template +inline constexpr ::std::int32_t +GenericBigEndianSizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return BigEndianSizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericBigEndianSizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return BigEndianSizes::MinSizeInBytes(); +} +namespace AlternatingEndianSizes { + +} // namespace AlternatingEndianSizes + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericAlternatingEndianSizesView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlternatingEndianSizesView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericAlternatingEndianSizesView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlternatingEndianSizesView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + GenericAlternatingEndianSizesView::three_byte() + const { + + if ( has_three_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlternatingEndianSizesView::has_three_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericAlternatingEndianSizesView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlternatingEndianSizesView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + GenericAlternatingEndianSizesView::five_byte() + const { + + if ( has_five_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(5LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlternatingEndianSizesView::has_five_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + GenericAlternatingEndianSizesView::six_byte() + const { + + if ( has_six_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(15LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +( + backing_ + .template GetOffsetStorage<0, + 15>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlternatingEndianSizesView::has_six_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + GenericAlternatingEndianSizesView::seven_byte() + const { + + if ( has_seven_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(7LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(21LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +( + backing_ + .template GetOffsetStorage<0, + 21>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlternatingEndianSizesView::has_seven_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericAlternatingEndianSizesView::eight_byte() + const { + + if ( has_eight_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(28LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 28>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericAlternatingEndianSizesView::has_eight_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace AlternatingEndianSizes { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace AlternatingEndianSizes + +template +inline constexpr ::std::int32_t +GenericAlternatingEndianSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return AlternatingEndianSizes::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlternatingEndianSizesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return AlternatingEndianSizes::IntrinsicSizeInBytes(); +} + +namespace AlternatingEndianSizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace AlternatingEndianSizes + +template +inline constexpr ::std::int32_t +GenericAlternatingEndianSizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return AlternatingEndianSizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlternatingEndianSizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return AlternatingEndianSizes::MaxSizeInBytes(); +} + +namespace AlternatingEndianSizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace AlternatingEndianSizes + +template +inline constexpr ::std::int32_t +GenericAlternatingEndianSizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return AlternatingEndianSizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericAlternatingEndianSizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return AlternatingEndianSizes::MinSizeInBytes(); +} +namespace EnumSizes { + +} // namespace EnumSizes + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericEnumSizesView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumSizesView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericEnumSizesView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumSizesView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + GenericEnumSizesView::three_byte() + const { + + if ( has_three_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumSizesView::has_three_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericEnumSizesView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumSizesView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + + GenericEnumSizesView::five_byte() + const { + + if ( has_five_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(5LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 40>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumSizesView::has_five_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + + GenericEnumSizesView::six_byte() + const { + + if ( has_six_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(15LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +( + backing_ + .template GetOffsetStorage<0, + 15>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 48>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumSizesView::has_six_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + + GenericEnumSizesView::seven_byte() + const { + + if ( has_seven_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(7LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(21LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +( + backing_ + .template GetOffsetStorage<0, + 21>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 56>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumSizesView::has_seven_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + + GenericEnumSizesView::eight_byte() + const { + + if ( has_eight_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(28LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +( + backing_ + .template GetOffsetStorage<0, + 28>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::Enum, + ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 64>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEnumSizesView::has_eight_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace EnumSizes { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace EnumSizes + +template +inline constexpr ::std::int32_t +GenericEnumSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return EnumSizes::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericEnumSizesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return EnumSizes::IntrinsicSizeInBytes(); +} + +namespace EnumSizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace EnumSizes + +template +inline constexpr ::std::int32_t +GenericEnumSizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return EnumSizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericEnumSizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return EnumSizes::MaxSizeInBytes(); +} + +namespace EnumSizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(36LL)).ValueOrDefault(); +} +} // namespace EnumSizes + +template +inline constexpr ::std::int32_t +GenericEnumSizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return EnumSizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericEnumSizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return EnumSizes::MinSizeInBytes(); +} +namespace ExplicitlySizedEnumSizes { +namespace EmbossReservedAnonymousField1 { + +} // namespace EmbossReservedAnonymousField1 + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<28, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericEmbossReservedAnonymousField1View::three_and_a_half_byte() + const { + + if ( has_three_and_a_half_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(28LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<28, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<28, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericEmbossReservedAnonymousField1View::has_three_and_a_half_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(28LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::IntrinsicSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(28LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MaxSizeInBits(); +} + +namespace EmbossReservedAnonymousField1 { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(28LL)).ValueOrDefault(); +} +} // namespace EmbossReservedAnonymousField1 + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericEmbossReservedAnonymousField1View< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return EmbossReservedAnonymousField1::MinSizeInBits(); +} + +} // namespace ExplicitlySizedEnumSizes + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericExplicitlySizedEnumSizesView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericExplicitlySizedEnumSizesView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericExplicitlySizedEnumSizesView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericExplicitlySizedEnumSizesView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + + GenericExplicitlySizedEnumSizesView::three_byte() + const { + + if ( has_three_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(3LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(3LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +( + backing_ + .template GetOffsetStorage<0, + 3>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::EnumView< + /**/ ::emboss::test::ExplicitlySizedEnum, + ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 24>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericExplicitlySizedEnumSizesView::has_three_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::ExplicitlySizedEnumSizes::GenericEmbossReservedAnonymousField1View>, 32>> + + GenericExplicitlySizedEnumSizesView::emboss_reserved_anonymous_field_1() + const { + + if ( has_emboss_reserved_anonymous_field_1().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::ExplicitlySizedEnumSizes::GenericEmbossReservedAnonymousField1View>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::ExplicitlySizedEnumSizes::GenericEmbossReservedAnonymousField1View>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericExplicitlySizedEnumSizesView::has_emboss_reserved_anonymous_field_1() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericExplicitlySizedEnumSizesView::has_three_and_a_half_byte() const { + return ::emboss::support::And(::emboss::support::Maybe(true), ::emboss::support::Maybe(true)); +} + + +namespace ExplicitlySizedEnumSizes { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(10LL)).ValueOrDefault(); +} +} // namespace ExplicitlySizedEnumSizes + +template +inline constexpr ::std::int32_t +GenericExplicitlySizedEnumSizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ExplicitlySizedEnumSizes::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericExplicitlySizedEnumSizesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ExplicitlySizedEnumSizes::IntrinsicSizeInBytes(); +} + +namespace ExplicitlySizedEnumSizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(10LL)).ValueOrDefault(); +} +} // namespace ExplicitlySizedEnumSizes + +template +inline constexpr ::std::int32_t +GenericExplicitlySizedEnumSizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ExplicitlySizedEnumSizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericExplicitlySizedEnumSizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ExplicitlySizedEnumSizes::MaxSizeInBytes(); +} + +namespace ExplicitlySizedEnumSizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(10LL)).ValueOrDefault(); +} +} // namespace ExplicitlySizedEnumSizes + +template +inline constexpr ::std::int32_t +GenericExplicitlySizedEnumSizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ExplicitlySizedEnumSizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericExplicitlySizedEnumSizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ExplicitlySizedEnumSizes::MinSizeInBytes(); +} +namespace ArraySizes { + +} // namespace ArraySizes + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + + GenericArraySizesView::one_byte() + const { + + if ( has_one_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 8>> + +, typename Storage::template OffsetStorageType, 1, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArraySizesView::has_one_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 16>> + +, typename Storage::template OffsetStorageType, 2, + 8 > + + GenericArraySizesView::two_byte() + const { + + if ( has_two_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 16>> + +, typename Storage::template OffsetStorageType, 2, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 16>> + +, typename Storage::template OffsetStorageType, 2, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArraySizesView::has_two_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 24>> + +, typename Storage::template OffsetStorageType, 3, + 8 > + + GenericArraySizesView::three_byte() + const { + + if ( has_three_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(6LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(6LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 24>> + +, typename Storage::template OffsetStorageType, 3, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 6>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<24, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 24>> + +, typename Storage::template OffsetStorageType, 3, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArraySizesView::has_three_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> + +, typename Storage::template OffsetStorageType, 4, + 8 > + + GenericArraySizesView::four_byte() + const { + + if ( has_four_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(12LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> + +, typename Storage::template OffsetStorageType, 4, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 12>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 32>> + +, typename Storage::template OffsetStorageType, 4, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArraySizesView::has_four_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 40>> + +, typename Storage::template OffsetStorageType, 5, + 8 > + + GenericArraySizesView::five_byte() + const { + + if ( has_five_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(10LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(20LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 40>> + +, typename Storage::template OffsetStorageType, 5, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 20>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<40, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 40>> + +, typename Storage::template OffsetStorageType, 5, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArraySizesView::has_five_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 48>> + +, typename Storage::template OffsetStorageType, 6, + 8 > + + GenericArraySizesView::six_byte() + const { + + if ( has_six_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(12LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(30LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 48>> + +, typename Storage::template OffsetStorageType, 6, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 30>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<48, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 48>> + +, typename Storage::template OffsetStorageType, 6, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArraySizesView::has_six_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 56>> + +, typename Storage::template OffsetStorageType, 7, + 8 > + + GenericArraySizesView::seven_byte() + const { + + if ( has_seven_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(14LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(42LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 56>> + +, typename Storage::template OffsetStorageType, 7, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 42>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<56, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 56>> + +, typename Storage::template OffsetStorageType, 7, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArraySizesView::has_seven_byte() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 64>> + +, typename Storage::template OffsetStorageType, 8, + 8 > + + GenericArraySizesView::eight_byte() + const { + + if ( has_eight_byte().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(16LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(56LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 64>> + +, typename Storage::template OffsetStorageType, 8, + 8 > + +( + backing_ + .template GetOffsetStorage<0, + 56>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::support::GenericArrayView< + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<64, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock::template OffsetStorageType>, 64>> + +, typename Storage::template OffsetStorageType, 8, + 8 > + +(); +} + +template +inline ::emboss::support::Maybe +GenericArraySizesView::has_eight_byte() const { + return ::emboss::support::Maybe(true); +} + + +namespace ArraySizes { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(72LL)).ValueOrDefault(); +} +} // namespace ArraySizes + +template +inline constexpr ::std::int32_t +GenericArraySizesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ArraySizes::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArraySizesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ArraySizes::IntrinsicSizeInBytes(); +} + +namespace ArraySizes { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(72LL)).ValueOrDefault(); +} +} // namespace ArraySizes + +template +inline constexpr ::std::int32_t +GenericArraySizesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ArraySizes::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArraySizesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ArraySizes::MaxSizeInBytes(); +} + +namespace ArraySizes { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(72LL)).ValueOrDefault(); +} +} // namespace ArraySizes + +template +inline constexpr ::std::int32_t +GenericArraySizesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ArraySizes::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericArraySizesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ArraySizes::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_UINT_SIZES_EMB_H_ + diff --git a/testdata/golden_cpp/virtual_field.emb.h b/testdata/golden_cpp/virtual_field.emb.h new file mode 100644 index 00000000..140020a4 --- /dev/null +++ b/testdata/golden_cpp/virtual_field.emb.h @@ -0,0 +1,15819 @@ +/** + * Generated by the Emboss compiler. DO NOT EDIT! + */ +#ifndef TESTDATA_VIRTUAL_FIELD_EMB_H_ +#define TESTDATA_VIRTUAL_FIELD_EMB_H_ +#include +#include + +#include +#include +#include + +#include "runtime/cpp/emboss_cpp_util.h" + +#include "runtime/cpp/emboss_prelude.h" + +#include "runtime/cpp/emboss_enum_view.h" + +#include "runtime/cpp/emboss_text_util.h" + + + +/* NOLINTBEGIN */ +namespace emboss { +namespace test { +namespace StructureWithConstants { + +} // namespace StructureWithConstants + + +template +class GenericStructureWithConstantsView; + +namespace StructureWithComputedValues { + +} // namespace StructureWithComputedValues + + +template +class GenericStructureWithComputedValuesView; + +namespace StructureWithConditionalValue { + +} // namespace StructureWithConditionalValue + + +template +class GenericStructureWithConditionalValueView; + +namespace StructureWithValueInCondition { + +} // namespace StructureWithValueInCondition + + +template +class GenericStructureWithValueInConditionView; + +namespace StructureWithValuesInLocation { + +} // namespace StructureWithValuesInLocation + + +template +class GenericStructureWithValuesInLocationView; + +namespace StructureWithBoolValue { + +} // namespace StructureWithBoolValue + + +template +class GenericStructureWithBoolValueView; + +namespace StructureWithEnumValue { +enum class Category : ::std::uint64_t; + + +} // namespace StructureWithEnumValue + + +template +class GenericStructureWithEnumValueView; + +namespace StructureWithBitsWithValue { + +} // namespace StructureWithBitsWithValue + + +template +class GenericStructureWithBitsWithValueView; + +namespace BitsWithValue { + +} // namespace BitsWithValue + + +template +class GenericBitsWithValueView; + +namespace StructureUsingForeignConstants { + +} // namespace StructureUsingForeignConstants + + +template +class GenericStructureUsingForeignConstantsView; + +namespace SubfieldOfAlias { +namespace Header { + +} // namespace Header + + +template +class GenericHeaderView; + + +} // namespace SubfieldOfAlias + + +template +class GenericSubfieldOfAliasView; + +namespace RestrictedAlias { + +} // namespace RestrictedAlias + + +template +class GenericRestrictedAliasView; + +namespace HasField { +namespace X { + +} // namespace X + + +template +class GenericXView; + + +} // namespace HasField + + +template +class GenericHasFieldView; + +namespace VirtualUnconditionallyUsesConditional { + +} // namespace VirtualUnconditionallyUsesConditional + + +template +class GenericVirtualUnconditionallyUsesConditionalView; + +namespace UsesSize { +namespace R { + +} // namespace R + + +template +class GenericRView; + + +} // namespace UsesSize + + +template +class GenericUsesSizeView; + +namespace UsesExternalSize { + +} // namespace UsesExternalSize + + +template +class GenericUsesExternalSizeView; + +namespace ImplicitWriteBack { + +} // namespace ImplicitWriteBack + + +template +class GenericImplicitWriteBackView; + + + + + + + + + + + + + + +namespace StructureWithConstants { + +} // namespace StructureWithConstants + + +template +struct EmbossReservedInternalIsGenericStructureWithConstantsView; + +template +class GenericStructureWithConstantsView final { + public: + GenericStructureWithConstantsView() : backing_() {} + explicit GenericStructureWithConstantsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureWithConstantsView( + const GenericStructureWithConstantsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureWithConstantsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureWithConstantsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureWithConstantsView &operator=( + const GenericStructureWithConstantsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_ten().Known()) return false; + if (has_ten().ValueOrDefault() && !ten().Ok()) return false; + + + if (!has_twenty().Known()) return false; + if (has_twenty().ValueOrDefault() && !twenty().Ok()) return false; + + + if (!has_four_billion().Known()) return false; + if (has_four_billion().ValueOrDefault() && !four_billion().Ok()) return false; + + + if (!has_ten_billion().Known()) return false; + if (has_ten_billion().ValueOrDefault() && !ten_billion().Ok()) return false; + + + if (!has_minus_ten_billion().Known()) return false; + if (has_minus_ten_billion().ValueOrDefault() && !minus_ten_billion().Ok()) return false; + + + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().Ok()) return false; + + + if (!has_alias_of_value().Known()) return false; + if (has_alias_of_value().ValueOrDefault() && !alias_of_value().Ok()) return false; + + + if (!has_alias_of_alias_of_value().Known()) return false; + if (has_alias_of_alias_of_value().ValueOrDefault() && !alias_of_alias_of_value().Ok()) return false; + + + if (!has_alias_of_ten().Known()) return false; + if (has_alias_of_ten().ValueOrDefault() && !alias_of_ten().Ok()) return false; + + + if (!has_alias_of_alias_of_ten().Known()) return false; + if (has_alias_of_alias_of_ten().ValueOrDefault() && !alias_of_alias_of_ten().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructureWithConstantsView emboss_reserved_local_other) const { + + if (!has_value().Known()) return false; + if (!emboss_reserved_local_other.has_value().Known()) return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + !has_value().ValueOrDefault()) + return false; + if (has_value().ValueOrDefault() && + !emboss_reserved_local_other.has_value().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + has_value().ValueOrDefault() && + !value().Equals(emboss_reserved_local_other.value())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructureWithConstantsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + !has_value().ValueOr(false)) + return false; + if (has_value().ValueOr(false) && + !emboss_reserved_local_other.has_value().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + has_value().ValueOr(false) && + !value().UncheckedEquals(emboss_reserved_local_other.value())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructureWithConstantsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureWithConstantsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureWithConstantsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "value") { + if (!value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "alias_of_value") { + if (!alias_of_value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "alias_of_alias_of_value") { + if (!alias_of_alias_of_value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_ten().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten().IsAggregate() || ten().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# ten: "); + ten().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("# ten: UNREADABLE\n"); + } + } + + if (has_twenty().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + twenty().IsAggregate() || twenty().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# twenty: "); + twenty().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("# twenty: UNREADABLE\n"); + } + } + + if (has_four_billion().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + four_billion().IsAggregate() || four_billion().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# four_billion: "); + four_billion().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("# four_billion: UNREADABLE\n"); + } + } + + if (has_ten_billion().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten_billion().IsAggregate() || ten_billion().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# ten_billion: "); + ten_billion().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("# ten_billion: UNREADABLE\n"); + } + } + + if (has_minus_ten_billion().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + minus_ten_billion().IsAggregate() || minus_ten_billion().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# minus_ten_billion: "); + minus_ten_billion().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("# minus_ten_billion: UNREADABLE\n"); + } + } + + if (has_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value: "); + value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value().IsAggregate() && !value().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("# value: UNREADABLE\n"); + } + } + + if (has_alias_of_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_value().IsAggregate() || alias_of_value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("alias_of_value: "); + alias_of_value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !alias_of_value().IsAggregate() && !alias_of_value().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("# alias_of_value: UNREADABLE\n"); + } + } + + if (has_alias_of_alias_of_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_alias_of_value().IsAggregate() || alias_of_alias_of_value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("alias_of_alias_of_value: "); + alias_of_alias_of_value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !alias_of_alias_of_value().IsAggregate() && !alias_of_alias_of_value().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("# alias_of_alias_of_value: UNREADABLE\n"); + } + } + + if (has_alias_of_ten().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_ten().IsAggregate() || alias_of_ten().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# alias_of_ten: "); + alias_of_ten().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("# alias_of_ten: UNREADABLE\n"); + } + } + + if (has_alias_of_alias_of_ten().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_alias_of_ten().IsAggregate() || alias_of_alias_of_ten().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# alias_of_alias_of_ten: "); + alias_of_alias_of_ten().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("# alias_of_alias_of_ten: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + class EmbossReservedVirtualTenView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualTenView() {} + EmbossReservedVirtualTenView(const EmbossReservedVirtualTenView &) = default; + EmbossReservedVirtualTenView(EmbossReservedVirtualTenView &&) = default; + EmbossReservedVirtualTenView &operator=(const EmbossReservedVirtualTenView &) = + default; + EmbossReservedVirtualTenView &operator=(EmbossReservedVirtualTenView &&) = + default; + ~EmbossReservedVirtualTenView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualTenView ten() { + return EmbossReservedVirtualTenView(); + } + static constexpr ::emboss::support::Maybe has_ten() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualTwentyView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualTwentyView() {} + EmbossReservedVirtualTwentyView(const EmbossReservedVirtualTwentyView &) = default; + EmbossReservedVirtualTwentyView(EmbossReservedVirtualTwentyView &&) = default; + EmbossReservedVirtualTwentyView &operator=(const EmbossReservedVirtualTwentyView &) = + default; + EmbossReservedVirtualTwentyView &operator=(EmbossReservedVirtualTwentyView &&) = + default; + ~EmbossReservedVirtualTwentyView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualTwentyView twenty() { + return EmbossReservedVirtualTwentyView(); + } + static constexpr ::emboss::support::Maybe has_twenty() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualFourBillionView final { + public: + using ValueType = ::std::uint32_t; + + constexpr EmbossReservedVirtualFourBillionView() {} + EmbossReservedVirtualFourBillionView(const EmbossReservedVirtualFourBillionView &) = default; + EmbossReservedVirtualFourBillionView(EmbossReservedVirtualFourBillionView &&) = default; + EmbossReservedVirtualFourBillionView &operator=(const EmbossReservedVirtualFourBillionView &) = + default; + EmbossReservedVirtualFourBillionView &operator=(EmbossReservedVirtualFourBillionView &&) = + default; + ~EmbossReservedVirtualFourBillionView() = default; + + static constexpr ::std::uint32_t Read(); + static constexpr ::std::uint32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualFourBillionView four_billion() { + return EmbossReservedVirtualFourBillionView(); + } + static constexpr ::emboss::support::Maybe has_four_billion() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualTenBillionView final { + public: + using ValueType = ::std::int64_t; + + constexpr EmbossReservedVirtualTenBillionView() {} + EmbossReservedVirtualTenBillionView(const EmbossReservedVirtualTenBillionView &) = default; + EmbossReservedVirtualTenBillionView(EmbossReservedVirtualTenBillionView &&) = default; + EmbossReservedVirtualTenBillionView &operator=(const EmbossReservedVirtualTenBillionView &) = + default; + EmbossReservedVirtualTenBillionView &operator=(EmbossReservedVirtualTenBillionView &&) = + default; + ~EmbossReservedVirtualTenBillionView() = default; + + static constexpr ::std::int64_t Read(); + static constexpr ::std::int64_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualTenBillionView ten_billion() { + return EmbossReservedVirtualTenBillionView(); + } + static constexpr ::emboss::support::Maybe has_ten_billion() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualMinusTenBillionView final { + public: + using ValueType = ::std::int64_t; + + constexpr EmbossReservedVirtualMinusTenBillionView() {} + EmbossReservedVirtualMinusTenBillionView(const EmbossReservedVirtualMinusTenBillionView &) = default; + EmbossReservedVirtualMinusTenBillionView(EmbossReservedVirtualMinusTenBillionView &&) = default; + EmbossReservedVirtualMinusTenBillionView &operator=(const EmbossReservedVirtualMinusTenBillionView &) = + default; + EmbossReservedVirtualMinusTenBillionView &operator=(EmbossReservedVirtualMinusTenBillionView &&) = + default; + ~EmbossReservedVirtualMinusTenBillionView() = default; + + static constexpr ::std::int64_t Read(); + static constexpr ::std::int64_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualMinusTenBillionView minus_ten_billion() { + return EmbossReservedVirtualMinusTenBillionView(); + } + static constexpr ::emboss::support::Maybe has_minus_ten_billion() { + return ::emboss::support::Maybe(true); + } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + value() const; + ::emboss::support::Maybe has_value() const; + + public: + auto alias_of_value() const -> decltype(this->value()) { + return has_alias_of_value().ValueOrDefault() ? value() + : decltype(this->value())(); + } + ::emboss::support::Maybe has_alias_of_value() const; + + public: + auto alias_of_alias_of_value() const -> decltype(this->alias_of_value()) { + return has_alias_of_alias_of_value().ValueOrDefault() ? alias_of_value() + : decltype(this->alias_of_value())(); + } + ::emboss::support::Maybe has_alias_of_alias_of_value() const; + + public: + class EmbossReservedVirtualAliasOfTenView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualAliasOfTenView() {} + EmbossReservedVirtualAliasOfTenView(const EmbossReservedVirtualAliasOfTenView &) = default; + EmbossReservedVirtualAliasOfTenView(EmbossReservedVirtualAliasOfTenView &&) = default; + EmbossReservedVirtualAliasOfTenView &operator=(const EmbossReservedVirtualAliasOfTenView &) = + default; + EmbossReservedVirtualAliasOfTenView &operator=(EmbossReservedVirtualAliasOfTenView &&) = + default; + ~EmbossReservedVirtualAliasOfTenView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualAliasOfTenView alias_of_ten() { + return EmbossReservedVirtualAliasOfTenView(); + } + static constexpr ::emboss::support::Maybe has_alias_of_ten() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualAliasOfAliasOfTenView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualAliasOfAliasOfTenView() {} + EmbossReservedVirtualAliasOfAliasOfTenView(const EmbossReservedVirtualAliasOfAliasOfTenView &) = default; + EmbossReservedVirtualAliasOfAliasOfTenView(EmbossReservedVirtualAliasOfAliasOfTenView &&) = default; + EmbossReservedVirtualAliasOfAliasOfTenView &operator=(const EmbossReservedVirtualAliasOfAliasOfTenView &) = + default; + EmbossReservedVirtualAliasOfAliasOfTenView &operator=(EmbossReservedVirtualAliasOfAliasOfTenView &&) = + default; + ~EmbossReservedVirtualAliasOfAliasOfTenView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualAliasOfAliasOfTenView alias_of_alias_of_ten() { + return EmbossReservedVirtualAliasOfAliasOfTenView(); + } + static constexpr ::emboss::support::Maybe has_alias_of_alias_of_ten() { + return ::emboss::support::Maybe(true); + } + + 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureWithConstantsView; +}; +using StructureWithConstantsView = + GenericStructureWithConstantsView; +using StructureWithConstantsWriter = + GenericStructureWithConstantsView; + +template +struct EmbossReservedInternalIsGenericStructureWithConstantsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureWithConstantsView< + GenericStructureWithConstantsView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureWithConstantsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureWithConstantsView( T &&emboss_reserved_local_arg) { + return GenericStructureWithConstantsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureWithConstantsView> +MakeStructureWithConstantsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithConstantsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureWithConstantsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureWithConstantsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithConstantsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + + +namespace StructureWithComputedValues { + +} // namespace StructureWithComputedValues + + +template +struct EmbossReservedInternalIsGenericStructureWithComputedValuesView; + +template +class GenericStructureWithComputedValuesView final { + public: + GenericStructureWithComputedValuesView() : backing_() {} + explicit GenericStructureWithComputedValuesView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureWithComputedValuesView( + const GenericStructureWithComputedValuesView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureWithComputedValuesView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureWithComputedValuesView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureWithComputedValuesView &operator=( + const GenericStructureWithComputedValuesView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_value().Known()) return false; + if (has_value().ValueOrDefault() && !value().Ok()) return false; + + + if (!has_doubled().Known()) return false; + if (has_doubled().ValueOrDefault() && !doubled().Ok()) return false; + + + if (!has_plus_ten().Known()) return false; + if (has_plus_ten().ValueOrDefault() && !plus_ten().Ok()) return false; + + + if (!has_value2().Known()) return false; + if (has_value2().ValueOrDefault() && !value2().Ok()) return false; + + + if (!has_signed_doubled().Known()) return false; + if (has_signed_doubled().ValueOrDefault() && !signed_doubled().Ok()) return false; + + + if (!has_signed_plus_ten().Known()) return false; + if (has_signed_plus_ten().ValueOrDefault() && !signed_plus_ten().Ok()) return false; + + + if (!has_product().Known()) return false; + if (has_product().ValueOrDefault() && !product().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructureWithComputedValuesView emboss_reserved_local_other) const { + + if (!has_value().Known()) return false; + if (!emboss_reserved_local_other.has_value().Known()) return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + !has_value().ValueOrDefault()) + return false; + if (has_value().ValueOrDefault() && + !emboss_reserved_local_other.has_value().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value().ValueOrDefault() && + has_value().ValueOrDefault() && + !value().Equals(emboss_reserved_local_other.value())) + return false; + + + + if (!has_value2().Known()) return false; + if (!emboss_reserved_local_other.has_value2().Known()) return false; + + if (emboss_reserved_local_other.has_value2().ValueOrDefault() && + !has_value2().ValueOrDefault()) + return false; + if (has_value2().ValueOrDefault() && + !emboss_reserved_local_other.has_value2().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_value2().ValueOrDefault() && + has_value2().ValueOrDefault() && + !value2().Equals(emboss_reserved_local_other.value2())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructureWithComputedValuesView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + !has_value().ValueOr(false)) + return false; + if (has_value().ValueOr(false) && + !emboss_reserved_local_other.has_value().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value().ValueOr(false) && + has_value().ValueOr(false) && + !value().UncheckedEquals(emboss_reserved_local_other.value())) + return false; + + + + if (emboss_reserved_local_other.has_value2().ValueOr(false) && + !has_value2().ValueOr(false)) + return false; + if (has_value2().ValueOr(false) && + !emboss_reserved_local_other.has_value2().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_value2().ValueOr(false) && + has_value2().ValueOr(false) && + !value2().UncheckedEquals(emboss_reserved_local_other.value2())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructureWithComputedValuesView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureWithComputedValuesView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureWithComputedValuesView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "value") { + if (!value().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "plus_ten") { + if (!plus_ten().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "value2") { + if (!value2().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "signed_plus_ten") { + if (!signed_plus_ten().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_value().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value().IsAggregate() || value().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value: "); + value().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value().IsAggregate() && !value().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("# value: UNREADABLE\n"); + } + } + + if (has_doubled().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + doubled().IsAggregate() || doubled().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# doubled: "); + doubled().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("# doubled: UNREADABLE\n"); + } + } + + if (has_plus_ten().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + plus_ten().IsAggregate() || plus_ten().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("plus_ten: "); + plus_ten().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !plus_ten().IsAggregate() && !plus_ten().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("# plus_ten: UNREADABLE\n"); + } + } + + if (has_value2().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + value2().IsAggregate() || value2().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("value2: "); + value2().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !value2().IsAggregate() && !value2().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("# value2: UNREADABLE\n"); + } + } + + if (has_signed_doubled().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + signed_doubled().IsAggregate() || signed_doubled().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# signed_doubled: "); + signed_doubled().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("# signed_doubled: UNREADABLE\n"); + } + } + + if (has_signed_plus_ten().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + signed_plus_ten().IsAggregate() || signed_plus_ten().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("signed_plus_ten: "); + signed_plus_ten().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !signed_plus_ten().IsAggregate() && !signed_plus_ten().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("# signed_plus_ten: UNREADABLE\n"); + } + } + + if (has_product().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + product().IsAggregate() || product().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# product: "); + product().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("# product: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + value() const; + ::emboss::support::Maybe has_value() const; + + public: + class EmbossReservedVirtualDoubledView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualDoubledView( + const GenericStructureWithComputedValuesView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualDoubledView() = delete; + EmbossReservedVirtualDoubledView(const EmbossReservedVirtualDoubledView &) = default; + EmbossReservedVirtualDoubledView(EmbossReservedVirtualDoubledView &&) = default; + EmbossReservedVirtualDoubledView &operator=(const EmbossReservedVirtualDoubledView &) = + default; + EmbossReservedVirtualDoubledView &operator=(EmbossReservedVirtualDoubledView &&) = + default; + ~EmbossReservedVirtualDoubledView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_doubled().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::int64_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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.value(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithComputedValuesView view_; + }; + EmbossReservedVirtualDoubledView doubled() const; + ::emboss::support::Maybe has_doubled() const; + + public: + class EmbossReservedVirtualPlusTenView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualPlusTenView( + const GenericStructureWithComputedValuesView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualPlusTenView() = delete; + EmbossReservedVirtualPlusTenView(const EmbossReservedVirtualPlusTenView &) = default; + EmbossReservedVirtualPlusTenView(EmbossReservedVirtualPlusTenView &&) = default; + EmbossReservedVirtualPlusTenView &operator=(const EmbossReservedVirtualPlusTenView &) = + default; + EmbossReservedVirtualPlusTenView &operator=(EmbossReservedVirtualPlusTenView &&) = + default; + ~EmbossReservedVirtualPlusTenView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_plus_ten().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::int64_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()); + } + template + 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; } + + bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.value().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int64_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { + view_.value().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.value().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.value(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithComputedValuesView view_; + }; + EmbossReservedVirtualPlusTenView plus_ten() const; + ::emboss::support::Maybe has_plus_ten() const; + + public: + typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + value2() const; + ::emboss::support::Maybe has_value2() const; + + public: + class EmbossReservedVirtualSignedDoubledView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualSignedDoubledView( + const GenericStructureWithComputedValuesView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualSignedDoubledView() = delete; + EmbossReservedVirtualSignedDoubledView(const EmbossReservedVirtualSignedDoubledView &) = default; + EmbossReservedVirtualSignedDoubledView(EmbossReservedVirtualSignedDoubledView &&) = default; + EmbossReservedVirtualSignedDoubledView &operator=(const EmbossReservedVirtualSignedDoubledView &) = + default; + EmbossReservedVirtualSignedDoubledView &operator=(EmbossReservedVirtualSignedDoubledView &&) = + default; + ~EmbossReservedVirtualSignedDoubledView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_signed_doubled().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::int64_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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.value2(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithComputedValuesView view_; + }; + EmbossReservedVirtualSignedDoubledView signed_doubled() const; + ::emboss::support::Maybe has_signed_doubled() const; + + public: + class EmbossReservedVirtualSignedPlusTenView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualSignedPlusTenView( + const GenericStructureWithComputedValuesView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualSignedPlusTenView() = delete; + EmbossReservedVirtualSignedPlusTenView(const EmbossReservedVirtualSignedPlusTenView &) = default; + EmbossReservedVirtualSignedPlusTenView(EmbossReservedVirtualSignedPlusTenView &&) = default; + EmbossReservedVirtualSignedPlusTenView &operator=(const EmbossReservedVirtualSignedPlusTenView &) = + default; + EmbossReservedVirtualSignedPlusTenView &operator=(EmbossReservedVirtualSignedPlusTenView &&) = + default; + ~EmbossReservedVirtualSignedPlusTenView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_signed_plus_ten().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::int64_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()); + } + template + 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; } + + bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.value2().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int64_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { + view_.value2().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.value2().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.value2(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithComputedValuesView view_; + }; + EmbossReservedVirtualSignedPlusTenView signed_plus_ten() const; + ::emboss::support::Maybe has_signed_plus_ten() const; + + public: + class EmbossReservedVirtualProductView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualProductView( + const GenericStructureWithComputedValuesView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualProductView() = delete; + EmbossReservedVirtualProductView(const EmbossReservedVirtualProductView &) = default; + EmbossReservedVirtualProductView(EmbossReservedVirtualProductView &&) = default; + EmbossReservedVirtualProductView &operator=(const EmbossReservedVirtualProductView &) = + default; + EmbossReservedVirtualProductView &operator=(EmbossReservedVirtualProductView &&) = + default; + ~EmbossReservedVirtualProductView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_product().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::int64_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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.value(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.value2(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithComputedValuesView view_; + }; + EmbossReservedVirtualProductView product() const; + ::emboss::support::Maybe has_product() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureWithComputedValuesView; +}; +using StructureWithComputedValuesView = + GenericStructureWithComputedValuesView; +using StructureWithComputedValuesWriter = + GenericStructureWithComputedValuesView; + +template +struct EmbossReservedInternalIsGenericStructureWithComputedValuesView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureWithComputedValuesView< + GenericStructureWithComputedValuesView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureWithComputedValuesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureWithComputedValuesView( T &&emboss_reserved_local_arg) { + return GenericStructureWithComputedValuesView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureWithComputedValuesView> +MakeStructureWithComputedValuesView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithComputedValuesView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureWithComputedValuesView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureWithComputedValuesView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithComputedValuesView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace StructureWithConditionalValue { + +} // namespace StructureWithConditionalValue + + +template +struct EmbossReservedInternalIsGenericStructureWithConditionalValueView; + +template +class GenericStructureWithConditionalValueView final { + public: + GenericStructureWithConditionalValueView() : backing_() {} + explicit GenericStructureWithConditionalValueView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureWithConditionalValueView( + const GenericStructureWithConditionalValueView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureWithConditionalValueView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureWithConditionalValueView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureWithConditionalValueView &operator=( + const GenericStructureWithConditionalValueView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_two_x().Known()) return false; + if (has_two_x().ValueOrDefault() && !two_x().Ok()) return false; + + + if (!has_x_plus_one().Known()) return false; + if (has_x_plus_one().ValueOrDefault() && !x_plus_one().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructureWithConditionalValueView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructureWithConditionalValueView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructureWithConditionalValueView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureWithConditionalValueView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureWithConditionalValueView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "x_plus_one") { + if (!x_plus_one().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_two_x().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_x().IsAggregate() || two_x().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# two_x: "); + two_x().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("# two_x: UNREADABLE\n"); + } + } + + if (has_x_plus_one().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x_plus_one().IsAggregate() || x_plus_one().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x_plus_one: "); + x_plus_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x_plus_one().IsAggregate() && !x_plus_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("# x_plus_one: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + class EmbossReservedVirtualTwoXView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualTwoXView( + const GenericStructureWithConditionalValueView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualTwoXView() = delete; + EmbossReservedVirtualTwoXView(const EmbossReservedVirtualTwoXView &) = default; + EmbossReservedVirtualTwoXView(EmbossReservedVirtualTwoXView &&) = default; + EmbossReservedVirtualTwoXView &operator=(const EmbossReservedVirtualTwoXView &) = + default; + EmbossReservedVirtualTwoXView &operator=(EmbossReservedVirtualTwoXView &&) = + default; + ~EmbossReservedVirtualTwoXView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_two_x().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::int64_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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithConditionalValueView view_; + }; + EmbossReservedVirtualTwoXView two_x() const; + ::emboss::support::Maybe has_two_x() const; + + public: + class EmbossReservedVirtualXPlusOneView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualXPlusOneView( + const GenericStructureWithConditionalValueView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualXPlusOneView() = delete; + EmbossReservedVirtualXPlusOneView(const EmbossReservedVirtualXPlusOneView &) = default; + EmbossReservedVirtualXPlusOneView(EmbossReservedVirtualXPlusOneView &&) = default; + EmbossReservedVirtualXPlusOneView &operator=(const EmbossReservedVirtualXPlusOneView &) = + default; + EmbossReservedVirtualXPlusOneView &operator=(EmbossReservedVirtualXPlusOneView &&) = + default; + ~EmbossReservedVirtualXPlusOneView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_x_plus_one().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::int64_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()); + } + template + 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; } + + bool TryToWrite(::std::int64_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.x().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int64_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int64_t emboss_reserved_local_value) { + view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL)))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int64_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(1LL))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.x().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithConditionalValueView view_; + }; + EmbossReservedVirtualXPlusOneView x_plus_one() const; + ::emboss::support::Maybe has_x_plus_one() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureWithConditionalValueView; +}; +using StructureWithConditionalValueView = + GenericStructureWithConditionalValueView; +using StructureWithConditionalValueWriter = + GenericStructureWithConditionalValueView; + +template +struct EmbossReservedInternalIsGenericStructureWithConditionalValueView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureWithConditionalValueView< + GenericStructureWithConditionalValueView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureWithConditionalValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureWithConditionalValueView( T &&emboss_reserved_local_arg) { + return GenericStructureWithConditionalValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureWithConditionalValueView> +MakeStructureWithConditionalValueView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithConditionalValueView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureWithConditionalValueView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureWithConditionalValueView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithConditionalValueView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace StructureWithValueInCondition { + +} // namespace StructureWithValueInCondition + + +template +struct EmbossReservedInternalIsGenericStructureWithValueInConditionView; + +template +class GenericStructureWithValueInConditionView final { + public: + GenericStructureWithValueInConditionView() : backing_() {} + explicit GenericStructureWithValueInConditionView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureWithValueInConditionView( + const GenericStructureWithValueInConditionView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureWithValueInConditionView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureWithValueInConditionView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureWithValueInConditionView &operator=( + const GenericStructureWithValueInConditionView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_two_x().Known()) return false; + if (has_two_x().ValueOrDefault() && !two_x().Ok()) return false; + + + if (!has_if_two_x_lt_100().Known()) return false; + if (has_if_two_x_lt_100().ValueOrDefault() && !if_two_x_lt_100().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericStructureWithValueInConditionView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_if_two_x_lt_100().Known()) return false; + if (!emboss_reserved_local_other.has_if_two_x_lt_100().Known()) return false; + + if (emboss_reserved_local_other.has_if_two_x_lt_100().ValueOrDefault() && + !has_if_two_x_lt_100().ValueOrDefault()) + return false; + if (has_if_two_x_lt_100().ValueOrDefault() && + !emboss_reserved_local_other.has_if_two_x_lt_100().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_if_two_x_lt_100().ValueOrDefault() && + has_if_two_x_lt_100().ValueOrDefault() && + !if_two_x_lt_100().Equals(emboss_reserved_local_other.if_two_x_lt_100())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructureWithValueInConditionView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_if_two_x_lt_100().ValueOr(false) && + !has_if_two_x_lt_100().ValueOr(false)) + return false; + if (has_if_two_x_lt_100().ValueOr(false) && + !emboss_reserved_local_other.has_if_two_x_lt_100().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_if_two_x_lt_100().ValueOr(false) && + has_if_two_x_lt_100().ValueOr(false) && + !if_two_x_lt_100().UncheckedEquals(emboss_reserved_local_other.if_two_x_lt_100())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructureWithValueInConditionView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureWithValueInConditionView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureWithValueInConditionView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "if_two_x_lt_100") { + if (!if_two_x_lt_100().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_two_x().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_x().IsAggregate() || two_x().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# two_x: "); + two_x().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("# two_x: UNREADABLE\n"); + } + } + + if (has_if_two_x_lt_100().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + if_two_x_lt_100().IsAggregate() || if_two_x_lt_100().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("if_two_x_lt_100: "); + if_two_x_lt_100().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !if_two_x_lt_100().IsAggregate() && !if_two_x_lt_100().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("# if_two_x_lt_100: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + class EmbossReservedVirtualTwoXView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualTwoXView( + const GenericStructureWithValueInConditionView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualTwoXView() = delete; + EmbossReservedVirtualTwoXView(const EmbossReservedVirtualTwoXView &) = default; + EmbossReservedVirtualTwoXView(EmbossReservedVirtualTwoXView &&) = default; + EmbossReservedVirtualTwoXView &operator=(const EmbossReservedVirtualTwoXView &) = + default; + EmbossReservedVirtualTwoXView &operator=(EmbossReservedVirtualTwoXView &&) = + default; + ~EmbossReservedVirtualTwoXView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_two_x().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::int64_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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithValueInConditionView view_; + }; + EmbossReservedVirtualTwoXView two_x() const; + ::emboss::support::Maybe has_two_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + if_two_x_lt_100() const; + ::emboss::support::Maybe has_if_two_x_lt_100() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericStructureWithValueInConditionView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.two_x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithValueInConditionView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureWithValueInConditionView; +}; +using StructureWithValueInConditionView = + GenericStructureWithValueInConditionView; +using StructureWithValueInConditionWriter = + GenericStructureWithValueInConditionView; + +template +struct EmbossReservedInternalIsGenericStructureWithValueInConditionView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureWithValueInConditionView< + GenericStructureWithValueInConditionView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureWithValueInConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureWithValueInConditionView( T &&emboss_reserved_local_arg) { + return GenericStructureWithValueInConditionView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureWithValueInConditionView> +MakeStructureWithValueInConditionView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithValueInConditionView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureWithValueInConditionView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureWithValueInConditionView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithValueInConditionView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + +namespace StructureWithValuesInLocation { + +} // namespace StructureWithValuesInLocation + + +template +struct EmbossReservedInternalIsGenericStructureWithValuesInLocationView; + +template +class GenericStructureWithValuesInLocationView final { + public: + GenericStructureWithValuesInLocationView() : backing_() {} + explicit GenericStructureWithValuesInLocationView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureWithValuesInLocationView( + const GenericStructureWithValuesInLocationView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureWithValuesInLocationView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureWithValuesInLocationView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureWithValuesInLocationView &operator=( + const GenericStructureWithValuesInLocationView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_two_x().Known()) return false; + if (has_two_x().ValueOrDefault() && !two_x().Ok()) return false; + + + if (!has_offset_two_x().Known()) return false; + if (has_offset_two_x().ValueOrDefault() && !offset_two_x().Ok()) return false; + + + if (!has_size_two_x().Known()) return false; + if (has_size_two_x().ValueOrDefault() && !size_two_x().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_offset_two_x().Known()) return false; + if (!emboss_reserved_local_other.has_offset_two_x().Known()) return false; + + if (emboss_reserved_local_other.has_offset_two_x().ValueOrDefault() && + !has_offset_two_x().ValueOrDefault()) + return false; + if (has_offset_two_x().ValueOrDefault() && + !emboss_reserved_local_other.has_offset_two_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_offset_two_x().ValueOrDefault() && + has_offset_two_x().ValueOrDefault() && + !offset_two_x().Equals(emboss_reserved_local_other.offset_two_x())) + return false; + + + + if (!has_size_two_x().Known()) return false; + if (!emboss_reserved_local_other.has_size_two_x().Known()) return false; + + if (emboss_reserved_local_other.has_size_two_x().ValueOrDefault() && + !has_size_two_x().ValueOrDefault()) + return false; + if (has_size_two_x().ValueOrDefault() && + !emboss_reserved_local_other.has_size_two_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_size_two_x().ValueOrDefault() && + has_size_two_x().ValueOrDefault() && + !size_two_x().Equals(emboss_reserved_local_other.size_two_x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_offset_two_x().ValueOr(false) && + !has_offset_two_x().ValueOr(false)) + return false; + if (has_offset_two_x().ValueOr(false) && + !emboss_reserved_local_other.has_offset_two_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_offset_two_x().ValueOr(false) && + has_offset_two_x().ValueOr(false) && + !offset_two_x().UncheckedEquals(emboss_reserved_local_other.offset_two_x())) + return false; + + + + if (emboss_reserved_local_other.has_size_two_x().ValueOr(false) && + !has_size_two_x().ValueOr(false)) + return false; + if (has_size_two_x().ValueOr(false) && + !emboss_reserved_local_other.has_size_two_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_size_two_x().ValueOr(false) && + has_size_two_x().ValueOr(false) && + !size_two_x().UncheckedEquals(emboss_reserved_local_other.size_two_x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureWithValuesInLocationView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "offset_two_x") { + if (!offset_two_x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "size_two_x") { + if (!size_two_x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_two_x().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + two_x().IsAggregate() || two_x().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# two_x: "); + two_x().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("# two_x: UNREADABLE\n"); + } + } + + if (has_offset_two_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + offset_two_x().IsAggregate() || offset_two_x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("offset_two_x: "); + offset_two_x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !offset_two_x().IsAggregate() && !offset_two_x().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("# offset_two_x: UNREADABLE\n"); + } + } + + if (has_size_two_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + size_two_x().IsAggregate() || size_two_x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("size_two_x: "); + size_two_x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !size_two_x().IsAggregate() && !size_two_x().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("# size_two_x: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + class EmbossReservedVirtualTwoXView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedVirtualTwoXView( + const GenericStructureWithValuesInLocationView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualTwoXView() = delete; + EmbossReservedVirtualTwoXView(const EmbossReservedVirtualTwoXView &) = default; + EmbossReservedVirtualTwoXView(EmbossReservedVirtualTwoXView &&) = default; + EmbossReservedVirtualTwoXView &operator=(const EmbossReservedVirtualTwoXView &) = + default; + EmbossReservedVirtualTwoXView &operator=(EmbossReservedVirtualTwoXView &&) = + default; + ~EmbossReservedVirtualTwoXView() = default; + + ::std::int64_t Read() const { + EMBOSS_CHECK(view_.has_two_x().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::int64_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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Product(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(2LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithValuesInLocationView view_; + }; + EmbossReservedVirtualTwoXView two_x() const; + ::emboss::support::Maybe has_two_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + offset_two_x() const; + ::emboss::support::Maybe has_offset_two_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + size_two_x() const; + ::emboss::support::Maybe has_size_two_x() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int64_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericStructureWithValuesInLocationView &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::int64_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::int64_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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.two_x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Choice(::emboss::support::Maybe(true), emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(4LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6); + + return emboss_reserved_local_subexpr_7; + } + + static constexpr bool ValueIsOk( + ::std::int64_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithValuesInLocationView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe has_IntrinsicSizeInBytes() const; + + public: + class EmbossReservedDollarVirtualMaxSizeInBytesView final { + public: + using ValueType = ::std::int64_t; + + constexpr EmbossReservedDollarVirtualMaxSizeInBytesView() {} + EmbossReservedDollarVirtualMaxSizeInBytesView(const EmbossReservedDollarVirtualMaxSizeInBytesView &) = default; + EmbossReservedDollarVirtualMaxSizeInBytesView(EmbossReservedDollarVirtualMaxSizeInBytesView &&) = default; + EmbossReservedDollarVirtualMaxSizeInBytesView &operator=(const EmbossReservedDollarVirtualMaxSizeInBytesView &) = + default; + EmbossReservedDollarVirtualMaxSizeInBytesView &operator=(EmbossReservedDollarVirtualMaxSizeInBytesView &&) = + default; + ~EmbossReservedDollarVirtualMaxSizeInBytesView() = default; + + static constexpr ::std::int64_t Read(); + static constexpr ::std::int64_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureWithValuesInLocationView; +}; +using StructureWithValuesInLocationView = + GenericStructureWithValuesInLocationView; +using StructureWithValuesInLocationWriter = + GenericStructureWithValuesInLocationView; + +template +struct EmbossReservedInternalIsGenericStructureWithValuesInLocationView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureWithValuesInLocationView< + GenericStructureWithValuesInLocationView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureWithValuesInLocationView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureWithValuesInLocationView( T &&emboss_reserved_local_arg) { + return GenericStructureWithValuesInLocationView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureWithValuesInLocationView> +MakeStructureWithValuesInLocationView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithValuesInLocationView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureWithValuesInLocationView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureWithValuesInLocationView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithValuesInLocationView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace StructureWithBoolValue { + +} // namespace StructureWithBoolValue + + +template +struct EmbossReservedInternalIsGenericStructureWithBoolValueView; + +template +class GenericStructureWithBoolValueView final { + public: + GenericStructureWithBoolValueView() : backing_() {} + explicit GenericStructureWithBoolValueView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureWithBoolValueView( + const GenericStructureWithBoolValueView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureWithBoolValueView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureWithBoolValueView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureWithBoolValueView &operator=( + const GenericStructureWithBoolValueView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_x_is_ten().Known()) return false; + if (has_x_is_ten().ValueOrDefault() && !x_is_ten().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructureWithBoolValueView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructureWithBoolValueView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructureWithBoolValueView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureWithBoolValueView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureWithBoolValueView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_x_is_ten().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x_is_ten().IsAggregate() || x_is_ten().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# x_is_ten: "); + x_is_ten().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("# x_is_ten: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + class EmbossReservedVirtualXIsTenView final { + public: + using ValueType = bool; + + explicit EmbossReservedVirtualXIsTenView( + const GenericStructureWithBoolValueView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualXIsTenView() = delete; + EmbossReservedVirtualXIsTenView(const EmbossReservedVirtualXIsTenView &) = default; + EmbossReservedVirtualXIsTenView(EmbossReservedVirtualXIsTenView &&) = default; + EmbossReservedVirtualXIsTenView &operator=(const EmbossReservedVirtualXIsTenView &) = + default; + EmbossReservedVirtualXIsTenView &operator=(EmbossReservedVirtualXIsTenView &&) = + default; + ~EmbossReservedVirtualXIsTenView() = default; + + bool Read() const { + EMBOSS_CHECK(view_.has_x_is_ten().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + + 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(true).ValueOr(false); + } + + const GenericStructureWithBoolValueView view_; + }; + EmbossReservedVirtualXIsTenView x_is_ten() const; + ::emboss::support::Maybe has_x_is_ten() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureWithBoolValueView; +}; +using StructureWithBoolValueView = + GenericStructureWithBoolValueView; +using StructureWithBoolValueWriter = + GenericStructureWithBoolValueView; + +template +struct EmbossReservedInternalIsGenericStructureWithBoolValueView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureWithBoolValueView< + GenericStructureWithBoolValueView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureWithBoolValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureWithBoolValueView( T &&emboss_reserved_local_arg) { + return GenericStructureWithBoolValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureWithBoolValueView> +MakeStructureWithBoolValueView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithBoolValueView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureWithBoolValueView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureWithBoolValueView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithBoolValueView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace StructureWithEnumValue { +enum class Category : ::std::uint64_t { + SMALL = static_cast(1LL), + LARGE = static_cast(2LL), + +}; +template +class EnumTraits; + +template <> +class EnumTraits final { + public: + static bool TryToGetEnumFromName(const char *emboss_reserved_local_name, + Category *emboss_reserved_local_result) { + if (emboss_reserved_local_name == nullptr) return false; + if (!strcmp("SMALL", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Category::SMALL; + return true; + } + + if (!strcmp("LARGE", emboss_reserved_local_name)) { + *emboss_reserved_local_result = Category::LARGE; + return true; + } + + return false; + } + + static const char *TryToGetNameFromEnum( + Category emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Category::SMALL: return "SMALL"; + + case Category::LARGE: return "LARGE"; + + default: return nullptr; + } + } + + static bool EnumIsKnown(Category emboss_reserved_local_value) { + switch (emboss_reserved_local_value) { + case Category::SMALL: return true; + + case Category::LARGE: return true; + + default: + return false; + } + } + + static ::std::ostream &SendToOstream(::std::ostream &emboss_reserved_local_os, + Category 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::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, + Category *emboss_reserved_local_result) { + return EnumTraits::TryToGetEnumFromName( + emboss_reserved_local_name, emboss_reserved_local_result); +} + +static inline const char *TryToGetNameFromEnum( + Category emboss_reserved_local_value) { + return EnumTraits::TryToGetNameFromEnum( + emboss_reserved_local_value); +} + +static inline bool EnumIsKnown(Category emboss_reserved_local_value) { + return EnumTraits::EnumIsKnown(emboss_reserved_local_value); +} + +static inline ::std::ostream &operator<<( + ::std::ostream &emboss_reserved_local_os, + Category emboss_reserved_local_value) { + return EnumTraits::SendToOstream(emboss_reserved_local_os, + emboss_reserved_local_value); +} + +} // namespace StructureWithEnumValue + + +template +struct EmbossReservedInternalIsGenericStructureWithEnumValueView; + +template +class GenericStructureWithEnumValueView final { + public: + GenericStructureWithEnumValueView() : backing_() {} + explicit GenericStructureWithEnumValueView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureWithEnumValueView( + const GenericStructureWithEnumValueView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureWithEnumValueView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureWithEnumValueView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureWithEnumValueView &operator=( + const GenericStructureWithEnumValueView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + using Category = ::emboss::test::StructureWithEnumValue::Category; + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_x_size().Known()) return false; + if (has_x_size().ValueOrDefault() && !x_size().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructureWithEnumValueView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructureWithEnumValueView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructureWithEnumValueView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureWithEnumValueView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureWithEnumValueView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_x_size().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x_size().IsAggregate() || x_size().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# x_size: "); + x_size().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("# x_size: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + class EmbossReservedVirtualXSizeView final { + public: + using ValueType = ::emboss::test::StructureWithEnumValue::Category; + + explicit EmbossReservedVirtualXSizeView( + const GenericStructureWithEnumValueView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualXSizeView() = delete; + EmbossReservedVirtualXSizeView(const EmbossReservedVirtualXSizeView &) = default; + EmbossReservedVirtualXSizeView(EmbossReservedVirtualXSizeView &&) = default; + EmbossReservedVirtualXSizeView &operator=(const EmbossReservedVirtualXSizeView &) = + default; + EmbossReservedVirtualXSizeView &operator=(EmbossReservedVirtualXSizeView &&) = + default; + ~EmbossReservedVirtualXSizeView() = default; + + ::emboss::test::StructureWithEnumValue::Category Read() const { + EMBOSS_CHECK(view_.has_x_size().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(); + } + ::emboss::test::StructureWithEnumValue::Category 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()); + } + template + void WriteToTextStream(Stream *emboss_reserved_local_stream, + const ::emboss::TextOutputOptions + &emboss_reserved_local_options) const { + ::emboss::support::WriteEnumViewToTextStream( + this, emboss_reserved_local_stream, emboss_reserved_local_options); + } + + static constexpr bool IsAggregate() { return false; } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::LessThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(100LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(1)), ::emboss::support::Maybe(static_cast(2))); + + return emboss_reserved_local_subexpr_4; + } + + static constexpr bool ValueIsOk( + ::emboss::test::StructureWithEnumValue::Category emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithEnumValueView view_; + }; + EmbossReservedVirtualXSizeView x_size() const; + ::emboss::support::Maybe has_x_size() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureWithEnumValueView; +}; +using StructureWithEnumValueView = + GenericStructureWithEnumValueView; +using StructureWithEnumValueWriter = + GenericStructureWithEnumValueView; + +template +struct EmbossReservedInternalIsGenericStructureWithEnumValueView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureWithEnumValueView< + GenericStructureWithEnumValueView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureWithEnumValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureWithEnumValueView( T &&emboss_reserved_local_arg) { + return GenericStructureWithEnumValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureWithEnumValueView> +MakeStructureWithEnumValueView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithEnumValueView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureWithEnumValueView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureWithEnumValueView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithEnumValueView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace StructureWithBitsWithValue { + +} // namespace StructureWithBitsWithValue + + +template +struct EmbossReservedInternalIsGenericStructureWithBitsWithValueView; + +template +class GenericStructureWithBitsWithValueView final { + public: + GenericStructureWithBitsWithValueView() : backing_() {} + explicit GenericStructureWithBitsWithValueView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureWithBitsWithValueView( + const GenericStructureWithBitsWithValueView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureWithBitsWithValueView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureWithBitsWithValueView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureWithBitsWithValueView &operator=( + const GenericStructureWithBitsWithValueView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_b().Known()) return false; + if (has_b().ValueOrDefault() && !b().Ok()) return false; + + + if (!has_alias_of_b_sum().Known()) return false; + if (has_alias_of_b_sum().ValueOrDefault() && !alias_of_b_sum().Ok()) return false; + + + if (!has_alias_of_b_a().Known()) return false; + if (has_alias_of_b_a().ValueOrDefault() && !alias_of_b_a().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { + + 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 + bool UncheckedEquals( + GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { + + 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 + void UncheckedCopyFrom( + GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureWithBitsWithValueView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "b") { + if (!b().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "alias_of_b_a") { + if (!alias_of_b_a().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + b().IsAggregate() || b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_alias_of_b_sum().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_b_sum().IsAggregate() || alias_of_b_sum().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# alias_of_b_sum: "); + alias_of_b_sum().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("# alias_of_b_sum: UNREADABLE\n"); + } + } + + if (has_alias_of_b_a().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_of_b_a().IsAggregate() || alias_of_b_a().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("alias_of_b_a: "); + alias_of_b_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !alias_of_b_a().IsAggregate() && !alias_of_b_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("# alias_of_b_a: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericBitsWithValueView>, 32>> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + class EmbossReservedVirtualAliasOfBSumView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualAliasOfBSumView( + const GenericStructureWithBitsWithValueView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualAliasOfBSumView() = delete; + EmbossReservedVirtualAliasOfBSumView(const EmbossReservedVirtualAliasOfBSumView &) = default; + EmbossReservedVirtualAliasOfBSumView(EmbossReservedVirtualAliasOfBSumView &&) = default; + EmbossReservedVirtualAliasOfBSumView &operator=(const EmbossReservedVirtualAliasOfBSumView &) = + default; + EmbossReservedVirtualAliasOfBSumView &operator=(EmbossReservedVirtualAliasOfBSumView &&) = + default; + ~EmbossReservedVirtualAliasOfBSumView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_alias_of_b_sum().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.b().sum(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + return emboss_reserved_local_subexpr_2; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericStructureWithBitsWithValueView view_; + }; + EmbossReservedVirtualAliasOfBSumView alias_of_b_sum() const; + ::emboss::support::Maybe has_alias_of_b_sum() const; + + public: + auto alias_of_b_a() const -> decltype(this->b().a()) { + return has_alias_of_b_a().ValueOrDefault() ? b().a() + : decltype(this->b().a())(); + } + ::emboss::support::Maybe has_alias_of_b_a() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureWithBitsWithValueView; +}; +using StructureWithBitsWithValueView = + GenericStructureWithBitsWithValueView; +using StructureWithBitsWithValueWriter = + GenericStructureWithBitsWithValueView; + +template +struct EmbossReservedInternalIsGenericStructureWithBitsWithValueView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureWithBitsWithValueView< + GenericStructureWithBitsWithValueView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureWithBitsWithValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureWithBitsWithValueView( T &&emboss_reserved_local_arg) { + return GenericStructureWithBitsWithValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureWithBitsWithValueView> +MakeStructureWithBitsWithValueView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithBitsWithValueView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureWithBitsWithValueView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureWithBitsWithValueView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureWithBitsWithValueView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace BitsWithValue { + +} // namespace BitsWithValue + + +template +struct EmbossReservedInternalIsGenericBitsWithValueView; + +template +class GenericBitsWithValueView final { + public: + GenericBitsWithValueView() : backing_() {} + explicit GenericBitsWithValueView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericBitsWithValueView( + const GenericBitsWithValueView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericBitsWithValueView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericBitsWithValueView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericBitsWithValueView &operator=( + const GenericBitsWithValueView &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_sum().Known()) return false; + if (has_sum().ValueOrDefault() && !sum().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericBitsWithValueView 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 + bool UncheckedEquals( + GenericBitsWithValueView 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 + void UncheckedCopyFrom( + GenericBitsWithValueView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericBitsWithValueView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericBitsWithValueView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 + 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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + 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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !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"); + } + } + + if (has_sum().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + sum().IsAggregate() || sum().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# sum: "); + sum().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("# sum: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + a() const; + ::emboss::support::Maybe has_a() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + b() const; + ::emboss::support::Maybe has_b() const; + + public: + class EmbossReservedVirtualSumView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualSumView( + const GenericBitsWithValueView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualSumView() = delete; + EmbossReservedVirtualSumView(const EmbossReservedVirtualSumView &) = default; + EmbossReservedVirtualSumView(EmbossReservedVirtualSumView &&) = default; + EmbossReservedVirtualSumView &operator=(const EmbossReservedVirtualSumView &) = + default; + EmbossReservedVirtualSumView &operator=(EmbossReservedVirtualSumView &&) = + default; + ~EmbossReservedVirtualSumView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_sum().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.a(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = view_.b(); + const auto emboss_reserved_local_subexpr_4 = (emboss_reserved_local_subexpr_3.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_3.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericBitsWithValueView view_; + }; + EmbossReservedVirtualSumView sum() const; + ::emboss::support::Maybe has_sum() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericBitsWithValueView; +}; +using BitsWithValueView = + GenericBitsWithValueView; +using BitsWithValueWriter = + GenericBitsWithValueView; + +template +struct EmbossReservedInternalIsGenericBitsWithValueView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericBitsWithValueView< + GenericBitsWithValueView> { + static constexpr const bool value = true; +}; + +template +inline GenericBitsWithValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeBitsWithValueView( T &&emboss_reserved_local_arg) { + return GenericBitsWithValueView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericBitsWithValueView> +MakeBitsWithValueView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBitsWithValueView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericBitsWithValueView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedBitsWithValueView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericBitsWithValueView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace StructureUsingForeignConstants { + +} // namespace StructureUsingForeignConstants + + +template +struct EmbossReservedInternalIsGenericStructureUsingForeignConstantsView; + +template +class GenericStructureUsingForeignConstantsView final { + public: + GenericStructureUsingForeignConstantsView() : backing_() {} + explicit GenericStructureUsingForeignConstantsView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericStructureUsingForeignConstantsView( + const GenericStructureUsingForeignConstantsView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericStructureUsingForeignConstantsView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericStructureUsingForeignConstantsView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericStructureUsingForeignConstantsView &operator=( + const GenericStructureUsingForeignConstantsView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_one_hundred().Known()) return false; + if (has_one_hundred().ValueOrDefault() && !one_hundred().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericStructureUsingForeignConstantsView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_one_hundred().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + one_hundred().IsAggregate() || one_hundred().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# one_hundred: "); + one_hundred().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("# one_hundred: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + class EmbossReservedVirtualOneHundredView final { + public: + using ValueType = ::std::int32_t; + + constexpr EmbossReservedVirtualOneHundredView() {} + EmbossReservedVirtualOneHundredView(const EmbossReservedVirtualOneHundredView &) = default; + EmbossReservedVirtualOneHundredView(EmbossReservedVirtualOneHundredView &&) = default; + EmbossReservedVirtualOneHundredView &operator=(const EmbossReservedVirtualOneHundredView &) = + default; + EmbossReservedVirtualOneHundredView &operator=(EmbossReservedVirtualOneHundredView &&) = + default; + ~EmbossReservedVirtualOneHundredView() = default; + + static constexpr ::std::int32_t Read(); + static constexpr ::std::int32_t UncheckedRead(); + static constexpr bool Ok() { return true; } + template + 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 EmbossReservedVirtualOneHundredView one_hundred() { + return EmbossReservedVirtualOneHundredView(); + } + static constexpr ::emboss::support::Maybe has_one_hundred() { + return ::emboss::support::Maybe(true); + } + + 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericStructureUsingForeignConstantsView; +}; +using StructureUsingForeignConstantsView = + GenericStructureUsingForeignConstantsView; +using StructureUsingForeignConstantsWriter = + GenericStructureUsingForeignConstantsView; + +template +struct EmbossReservedInternalIsGenericStructureUsingForeignConstantsView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericStructureUsingForeignConstantsView< + GenericStructureUsingForeignConstantsView> { + static constexpr const bool value = true; +}; + +template +inline GenericStructureUsingForeignConstantsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeStructureUsingForeignConstantsView( T &&emboss_reserved_local_arg) { + return GenericStructureUsingForeignConstantsView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericStructureUsingForeignConstantsView> +MakeStructureUsingForeignConstantsView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureUsingForeignConstantsView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericStructureUsingForeignConstantsView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedStructureUsingForeignConstantsView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericStructureUsingForeignConstantsView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace SubfieldOfAlias { + + + + +namespace Header { + +} // namespace Header + + +template +struct EmbossReservedInternalIsGenericHeaderView; + +template +class GenericHeaderView final { + public: + GenericHeaderView() : backing_() {} + explicit GenericHeaderView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericHeaderView( + const GenericHeaderView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericHeaderView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericHeaderView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericHeaderView &operator=( + const GenericHeaderView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_size().Known()) return false; + if (has_size().ValueOrDefault() && !size().Ok()) return false; + + + if (!has_message_id().Known()) return false; + if (has_message_id().ValueOrDefault() && !message_id().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericHeaderView emboss_reserved_local_other) const { + + if (!has_size().Known()) return false; + if (!emboss_reserved_local_other.has_size().Known()) return false; + + if (emboss_reserved_local_other.has_size().ValueOrDefault() && + !has_size().ValueOrDefault()) + return false; + if (has_size().ValueOrDefault() && + !emboss_reserved_local_other.has_size().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_size().ValueOrDefault() && + has_size().ValueOrDefault() && + !size().Equals(emboss_reserved_local_other.size())) + return false; + + + + if (!has_message_id().Known()) return false; + if (!emboss_reserved_local_other.has_message_id().Known()) return false; + + if (emboss_reserved_local_other.has_message_id().ValueOrDefault() && + !has_message_id().ValueOrDefault()) + return false; + if (has_message_id().ValueOrDefault() && + !emboss_reserved_local_other.has_message_id().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_message_id().ValueOrDefault() && + has_message_id().ValueOrDefault() && + !message_id().Equals(emboss_reserved_local_other.message_id())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericHeaderView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_size().ValueOr(false) && + !has_size().ValueOr(false)) + return false; + if (has_size().ValueOr(false) && + !emboss_reserved_local_other.has_size().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_size().ValueOr(false) && + has_size().ValueOr(false) && + !size().UncheckedEquals(emboss_reserved_local_other.size())) + return false; + + + + if (emboss_reserved_local_other.has_message_id().ValueOr(false) && + !has_message_id().ValueOr(false)) + return false; + if (has_message_id().ValueOr(false) && + !emboss_reserved_local_other.has_message_id().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_message_id().ValueOr(false) && + has_message_id().ValueOr(false) && + !message_id().UncheckedEquals(emboss_reserved_local_other.message_id())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericHeaderView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericHeaderView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericHeaderView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "size") { + if (!size().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "message_id") { + if (!message_id().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_size().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + size().IsAggregate() || size().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("size: "); + size().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !size().IsAggregate() && !size().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("# size: UNREADABLE\n"); + } + } + + if (has_message_id().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + message_id().IsAggregate() || message_id().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("message_id: "); + message_id().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !message_id().IsAggregate() && !message_id().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("# message_id: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + size() const; + ::emboss::support::Maybe has_size() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + message_id() const; + ::emboss::support::Maybe has_message_id() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericHeaderView; +}; +using HeaderView = + GenericHeaderView; +using HeaderWriter = + GenericHeaderView; + +template +struct EmbossReservedInternalIsGenericHeaderView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericHeaderView< + GenericHeaderView> { + static constexpr const bool value = true; +}; + +template +inline GenericHeaderView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeHeaderView( T &&emboss_reserved_local_arg) { + return GenericHeaderView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericHeaderView> +MakeHeaderView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericHeaderView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericHeaderView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedHeaderView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericHeaderView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace SubfieldOfAlias + + +template +struct EmbossReservedInternalIsGenericSubfieldOfAliasView; + +template +class GenericSubfieldOfAliasView final { + public: + GenericSubfieldOfAliasView() : backing_() {} + explicit GenericSubfieldOfAliasView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericSubfieldOfAliasView( + const GenericSubfieldOfAliasView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericSubfieldOfAliasView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericSubfieldOfAliasView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericSubfieldOfAliasView &operator=( + const GenericSubfieldOfAliasView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_header().Known()) return false; + if (has_header().ValueOrDefault() && !header().Ok()) return false; + + + if (!has_h().Known()) return false; + if (has_h().ValueOrDefault() && !h().Ok()) return false; + + + if (!has_size().Known()) return false; + if (has_size().ValueOrDefault() && !size().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericSubfieldOfAliasView emboss_reserved_local_other) const { + + if (!has_header().Known()) return false; + if (!emboss_reserved_local_other.has_header().Known()) return false; + + if (emboss_reserved_local_other.has_header().ValueOrDefault() && + !has_header().ValueOrDefault()) + return false; + if (has_header().ValueOrDefault() && + !emboss_reserved_local_other.has_header().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_header().ValueOrDefault() && + has_header().ValueOrDefault() && + !header().Equals(emboss_reserved_local_other.header())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericSubfieldOfAliasView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_header().ValueOr(false) && + !has_header().ValueOr(false)) + return false; + if (has_header().ValueOr(false) && + !emboss_reserved_local_other.has_header().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_header().ValueOr(false) && + has_header().ValueOr(false) && + !header().UncheckedEquals(emboss_reserved_local_other.header())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericSubfieldOfAliasView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericSubfieldOfAliasView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericSubfieldOfAliasView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "header") { + if (!header().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "h") { + if (!h().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "size") { + if (!size().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_header().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + header().IsAggregate() || header().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("header: "); + header().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !header().IsAggregate() && !header().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("# header: UNREADABLE\n"); + } + } + + if (has_h().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + h().IsAggregate() || h().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("h: "); + h().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !h().IsAggregate() && !h().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("# h: UNREADABLE\n"); + } + } + + if (has_size().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + size().IsAggregate() || size().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("size: "); + size().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !size().IsAggregate() && !size().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("# size: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::SubfieldOfAlias::GenericHeaderView> + + header() const; + ::emboss::support::Maybe has_header() const; + + public: + auto h() const -> decltype(this->header()) { + return has_h().ValueOrDefault() ? header() + : decltype(this->header())(); + } + ::emboss::support::Maybe has_h() const; + + public: + auto size() const -> decltype(this->h().size()) { + return has_size().ValueOrDefault() ? h().size() + : decltype(this->h().size())(); + } + ::emboss::support::Maybe has_size() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericSubfieldOfAliasView; +}; +using SubfieldOfAliasView = + GenericSubfieldOfAliasView; +using SubfieldOfAliasWriter = + GenericSubfieldOfAliasView; + +template +struct EmbossReservedInternalIsGenericSubfieldOfAliasView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericSubfieldOfAliasView< + GenericSubfieldOfAliasView> { + static constexpr const bool value = true; +}; + +template +inline GenericSubfieldOfAliasView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeSubfieldOfAliasView( T &&emboss_reserved_local_arg) { + return GenericSubfieldOfAliasView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericSubfieldOfAliasView> +MakeSubfieldOfAliasView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSubfieldOfAliasView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericSubfieldOfAliasView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedSubfieldOfAliasView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericSubfieldOfAliasView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace RestrictedAlias { + +} // namespace RestrictedAlias + + +template +struct EmbossReservedInternalIsGenericRestrictedAliasView; + +template +class GenericRestrictedAliasView final { + public: + GenericRestrictedAliasView() : backing_() {} + explicit GenericRestrictedAliasView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRestrictedAliasView( + const GenericRestrictedAliasView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRestrictedAliasView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRestrictedAliasView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRestrictedAliasView &operator=( + const GenericRestrictedAliasView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_a_b().Known()) return false; + if (has_a_b().ValueOrDefault() && !a_b().Ok()) return false; + + + if (!has_alias_switch().Known()) return false; + if (has_alias_switch().ValueOrDefault() && !alias_switch().Ok()) return false; + + + if (!has_a_b_alias().Known()) return false; + if (has_a_b_alias().ValueOrDefault() && !a_b_alias().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericRestrictedAliasView emboss_reserved_local_other) const { + + if (!has_a_b().Known()) return false; + if (!emboss_reserved_local_other.has_a_b().Known()) return false; + + if (emboss_reserved_local_other.has_a_b().ValueOrDefault() && + !has_a_b().ValueOrDefault()) + return false; + if (has_a_b().ValueOrDefault() && + !emboss_reserved_local_other.has_a_b().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_a_b().ValueOrDefault() && + has_a_b().ValueOrDefault() && + !a_b().Equals(emboss_reserved_local_other.a_b())) + return false; + + + + if (!has_alias_switch().Known()) return false; + if (!emboss_reserved_local_other.has_alias_switch().Known()) return false; + + if (emboss_reserved_local_other.has_alias_switch().ValueOrDefault() && + !has_alias_switch().ValueOrDefault()) + return false; + if (has_alias_switch().ValueOrDefault() && + !emboss_reserved_local_other.has_alias_switch().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_alias_switch().ValueOrDefault() && + has_alias_switch().ValueOrDefault() && + !alias_switch().Equals(emboss_reserved_local_other.alias_switch())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericRestrictedAliasView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_a_b().ValueOr(false) && + !has_a_b().ValueOr(false)) + return false; + if (has_a_b().ValueOr(false) && + !emboss_reserved_local_other.has_a_b().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_a_b().ValueOr(false) && + has_a_b().ValueOr(false) && + !a_b().UncheckedEquals(emboss_reserved_local_other.a_b())) + return false; + + + + if (emboss_reserved_local_other.has_alias_switch().ValueOr(false) && + !has_alias_switch().ValueOr(false)) + return false; + if (has_alias_switch().ValueOr(false) && + !emboss_reserved_local_other.has_alias_switch().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_alias_switch().ValueOr(false) && + has_alias_switch().ValueOr(false) && + !alias_switch().UncheckedEquals(emboss_reserved_local_other.alias_switch())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericRestrictedAliasView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericRestrictedAliasView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericRestrictedAliasView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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_b") { + if (!a_b().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "alias_switch") { + if (!alias_switch().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "a_b_alias") { + if (!a_b_alias().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_b().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_b().IsAggregate() || a_b().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_b: "); + a_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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_b().IsAggregate() && !a_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("# a_b: UNREADABLE\n"); + } + } + + if (has_alias_switch().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + alias_switch().IsAggregate() || alias_switch().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("alias_switch: "); + alias_switch().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !alias_switch().IsAggregate() && !alias_switch().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("# alias_switch: UNREADABLE\n"); + } + } + + if (has_a_b_alias().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + a_b_alias().IsAggregate() || a_b_alias().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("a_b_alias: "); + a_b_alias().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !a_b_alias().IsAggregate() && !a_b_alias().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_b_alias: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericBitsWithValueView>, 32>> + + a_b() const; + ::emboss::support::Maybe has_a_b() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + alias_switch() const; + ::emboss::support::Maybe has_alias_switch() const; + + public: + auto a_b_alias() const -> decltype(this->a_b()) { + return has_a_b_alias().ValueOrDefault() ? a_b() + : decltype(this->a_b())(); + } + ::emboss::support::Maybe has_a_b_alias() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRestrictedAliasView; +}; +using RestrictedAliasView = + GenericRestrictedAliasView; +using RestrictedAliasWriter = + GenericRestrictedAliasView; + +template +struct EmbossReservedInternalIsGenericRestrictedAliasView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRestrictedAliasView< + GenericRestrictedAliasView> { + static constexpr const bool value = true; +}; + +template +inline GenericRestrictedAliasView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRestrictedAliasView( T &&emboss_reserved_local_arg) { + return GenericRestrictedAliasView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRestrictedAliasView> +MakeRestrictedAliasView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRestrictedAliasView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRestrictedAliasView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRestrictedAliasView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRestrictedAliasView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + +namespace HasField { + + + + +namespace X { + +} // namespace X + + +template +struct EmbossReservedInternalIsGenericXView; + +template +class GenericXView final { + public: + GenericXView() : backing_() {} + explicit GenericXView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericXView( + const GenericXView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericXView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericXView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericXView &operator=( + const GenericXView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_v().Known()) return false; + if (has_v().ValueOrDefault() && !v().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericXView emboss_reserved_local_other) const { + + if (!has_v().Known()) return false; + if (!emboss_reserved_local_other.has_v().Known()) return false; + + if (emboss_reserved_local_other.has_v().ValueOrDefault() && + !has_v().ValueOrDefault()) + return false; + if (has_v().ValueOrDefault() && + !emboss_reserved_local_other.has_v().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_v().ValueOrDefault() && + has_v().ValueOrDefault() && + !v().Equals(emboss_reserved_local_other.v())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericXView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_v().ValueOr(false) && + !has_v().ValueOr(false)) + return false; + if (has_v().ValueOr(false) && + !emboss_reserved_local_other.has_v().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_v().ValueOr(false) && + has_v().ValueOr(false) && + !v().UncheckedEquals(emboss_reserved_local_other.v())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericXView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericXView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericXView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "v") { + if (!v().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_v().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + v().IsAggregate() || v().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("v: "); + v().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !v().IsAggregate() && !v().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("# v: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + v() const; + ::emboss::support::Maybe has_v() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + y() const; + ::emboss::support::Maybe has_y() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericXView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.v(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericXView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericXView; +}; +using XView = + GenericXView; +using XWriter = + GenericXView; + +template +struct EmbossReservedInternalIsGenericXView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericXView< + GenericXView> { + static constexpr const bool value = true; +}; + +template +inline GenericXView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeXView( T &&emboss_reserved_local_arg) { + return GenericXView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericXView> +MakeXView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericXView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericXView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedXView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericXView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace HasField + + +template +struct EmbossReservedInternalIsGenericHasFieldView; + +template +class GenericHasFieldView final { + public: + GenericHasFieldView() : backing_() {} + explicit GenericHasFieldView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericHasFieldView( + const GenericHasFieldView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericHasFieldView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericHasFieldView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericHasFieldView &operator=( + const GenericHasFieldView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_z().Known()) return false; + if (has_z().ValueOrDefault() && !z().Ok()) return false; + + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().Ok()) return false; + + + if (!has_x_has_y().Known()) return false; + if (has_x_has_y().ValueOrDefault() && !x_has_y().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericHasFieldView emboss_reserved_local_other) const { + + if (!has_z().Known()) return false; + if (!emboss_reserved_local_other.has_z().Known()) return false; + + if (emboss_reserved_local_other.has_z().ValueOrDefault() && + !has_z().ValueOrDefault()) + return false; + if (has_z().ValueOrDefault() && + !emboss_reserved_local_other.has_z().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_z().ValueOrDefault() && + has_z().ValueOrDefault() && + !z().Equals(emboss_reserved_local_other.z())) + return false; + + + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericHasFieldView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_z().ValueOr(false) && + !has_z().ValueOr(false)) + return false; + if (has_z().ValueOr(false) && + !emboss_reserved_local_other.has_z().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_z().ValueOr(false) && + has_z().ValueOr(false) && + !z().UncheckedEquals(emboss_reserved_local_other.z())) + return false; + + + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericHasFieldView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericHasFieldView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericHasFieldView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "z") { + if (!z().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_z().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + z().IsAggregate() || z().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("z: "); + z().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !z().IsAggregate() && !z().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("# z: UNREADABLE\n"); + } + } + + if (has_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + if (has_x_has_y().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x_has_y().IsAggregate() || x_has_y().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# x_has_y: "); + x_has_y().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("# x_has_y: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + z() const; + ::emboss::support::Maybe has_z() const; + + public: + typename ::emboss::test::HasField::GenericXView> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + auto y() const -> decltype(this->x().y()) { + return has_y().ValueOrDefault() ? x().y() + : decltype(this->x().y())(); + } + ::emboss::support::Maybe has_y() const; + + public: + class EmbossReservedVirtualXHasYView final { + public: + using ValueType = bool; + + explicit EmbossReservedVirtualXHasYView( + const GenericHasFieldView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualXHasYView() = delete; + EmbossReservedVirtualXHasYView(const EmbossReservedVirtualXHasYView &) = default; + EmbossReservedVirtualXHasYView(EmbossReservedVirtualXHasYView &&) = default; + EmbossReservedVirtualXHasYView &operator=(const EmbossReservedVirtualXHasYView &) = + default; + EmbossReservedVirtualXHasYView &operator=(EmbossReservedVirtualXHasYView &&) = + default; + ~EmbossReservedVirtualXHasYView() = default; + + bool Read() const { + EMBOSS_CHECK(view_.has_x_has_y().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x().has_y(); + + return emboss_reserved_local_subexpr_1; + } + + static constexpr bool ValueIsOk( + bool emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericHasFieldView view_; + }; + EmbossReservedVirtualXHasYView x_has_y() const; + ::emboss::support::Maybe has_x_has_y() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericHasFieldView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.z(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(3LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericHasFieldView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericHasFieldView; +}; +using HasFieldView = + GenericHasFieldView; +using HasFieldWriter = + GenericHasFieldView; + +template +struct EmbossReservedInternalIsGenericHasFieldView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericHasFieldView< + GenericHasFieldView> { + static constexpr const bool value = true; +}; + +template +inline GenericHasFieldView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeHasFieldView( T &&emboss_reserved_local_arg) { + return GenericHasFieldView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericHasFieldView> +MakeHasFieldView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericHasFieldView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericHasFieldView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedHasFieldView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericHasFieldView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + +namespace VirtualUnconditionallyUsesConditional { + +} // namespace VirtualUnconditionallyUsesConditional + + +template +struct EmbossReservedInternalIsGenericVirtualUnconditionallyUsesConditionalView; + +template +class GenericVirtualUnconditionallyUsesConditionalView final { + public: + GenericVirtualUnconditionallyUsesConditionalView() : backing_() {} + explicit GenericVirtualUnconditionallyUsesConditionalView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericVirtualUnconditionallyUsesConditionalView( + const GenericVirtualUnconditionallyUsesConditionalView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericVirtualUnconditionallyUsesConditionalView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericVirtualUnconditionallyUsesConditionalView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericVirtualUnconditionallyUsesConditionalView &operator=( + const GenericVirtualUnconditionallyUsesConditionalView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_xc().Known()) return false; + if (has_xc().ValueOrDefault() && !xc().Ok()) return false; + + + if (!has_x_nor_xc().Known()) return false; + if (has_x_nor_xc().ValueOrDefault() && !x_nor_xc().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + ::std::size_t SizeInBytes() const { + return static_cast(IntrinsicSizeInBytes().Read()); + } + bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + + + + template + bool Equals( + GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_xc().Known()) return false; + if (!emboss_reserved_local_other.has_xc().Known()) return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + !has_xc().ValueOrDefault()) + return false; + if (has_xc().ValueOrDefault() && + !emboss_reserved_local_other.has_xc().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOrDefault() && + has_xc().ValueOrDefault() && + !xc().Equals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + !has_xc().ValueOr(false)) + return false; + if (has_xc().ValueOr(false) && + !emboss_reserved_local_other.has_xc().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_xc().ValueOr(false) && + has_xc().ValueOr(false) && + !xc().UncheckedEquals(emboss_reserved_local_other.xc())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericVirtualUnconditionallyUsesConditionalView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "xc") { + if (!xc().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_xc().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + xc().IsAggregate() || xc().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("xc: "); + xc().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !xc().IsAggregate() && !xc().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("# xc: UNREADABLE\n"); + } + } + + if (has_x_nor_xc().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x_nor_xc().IsAggregate() || x_nor_xc().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# x_nor_xc: "); + x_nor_xc().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("# x_nor_xc: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + xc() const; + ::emboss::support::Maybe has_xc() const; + + public: + class EmbossReservedVirtualXNorXcView final { + public: + using ValueType = bool; + + explicit EmbossReservedVirtualXNorXcView( + const GenericVirtualUnconditionallyUsesConditionalView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualXNorXcView() = delete; + EmbossReservedVirtualXNorXcView(const EmbossReservedVirtualXNorXcView &) = default; + EmbossReservedVirtualXNorXcView(EmbossReservedVirtualXNorXcView &&) = default; + EmbossReservedVirtualXNorXcView &operator=(const EmbossReservedVirtualXNorXcView &) = + default; + EmbossReservedVirtualXNorXcView &operator=(EmbossReservedVirtualXNorXcView &&) = + default; + ~EmbossReservedVirtualXNorXcView() = default; + + bool Read() const { + EMBOSS_CHECK(view_.has_x_nor_xc().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = view_.xc(); + const auto emboss_reserved_local_subexpr_5 = (emboss_reserved_local_subexpr_4.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_4.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_6 = ::emboss::support::Equal(emboss_reserved_local_subexpr_5, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_7 = ::emboss::support::And(emboss_reserved_local_subexpr_3, emboss_reserved_local_subexpr_6); + + return emboss_reserved_local_subexpr_7; + } + + static constexpr bool ValueIsOk( + bool emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericVirtualUnconditionallyUsesConditionalView view_; + }; + EmbossReservedVirtualXNorXcView x_nor_xc() const; + ::emboss::support::Maybe has_x_nor_xc() const; + + public: + class EmbossReservedDollarVirtualIntrinsicSizeInBytesView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + const GenericVirtualUnconditionallyUsesConditionalView &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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Equal(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Choice(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(2LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_5 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), ::emboss::support::Maybe(static_cast(1LL)), emboss_reserved_local_subexpr_4); + + return emboss_reserved_local_subexpr_5; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericVirtualUnconditionallyUsesConditionalView view_; + }; + EmbossReservedDollarVirtualIntrinsicSizeInBytesView IntrinsicSizeInBytes() const; + ::emboss::support::Maybe 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericVirtualUnconditionallyUsesConditionalView; +}; +using VirtualUnconditionallyUsesConditionalView = + GenericVirtualUnconditionallyUsesConditionalView; +using VirtualUnconditionallyUsesConditionalWriter = + GenericVirtualUnconditionallyUsesConditionalView; + +template +struct EmbossReservedInternalIsGenericVirtualUnconditionallyUsesConditionalView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericVirtualUnconditionallyUsesConditionalView< + GenericVirtualUnconditionallyUsesConditionalView> { + static constexpr const bool value = true; +}; + +template +inline GenericVirtualUnconditionallyUsesConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeVirtualUnconditionallyUsesConditionalView( T &&emboss_reserved_local_arg) { + return GenericVirtualUnconditionallyUsesConditionalView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericVirtualUnconditionallyUsesConditionalView> +MakeVirtualUnconditionallyUsesConditionalView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericVirtualUnconditionallyUsesConditionalView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericVirtualUnconditionallyUsesConditionalView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedVirtualUnconditionallyUsesConditionalView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericVirtualUnconditionallyUsesConditionalView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace UsesSize { + + + + +namespace R { + +} // namespace R + + +template +struct EmbossReservedInternalIsGenericRView; + +template +class GenericRView final { + public: + GenericRView() : backing_() {} + explicit GenericRView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericRView( + const GenericRView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericRView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericRView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericRView &operator=( + const GenericRView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_q().Known()) return false; + if (has_q().ValueOrDefault() && !q().Ok()) return false; + + + if (!has_IntrinsicSizeInBits().Known()) return false; + if (has_IntrinsicSizeInBits().ValueOrDefault() && !IntrinsicSizeInBits().Ok()) return false; + + + if (!has_q_plus_bit_size().Known()) return false; + if (has_q_plus_bit_size().ValueOrDefault() && !q_plus_bit_size().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 backing_.Ok() && IntrinsicSizeInBits().Ok() && + backing_.SizeInBits() >= + static_cast( + IntrinsicSizeInBits().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBits() { + return static_cast(IntrinsicSizeInBits().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBits().Ok(); + } + + + template + bool Equals( + GenericRView emboss_reserved_local_other) const { + + if (!has_q().Known()) return false; + if (!emboss_reserved_local_other.has_q().Known()) return false; + + if (emboss_reserved_local_other.has_q().ValueOrDefault() && + !has_q().ValueOrDefault()) + return false; + if (has_q().ValueOrDefault() && + !emboss_reserved_local_other.has_q().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_q().ValueOrDefault() && + has_q().ValueOrDefault() && + !q().Equals(emboss_reserved_local_other.q())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericRView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_q().ValueOr(false) && + !has_q().ValueOr(false)) + return false; + if (has_q().ValueOr(false) && + !emboss_reserved_local_other.has_q().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_q().ValueOr(false) && + has_q().ValueOr(false) && + !q().UncheckedEquals(emboss_reserved_local_other.q())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericRView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().UncheckedRead()); + } + + template + void CopyFrom( + GenericRView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + template + bool TryToCopyFrom( + GenericRView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBits().Read()); + } + + template + 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 == "q") { + if (!q().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_q().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + q().IsAggregate() || q().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("q: "); + q().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !q().IsAggregate() && !q().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("# q: UNREADABLE\n"); + } + } + + if (has_q_plus_bit_size().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + q_plus_bit_size().IsAggregate() || q_plus_bit_size().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# q_plus_bit_size: "); + q_plus_bit_size().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("# q_plus_bit_size: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + q() const; + ::emboss::support::Maybe has_q() 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; } + template + 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 has_IntrinsicSizeInBits() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualQPlusBitSizeView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualQPlusBitSizeView( + const GenericRView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualQPlusBitSizeView() = delete; + EmbossReservedVirtualQPlusBitSizeView(const EmbossReservedVirtualQPlusBitSizeView &) = default; + EmbossReservedVirtualQPlusBitSizeView(EmbossReservedVirtualQPlusBitSizeView &&) = default; + EmbossReservedVirtualQPlusBitSizeView &operator=(const EmbossReservedVirtualQPlusBitSizeView &) = + default; + EmbossReservedVirtualQPlusBitSizeView &operator=(EmbossReservedVirtualQPlusBitSizeView &&) = + default; + ~EmbossReservedVirtualQPlusBitSizeView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_q_plus_bit_size().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.q(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(8LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericRView view_; + }; + EmbossReservedVirtualQPlusBitSizeView q_plus_bit_size() const; + ::emboss::support::Maybe has_q_plus_bit_size() const; + + 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; } + template + 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 has_MaxSizeInBits() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBits() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericRView; +}; +using RView = + GenericRView; +using RWriter = + GenericRView; + +template +struct EmbossReservedInternalIsGenericRView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericRView< + GenericRView> { + static constexpr const bool value = true; +}; + +template +inline GenericRView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeRView( T &&emboss_reserved_local_arg) { + return GenericRView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericRView> +MakeRView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericRView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedRView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericRView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +} // namespace UsesSize + + +template +struct EmbossReservedInternalIsGenericUsesSizeView; + +template +class GenericUsesSizeView final { + public: + GenericUsesSizeView() : backing_() {} + explicit GenericUsesSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericUsesSizeView( + const GenericUsesSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericUsesSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericUsesSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericUsesSizeView &operator=( + const GenericUsesSizeView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_r().Known()) return false; + if (has_r().ValueOrDefault() && !r().Ok()) return false; + + + if (!has_IntrinsicSizeInBytes().Known()) return false; + if (has_IntrinsicSizeInBytes().ValueOrDefault() && !IntrinsicSizeInBytes().Ok()) return false; + + + if (!has_r_q_plus_byte_size().Known()) return false; + if (has_r_q_plus_byte_size().ValueOrDefault() && !r_q_plus_byte_size().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericUsesSizeView emboss_reserved_local_other) const { + + if (!has_r().Known()) return false; + if (!emboss_reserved_local_other.has_r().Known()) return false; + + if (emboss_reserved_local_other.has_r().ValueOrDefault() && + !has_r().ValueOrDefault()) + return false; + if (has_r().ValueOrDefault() && + !emboss_reserved_local_other.has_r().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_r().ValueOrDefault() && + has_r().ValueOrDefault() && + !r().Equals(emboss_reserved_local_other.r())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericUsesSizeView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_r().ValueOr(false) && + !has_r().ValueOr(false)) + return false; + if (has_r().ValueOr(false) && + !emboss_reserved_local_other.has_r().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_r().ValueOr(false) && + has_r().ValueOr(false) && + !r().UncheckedEquals(emboss_reserved_local_other.r())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericUsesSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericUsesSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericUsesSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "r") { + if (!r().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_r().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + r().IsAggregate() || r().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("r: "); + r().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !r().IsAggregate() && !r().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("# r: UNREADABLE\n"); + } + } + + if (has_r_q_plus_byte_size().ValueOr(false) && + emboss_reserved_local_field_options.comments()) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + r_q_plus_byte_size().IsAggregate() || r_q_plus_byte_size().Ok()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + emboss_reserved_local_stream->Write("# r_q_plus_byte_size: "); + r_q_plus_byte_size().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("# r_q_plus_byte_size: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::UsesSize::GenericRView>, 8>> + + r() const; + ::emboss::support::Maybe has_r() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + public: + class EmbossReservedVirtualRQPlusByteSizeView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualRQPlusByteSizeView( + const GenericUsesSizeView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualRQPlusByteSizeView() = delete; + EmbossReservedVirtualRQPlusByteSizeView(const EmbossReservedVirtualRQPlusByteSizeView &) = default; + EmbossReservedVirtualRQPlusByteSizeView(EmbossReservedVirtualRQPlusByteSizeView &&) = default; + EmbossReservedVirtualRQPlusByteSizeView &operator=(const EmbossReservedVirtualRQPlusByteSizeView &) = + default; + EmbossReservedVirtualRQPlusByteSizeView &operator=(EmbossReservedVirtualRQPlusByteSizeView &&) = + default; + ~EmbossReservedVirtualRQPlusByteSizeView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_r_q_plus_byte_size().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()); + } + template + 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 MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.r().q(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(1LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericUsesSizeView view_; + }; + EmbossReservedVirtualRQPlusByteSizeView r_q_plus_byte_size() const; + ::emboss::support::Maybe has_r_q_plus_byte_size() 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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericUsesSizeView; +}; +using UsesSizeView = + GenericUsesSizeView; +using UsesSizeWriter = + GenericUsesSizeView; + +template +struct EmbossReservedInternalIsGenericUsesSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericUsesSizeView< + GenericUsesSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericUsesSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeUsesSizeView( T &&emboss_reserved_local_arg) { + return GenericUsesSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericUsesSizeView> +MakeUsesSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericUsesSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericUsesSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedUsesSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericUsesSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + +namespace UsesExternalSize { + +} // namespace UsesExternalSize + + +template +struct EmbossReservedInternalIsGenericUsesExternalSizeView; + +template +class GenericUsesExternalSizeView final { + public: + GenericUsesExternalSizeView() : backing_() {} + explicit GenericUsesExternalSizeView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericUsesExternalSizeView( + const GenericUsesExternalSizeView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericUsesExternalSizeView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericUsesExternalSizeView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericUsesExternalSizeView &operator=( + const GenericUsesExternalSizeView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_y().Known()) return false; + if (has_y().ValueOrDefault() && !y().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericUsesExternalSizeView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + + + if (!has_y().Known()) return false; + if (!emboss_reserved_local_other.has_y().Known()) return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + !has_y().ValueOrDefault()) + return false; + if (has_y().ValueOrDefault() && + !emboss_reserved_local_other.has_y().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_y().ValueOrDefault() && + has_y().ValueOrDefault() && + !y().Equals(emboss_reserved_local_other.y())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericUsesExternalSizeView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + !has_y().ValueOr(false)) + return false; + if (has_y().ValueOr(false) && + !emboss_reserved_local_other.has_y().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_y().ValueOr(false) && + has_y().ValueOr(false) && + !y().UncheckedEquals(emboss_reserved_local_other.y())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericUsesExternalSizeView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericUsesExternalSizeView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericUsesExternalSizeView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "y") { + if (!y().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_y().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + y().IsAggregate() || y().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("y: "); + y().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !y().IsAggregate() && !y().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("# y: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + emboss_reserved_local_stream->Write(" }"); + } + } + + + + static constexpr bool IsAggregate() { return true; } + + public: + typename ::emboss::test::GenericStructureWithConstantsView> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + typename ::emboss::test::GenericStructureWithConstantsView> + + y() const; + ::emboss::support::Maybe has_y() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericUsesExternalSizeView; +}; +using UsesExternalSizeView = + GenericUsesExternalSizeView; +using UsesExternalSizeWriter = + GenericUsesExternalSizeView; + +template +struct EmbossReservedInternalIsGenericUsesExternalSizeView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericUsesExternalSizeView< + GenericUsesExternalSizeView> { + static constexpr const bool value = true; +}; + +template +inline GenericUsesExternalSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeUsesExternalSizeView( T &&emboss_reserved_local_arg) { + return GenericUsesExternalSizeView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericUsesExternalSizeView> +MakeUsesExternalSizeView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericUsesExternalSizeView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericUsesExternalSizeView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedUsesExternalSizeView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericUsesExternalSizeView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + + + + + + + + +namespace ImplicitWriteBack { + +} // namespace ImplicitWriteBack + + +template +struct EmbossReservedInternalIsGenericImplicitWriteBackView; + +template +class GenericImplicitWriteBackView final { + public: + GenericImplicitWriteBackView() : backing_() {} + explicit GenericImplicitWriteBackView( + Storage emboss_reserved_local_bytes) + : backing_(emboss_reserved_local_bytes) + {} + + template + GenericImplicitWriteBackView( + const GenericImplicitWriteBackView &emboss_reserved_local_other) + : backing_{emboss_reserved_local_other.BackingStorage()} + {} + + template ::type>::type>::value>::type> + explicit GenericImplicitWriteBackView( + Arg &&emboss_reserved_local_arg) + : backing_(::std::forward( + emboss_reserved_local_arg)) + {} + template + explicit GenericImplicitWriteBackView( + Arg0 &&emboss_reserved_local_arg0, + Arg1 &&emboss_reserved_local_arg1, Args &&... emboss_reserved_local_args) + : backing_(::std::forward(emboss_reserved_local_arg0), + ::std::forward(emboss_reserved_local_arg1), + ::std::forward( + emboss_reserved_local_args)...) + {} + + template + GenericImplicitWriteBackView &operator=( + const GenericImplicitWriteBackView &emboss_reserved_local_other) { + backing_ = emboss_reserved_local_other.BackingStorage(); + return *this; + } + + + + bool Ok() const { + if (!IsComplete()) return false; + + if (!has_x().Known()) return false; + if (has_x().ValueOrDefault() && !x().Ok()) return false; + + + if (!has_x_plus_ten().Known()) return false; + if (has_x_plus_ten().ValueOrDefault() && !x_plus_ten().Ok()) return false; + + + if (!has_ten_plus_x().Known()) return false; + if (has_ten_plus_x().ValueOrDefault() && !ten_plus_x().Ok()) return false; + + + if (!has_x_minus_ten().Known()) return false; + if (has_x_minus_ten().ValueOrDefault() && !x_minus_ten().Ok()) return false; + + + if (!has_ten_minus_x().Known()) return false; + if (has_ten_minus_x().ValueOrDefault() && !ten_minus_x().Ok()) return false; + + + if (!has_ten_minus_x_plus_ten().Known()) return false; + if (has_ten_minus_x_plus_ten().ValueOrDefault() && !ten_minus_x_plus_ten().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 backing_.Ok() && IntrinsicSizeInBytes().Ok() && + backing_.SizeInBytes() >= + static_cast( + IntrinsicSizeInBytes().UncheckedRead()); + } + static constexpr ::std::size_t SizeInBytes() { + return static_cast(IntrinsicSizeInBytes().Read()); + } + static constexpr bool SizeIsKnown() { + return IntrinsicSizeInBytes().Ok(); + } + + + template + bool Equals( + GenericImplicitWriteBackView emboss_reserved_local_other) const { + + if (!has_x().Known()) return false; + if (!emboss_reserved_local_other.has_x().Known()) return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + !has_x().ValueOrDefault()) + return false; + if (has_x().ValueOrDefault() && + !emboss_reserved_local_other.has_x().ValueOrDefault()) + return false; + + if (emboss_reserved_local_other.has_x().ValueOrDefault() && + has_x().ValueOrDefault() && + !x().Equals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + bool UncheckedEquals( + GenericImplicitWriteBackView emboss_reserved_local_other) const { + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + !has_x().ValueOr(false)) + return false; + if (has_x().ValueOr(false) && + !emboss_reserved_local_other.has_x().ValueOr(false)) + return false; + + if (emboss_reserved_local_other.has_x().ValueOr(false) && + has_x().ValueOr(false) && + !x().UncheckedEquals(emboss_reserved_local_other.x())) + return false; + + return true; + } + template + void UncheckedCopyFrom( + GenericImplicitWriteBackView emboss_reserved_local_other) const { + backing_.UncheckedCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().UncheckedRead()); + } + + template + void CopyFrom( + GenericImplicitWriteBackView emboss_reserved_local_other) const { + backing_.CopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + template + bool TryToCopyFrom( + GenericImplicitWriteBackView emboss_reserved_local_other) const { + return emboss_reserved_local_other.Ok() && backing_.TryToCopyFrom( + emboss_reserved_local_other.BackingStorage(), + emboss_reserved_local_other.IntrinsicSizeInBytes().Read()); + } + + template + 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 == "x") { + if (!x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "x_plus_ten") { + if (!x_plus_ten().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "ten_plus_x") { + if (!ten_plus_x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "x_minus_ten") { + if (!x_minus_ten().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "ten_minus_x") { + if (!ten_minus_x().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + if (emboss_reserved_local_name == "ten_minus_x_plus_ten") { + if (!ten_minus_x_plus_ten().UpdateFromTextStream( + emboss_reserved_local_stream)) { + return false; + } + continue; + } + + return false; + } + } + + template + 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_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x().IsAggregate() || x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x: "); + x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x().IsAggregate() && !x().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("# x: UNREADABLE\n"); + } + } + + if (has_x_plus_ten().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x_plus_ten().IsAggregate() || x_plus_ten().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x_plus_ten: "); + x_plus_ten().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x_plus_ten().IsAggregate() && !x_plus_ten().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("# x_plus_ten: UNREADABLE\n"); + } + } + + if (has_ten_plus_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten_plus_x().IsAggregate() || ten_plus_x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("ten_plus_x: "); + ten_plus_x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !ten_plus_x().IsAggregate() && !ten_plus_x().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("# ten_plus_x: UNREADABLE\n"); + } + } + + if (has_x_minus_ten().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + x_minus_ten().IsAggregate() || x_minus_ten().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("x_minus_ten: "); + x_minus_ten().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !x_minus_ten().IsAggregate() && !x_minus_ten().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("# x_minus_ten: UNREADABLE\n"); + } + } + + if (has_ten_minus_x().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten_minus_x().IsAggregate() || ten_minus_x().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("ten_minus_x: "); + ten_minus_x().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !ten_minus_x().IsAggregate() && !ten_minus_x().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("# ten_minus_x: UNREADABLE\n"); + } + } + + if (has_ten_minus_x_plus_ten().ValueOr(false)) { + if (!emboss_reserved_local_field_options.allow_partial_output() || + ten_minus_x_plus_ten().IsAggregate() || ten_minus_x_plus_ten().Ok()) { + if (emboss_reserved_local_field_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_field_options.current_indent()); + } else { + if (emboss_reserved_local_wrote_field) { + emboss_reserved_local_stream->Write(","); + } + emboss_reserved_local_stream->Write(" "); + } + emboss_reserved_local_stream->Write("ten_minus_x_plus_ten: "); + ten_minus_x_plus_ten().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_stream->Write("\n"); + } + } else if (emboss_reserved_local_field_options.allow_partial_output() && + emboss_reserved_local_field_options.comments() && + !ten_minus_x_plus_ten().IsAggregate() && !ten_minus_x_plus_ten().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("# ten_minus_x_plus_ten: UNREADABLE\n"); + } + } + + (void)emboss_reserved_local_wrote_field; + if (emboss_reserved_local_options.multiline()) { + emboss_reserved_local_stream->Write( + emboss_reserved_local_options.current_indent()); + emboss_reserved_local_stream->Write("}"); + } else { + 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>, 8>> + + x() const; + ::emboss::support::Maybe has_x() const; + + public: + class EmbossReservedVirtualXPlusTenView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualXPlusTenView( + const GenericImplicitWriteBackView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualXPlusTenView() = delete; + EmbossReservedVirtualXPlusTenView(const EmbossReservedVirtualXPlusTenView &) = default; + EmbossReservedVirtualXPlusTenView(EmbossReservedVirtualXPlusTenView &&) = default; + EmbossReservedVirtualXPlusTenView &operator=(const EmbossReservedVirtualXPlusTenView &) = + default; + EmbossReservedVirtualXPlusTenView &operator=(EmbossReservedVirtualXPlusTenView &&) = + default; + ~EmbossReservedVirtualXPlusTenView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_x_plus_ten().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()); + } + template + 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; } + + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.x().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int32_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { + view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.x().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericImplicitWriteBackView view_; + }; + EmbossReservedVirtualXPlusTenView x_plus_ten() const; + ::emboss::support::Maybe has_x_plus_ten() const; + + public: + class EmbossReservedVirtualTenPlusXView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualTenPlusXView( + const GenericImplicitWriteBackView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualTenPlusXView() = delete; + EmbossReservedVirtualTenPlusXView(const EmbossReservedVirtualTenPlusXView &) = default; + EmbossReservedVirtualTenPlusXView(EmbossReservedVirtualTenPlusXView &&) = default; + EmbossReservedVirtualTenPlusXView &operator=(const EmbossReservedVirtualTenPlusXView &) = + default; + EmbossReservedVirtualTenPlusXView &operator=(EmbossReservedVirtualTenPlusXView &&) = + default; + ~EmbossReservedVirtualTenPlusXView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_ten_plus_x().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()); + } + template + 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; } + + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.x().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int32_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { + view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.x().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericImplicitWriteBackView view_; + }; + EmbossReservedVirtualTenPlusXView ten_plus_x() const; + ::emboss::support::Maybe has_ten_plus_x() const; + + public: + class EmbossReservedVirtualXMinusTenView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualXMinusTenView( + const GenericImplicitWriteBackView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualXMinusTenView() = delete; + EmbossReservedVirtualXMinusTenView(const EmbossReservedVirtualXMinusTenView &) = default; + EmbossReservedVirtualXMinusTenView(EmbossReservedVirtualXMinusTenView &&) = default; + EmbossReservedVirtualXMinusTenView &operator=(const EmbossReservedVirtualXMinusTenView &) = + default; + EmbossReservedVirtualXMinusTenView &operator=(EmbossReservedVirtualXMinusTenView &&) = + default; + ~EmbossReservedVirtualXMinusTenView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_x_minus_ten().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()); + } + template + 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; } + + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.x().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int32_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { + view_.x().UncheckedWrite((::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Sum(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.x().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(emboss_reserved_local_subexpr_2, ::emboss::support::Maybe(static_cast(10LL))); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericImplicitWriteBackView view_; + }; + EmbossReservedVirtualXMinusTenView x_minus_ten() const; + ::emboss::support::Maybe has_x_minus_ten() const; + + public: + class EmbossReservedVirtualTenMinusXView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualTenMinusXView( + const GenericImplicitWriteBackView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualTenMinusXView() = delete; + EmbossReservedVirtualTenMinusXView(const EmbossReservedVirtualTenMinusXView &) = default; + EmbossReservedVirtualTenMinusXView(EmbossReservedVirtualTenMinusXView &&) = default; + EmbossReservedVirtualTenMinusXView &operator=(const EmbossReservedVirtualTenMinusXView &) = + default; + EmbossReservedVirtualTenMinusXView &operator=(EmbossReservedVirtualTenMinusXView &&) = + default; + ~EmbossReservedVirtualTenMinusXView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_ten_minus_x().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()); + } + template + 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; } + + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.x().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int32_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { + view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Maybe(emboss_reserved_local_value)); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.x().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); + + return emboss_reserved_local_subexpr_3; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericImplicitWriteBackView view_; + }; + EmbossReservedVirtualTenMinusXView ten_minus_x() const; + ::emboss::support::Maybe has_ten_minus_x() const; + + public: + class EmbossReservedVirtualTenMinusXPlusTenView final { + public: + using ValueType = ::std::int32_t; + + explicit EmbossReservedVirtualTenMinusXPlusTenView( + const GenericImplicitWriteBackView &emboss_reserved_local_view) + : view_(emboss_reserved_local_view) {} + EmbossReservedVirtualTenMinusXPlusTenView() = delete; + EmbossReservedVirtualTenMinusXPlusTenView(const EmbossReservedVirtualTenMinusXPlusTenView &) = default; + EmbossReservedVirtualTenMinusXPlusTenView(EmbossReservedVirtualTenMinusXPlusTenView &&) = default; + EmbossReservedVirtualTenMinusXPlusTenView &operator=(const EmbossReservedVirtualTenMinusXPlusTenView &) = + default; + EmbossReservedVirtualTenMinusXPlusTenView &operator=(EmbossReservedVirtualTenMinusXPlusTenView &&) = + default; + ~EmbossReservedVirtualTenMinusXPlusTenView() = default; + + ::std::int32_t Read() const { + EMBOSS_CHECK(view_.has_ten_minus_x_plus_ten().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()); + } + template + 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; } + + bool TryToWrite(::std::int32_t emboss_reserved_local_value) { + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))); + if (!CouldWriteValue(emboss_reserved_local_value)) return false; + return view_.x().TryToWrite( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + void Write(::std::int32_t emboss_reserved_local_value) { + const bool result = TryToWrite(emboss_reserved_local_value); + (void)result; + EMBOSS_CHECK(result); + } + void UncheckedWrite(::std::int32_t emboss_reserved_local_value) { + view_.x().UncheckedWrite((::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL))))).ValueOrDefault()); + } + bool CouldWriteValue(::std::int32_t emboss_reserved_local_value) { + if (!ValueIsOk(emboss_reserved_local_value)) return false; + const auto emboss_reserved_local_maybe_new_value = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), ::emboss::support::Difference(::emboss::support::Maybe(emboss_reserved_local_value), ::emboss::support::Maybe(static_cast(10LL)))); + if (!emboss_reserved_local_maybe_new_value.Known()) return false; + return view_.x().CouldWriteValue( + emboss_reserved_local_maybe_new_value.ValueOrDefault()); + } + template + bool UpdateFromTextStream(Stream *emboss_reserved_local_stream) { + return ::emboss::support::ReadIntegerFromTextStream( + this, emboss_reserved_local_stream); + } + + + + private: + ::emboss::support::Maybe MaybeRead() const { + const auto emboss_reserved_local_subexpr_1 = view_.x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Difference(::emboss::support::Maybe(static_cast(10LL)), emboss_reserved_local_subexpr_2); + const auto emboss_reserved_local_subexpr_4 = ::emboss::support::Sum(emboss_reserved_local_subexpr_3, ::emboss::support::Maybe(static_cast(10LL))); + + return emboss_reserved_local_subexpr_4; + } + + static constexpr bool ValueIsOk( + ::std::int32_t emboss_reserved_local_value) { + return (void)emboss_reserved_local_value, // Silence -Wunused-parameter + ::emboss::support::Maybe(true).ValueOr(false); + } + + const GenericImplicitWriteBackView view_; + }; + EmbossReservedVirtualTenMinusXPlusTenView ten_minus_x_plus_ten() const; + ::emboss::support::Maybe has_ten_minus_x_plus_ten() 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; } + template + 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 has_IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MaxSizeInBytes() { + return ::emboss::support::Maybe(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; } + template + 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 has_MinSizeInBytes() { + return ::emboss::support::Maybe(true); + } + + + + private: + Storage backing_; + + + + template + friend class GenericImplicitWriteBackView; +}; +using ImplicitWriteBackView = + GenericImplicitWriteBackView; +using ImplicitWriteBackWriter = + GenericImplicitWriteBackView; + +template +struct EmbossReservedInternalIsGenericImplicitWriteBackView { + static constexpr const bool value = false; +}; + +template +struct EmbossReservedInternalIsGenericImplicitWriteBackView< + GenericImplicitWriteBackView> { + static constexpr const bool value = true; +}; + +template +inline GenericImplicitWriteBackView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference< + decltype(*::std::declval()->data())>::type, + 1, 0>> +MakeImplicitWriteBackView( T &&emboss_reserved_local_arg) { + return GenericImplicitWriteBackView< + /**/ ::emboss::support::ContiguousBuffer< + typename ::std::remove_reference()->data())>::type, + 1, 0>>( + ::std::forward(emboss_reserved_local_arg)); +} + +template +inline GenericImplicitWriteBackView> +MakeImplicitWriteBackView( T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericImplicitWriteBackView>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +template +inline GenericImplicitWriteBackView< + /**/ ::emboss::support::ContiguousBuffer> +MakeAlignedImplicitWriteBackView( + T *emboss_reserved_local_data, + ::std::size_t emboss_reserved_local_size) { + return GenericImplicitWriteBackView< + /**/ ::emboss::support::ContiguousBuffer>( + emboss_reserved_local_data, + emboss_reserved_local_size); +} + +namespace StructureWithConstants { + +} // namespace StructureWithConstants + + +namespace StructureWithConstants { +inline constexpr ::std::int32_t ten() { + return ::emboss::support::Maybe(static_cast(10LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView::EmbossReservedVirtualTenView::Read() { + return StructureWithConstants::ten(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedVirtualTenView::UncheckedRead() { + return StructureWithConstants::ten(); +} + +namespace StructureWithConstants { +inline constexpr ::std::int32_t twenty() { + return ::emboss::support::Maybe(static_cast(20LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView::EmbossReservedVirtualTwentyView::Read() { + return StructureWithConstants::twenty(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedVirtualTwentyView::UncheckedRead() { + return StructureWithConstants::twenty(); +} + +namespace StructureWithConstants { +inline constexpr ::std::uint32_t four_billion() { + return ::emboss::support::Maybe(static_cast(4000000000ULL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::uint32_t +GenericStructureWithConstantsView::EmbossReservedVirtualFourBillionView::Read() { + return StructureWithConstants::four_billion(); +} + +template +inline constexpr ::std::uint32_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedVirtualFourBillionView::UncheckedRead() { + return StructureWithConstants::four_billion(); +} + +namespace StructureWithConstants { +inline constexpr ::std::int64_t ten_billion() { + return ::emboss::support::Maybe(static_cast(10000000000LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int64_t +GenericStructureWithConstantsView::EmbossReservedVirtualTenBillionView::Read() { + return StructureWithConstants::ten_billion(); +} + +template +inline constexpr ::std::int64_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedVirtualTenBillionView::UncheckedRead() { + return StructureWithConstants::ten_billion(); +} + +namespace StructureWithConstants { +inline constexpr ::std::int64_t minus_ten_billion() { + return ::emboss::support::Maybe(static_cast(-10000000000LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int64_t +GenericStructureWithConstantsView::EmbossReservedVirtualMinusTenBillionView::Read() { + return StructureWithConstants::minus_ten_billion(); +} + +template +inline constexpr ::std::int64_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedVirtualMinusTenBillionView::UncheckedRead() { + return StructureWithConstants::minus_ten_billion(); +} + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithConstantsView::value() + const { + + if ( has_value().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithConstantsView::has_value() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericStructureWithConstantsView::has_alias_of_value() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericStructureWithConstantsView::has_alias_of_alias_of_value() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureWithConstants { +inline constexpr ::std::int32_t alias_of_ten() { + return ::emboss::support::Maybe(static_cast(10LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView::EmbossReservedVirtualAliasOfTenView::Read() { + return StructureWithConstants::alias_of_ten(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedVirtualAliasOfTenView::UncheckedRead() { + return StructureWithConstants::alias_of_ten(); +} + +namespace StructureWithConstants { +inline constexpr ::std::int32_t alias_of_alias_of_ten() { + return ::emboss::support::Maybe(static_cast(10LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView::EmbossReservedVirtualAliasOfAliasOfTenView::Read() { + return StructureWithConstants::alias_of_alias_of_ten(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedVirtualAliasOfAliasOfTenView::UncheckedRead() { + return StructureWithConstants::alias_of_alias_of_ten(); +} + +namespace StructureWithConstants { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructureWithConstants::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructureWithConstants::IntrinsicSizeInBytes(); +} + +namespace StructureWithConstants { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureWithConstants::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureWithConstants::MaxSizeInBytes(); +} + +namespace StructureWithConstants { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithConstants + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureWithConstants::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConstantsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureWithConstants::MinSizeInBytes(); +} +namespace StructureWithComputedValues { + +} // namespace StructureWithComputedValues + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithComputedValuesView::value() + const { + + if ( has_value().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithComputedValuesView::has_value() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithComputedValuesView::EmbossReservedVirtualDoubledView +GenericStructureWithComputedValuesView::doubled() const { + return + typename GenericStructureWithComputedValuesView::EmbossReservedVirtualDoubledView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithComputedValuesView::has_doubled() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithComputedValuesView::EmbossReservedVirtualPlusTenView +GenericStructureWithComputedValuesView::plus_ten() const { + return + typename GenericStructureWithComputedValuesView::EmbossReservedVirtualPlusTenView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithComputedValuesView::has_plus_ten() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithComputedValuesView::value2() + const { + + if ( has_value2().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::IntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithComputedValuesView::has_value2() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithComputedValuesView::EmbossReservedVirtualSignedDoubledView +GenericStructureWithComputedValuesView::signed_doubled() const { + return + typename GenericStructureWithComputedValuesView::EmbossReservedVirtualSignedDoubledView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithComputedValuesView::has_signed_doubled() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithComputedValuesView::EmbossReservedVirtualSignedPlusTenView +GenericStructureWithComputedValuesView::signed_plus_ten() const { + return + typename GenericStructureWithComputedValuesView::EmbossReservedVirtualSignedPlusTenView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithComputedValuesView::has_signed_plus_ten() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithComputedValuesView::EmbossReservedVirtualProductView +GenericStructureWithComputedValuesView::product() const { + return + typename GenericStructureWithComputedValuesView::EmbossReservedVirtualProductView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithComputedValuesView::has_product() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureWithComputedValues { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace StructureWithComputedValues + +template +inline constexpr ::std::int32_t +GenericStructureWithComputedValuesView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructureWithComputedValues::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithComputedValuesView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructureWithComputedValues::IntrinsicSizeInBytes(); +} + +namespace StructureWithComputedValues { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace StructureWithComputedValues + +template +inline constexpr ::std::int32_t +GenericStructureWithComputedValuesView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureWithComputedValues::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithComputedValuesView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureWithComputedValues::MaxSizeInBytes(); +} + +namespace StructureWithComputedValues { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace StructureWithComputedValues + +template +inline constexpr ::std::int32_t +GenericStructureWithComputedValuesView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureWithComputedValues::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithComputedValuesView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureWithComputedValues::MinSizeInBytes(); +} +namespace StructureWithConditionalValue { + +} // namespace StructureWithConditionalValue + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithConditionalValueView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithConditionalValueView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithConditionalValueView::EmbossReservedVirtualTwoXView +GenericStructureWithConditionalValueView::two_x() const { + return + typename GenericStructureWithConditionalValueView::EmbossReservedVirtualTwoXView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithConditionalValueView::has_two_x() const { + return ::emboss::support::LessThan((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(2147483648ULL))); +} + + +template +inline typename GenericStructureWithConditionalValueView::EmbossReservedVirtualXPlusOneView +GenericStructureWithConditionalValueView::x_plus_one() const { + return + typename GenericStructureWithConditionalValueView::EmbossReservedVirtualXPlusOneView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithConditionalValueView::has_x_plus_one() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureWithConditionalValue { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithConditionalValue + +template +inline constexpr ::std::int32_t +GenericStructureWithConditionalValueView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructureWithConditionalValue::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConditionalValueView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructureWithConditionalValue::IntrinsicSizeInBytes(); +} + +namespace StructureWithConditionalValue { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithConditionalValue + +template +inline constexpr ::std::int32_t +GenericStructureWithConditionalValueView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureWithConditionalValue::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConditionalValueView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureWithConditionalValue::MaxSizeInBytes(); +} + +namespace StructureWithConditionalValue { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithConditionalValue + +template +inline constexpr ::std::int32_t +GenericStructureWithConditionalValueView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureWithConditionalValue::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithConditionalValueView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureWithConditionalValue::MinSizeInBytes(); +} +namespace StructureWithValueInCondition { + +} // namespace StructureWithValueInCondition + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithValueInConditionView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValueInConditionView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithValueInConditionView::EmbossReservedVirtualTwoXView +GenericStructureWithValueInConditionView::two_x() const { + return + typename GenericStructureWithValueInConditionView::EmbossReservedVirtualTwoXView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValueInConditionView::has_two_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithValueInConditionView::if_two_x_lt_100() + const { + + if ( has_if_two_x_lt_100().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValueInConditionView::has_if_two_x_lt_100() const { + return ::emboss::support::LessThan((two_x().Ok() ? ::emboss::support::Maybe(static_cast(two_x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(100LL))); +} + + +template +inline typename GenericStructureWithValueInConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericStructureWithValueInConditionView::IntrinsicSizeInBytes() const { + return + typename GenericStructureWithValueInConditionView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValueInConditionView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureWithValueInCondition { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace StructureWithValueInCondition + +template +inline constexpr ::std::int32_t +GenericStructureWithValueInConditionView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureWithValueInCondition::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithValueInConditionView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureWithValueInCondition::MaxSizeInBytes(); +} + +namespace StructureWithValueInCondition { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithValueInCondition + +template +inline constexpr ::std::int32_t +GenericStructureWithValueInConditionView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureWithValueInCondition::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithValueInConditionView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureWithValueInCondition::MinSizeInBytes(); +} +namespace StructureWithValuesInLocation { + +} // namespace StructureWithValuesInLocation + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithValuesInLocationView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValuesInLocationView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithValuesInLocationView::EmbossReservedVirtualTwoXView +GenericStructureWithValuesInLocationView::two_x() const { + return + typename GenericStructureWithValuesInLocationView::EmbossReservedVirtualTwoXView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValuesInLocationView::has_two_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithValuesInLocationView::offset_two_x() + const { + + if ( has_offset_two_x().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = two_x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = emboss_reserved_local_subexpr_2; + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<2, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValuesInLocationView::has_offset_two_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithValuesInLocationView::size_two_x() + const { + + if ( has_size_two_x().ValueOr(false)) { + const auto emboss_reserved_local_subexpr_1 = two_x(); + const auto emboss_reserved_local_subexpr_2 = (emboss_reserved_local_subexpr_1.Ok() ? ::emboss::support::Maybe(static_cast(emboss_reserved_local_subexpr_1.UncheckedRead())) : ::emboss::support::Maybe()); + + auto emboss_reserved_local_size = emboss_reserved_local_subexpr_2; + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValuesInLocationView::has_size_two_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithValuesInLocationView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericStructureWithValuesInLocationView::IntrinsicSizeInBytes() const { + return + typename GenericStructureWithValuesInLocationView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithValuesInLocationView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureWithValuesInLocation { +inline constexpr ::std::int64_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8589934594LL)).ValueOrDefault(); +} +} // namespace StructureWithValuesInLocation + +template +inline constexpr ::std::int64_t +GenericStructureWithValuesInLocationView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureWithValuesInLocation::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int64_t +GenericStructureWithValuesInLocationView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureWithValuesInLocation::MaxSizeInBytes(); +} + +namespace StructureWithValuesInLocation { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithValuesInLocation + +template +inline constexpr ::std::int32_t +GenericStructureWithValuesInLocationView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureWithValuesInLocation::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithValuesInLocationView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureWithValuesInLocation::MinSizeInBytes(); +} +namespace StructureWithBoolValue { + +} // namespace StructureWithBoolValue + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithBoolValueView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithBoolValueView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithBoolValueView::EmbossReservedVirtualXIsTenView +GenericStructureWithBoolValueView::x_is_ten() const { + return + typename GenericStructureWithBoolValueView::EmbossReservedVirtualXIsTenView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithBoolValueView::has_x_is_ten() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureWithBoolValue { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithBoolValue + +template +inline constexpr ::std::int32_t +GenericStructureWithBoolValueView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructureWithBoolValue::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithBoolValueView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructureWithBoolValue::IntrinsicSizeInBytes(); +} + +namespace StructureWithBoolValue { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithBoolValue + +template +inline constexpr ::std::int32_t +GenericStructureWithBoolValueView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureWithBoolValue::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithBoolValueView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureWithBoolValue::MaxSizeInBytes(); +} + +namespace StructureWithBoolValue { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithBoolValue + +template +inline constexpr ::std::int32_t +GenericStructureWithBoolValueView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureWithBoolValue::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithBoolValueView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureWithBoolValue::MinSizeInBytes(); +} +namespace StructureWithEnumValue { + +} // namespace StructureWithEnumValue + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureWithEnumValueView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithEnumValueView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithEnumValueView::EmbossReservedVirtualXSizeView +GenericStructureWithEnumValueView::x_size() const { + return + typename GenericStructureWithEnumValueView::EmbossReservedVirtualXSizeView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithEnumValueView::has_x_size() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureWithEnumValue { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithEnumValue + +template +inline constexpr ::std::int32_t +GenericStructureWithEnumValueView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructureWithEnumValue::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithEnumValueView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructureWithEnumValue::IntrinsicSizeInBytes(); +} + +namespace StructureWithEnumValue { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithEnumValue + +template +inline constexpr ::std::int32_t +GenericStructureWithEnumValueView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureWithEnumValue::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithEnumValueView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureWithEnumValue::MaxSizeInBytes(); +} + +namespace StructureWithEnumValue { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithEnumValue + +template +inline constexpr ::std::int32_t +GenericStructureWithEnumValueView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureWithEnumValue::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithEnumValueView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureWithEnumValue::MinSizeInBytes(); +} +namespace StructureWithBitsWithValue { + +} // namespace StructureWithBitsWithValue + + +template +inline typename ::emboss::test::GenericBitsWithValueView>, 32>> + + GenericStructureWithBitsWithValueView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericBitsWithValueView>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericBitsWithValueView>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithBitsWithValueView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericStructureWithBitsWithValueView::EmbossReservedVirtualAliasOfBSumView +GenericStructureWithBitsWithValueView::alias_of_b_sum() const { + return + typename GenericStructureWithBitsWithValueView::EmbossReservedVirtualAliasOfBSumView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericStructureWithBitsWithValueView::has_alias_of_b_sum() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericStructureWithBitsWithValueView::has_alias_of_b_a() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureWithBitsWithValue { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithBitsWithValue + +template +inline constexpr ::std::int32_t +GenericStructureWithBitsWithValueView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructureWithBitsWithValue::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithBitsWithValueView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructureWithBitsWithValue::IntrinsicSizeInBytes(); +} + +namespace StructureWithBitsWithValue { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithBitsWithValue + +template +inline constexpr ::std::int32_t +GenericStructureWithBitsWithValueView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureWithBitsWithValue::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithBitsWithValueView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureWithBitsWithValue::MaxSizeInBytes(); +} + +namespace StructureWithBitsWithValue { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace StructureWithBitsWithValue + +template +inline constexpr ::std::int32_t +GenericStructureWithBitsWithValueView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureWithBitsWithValue::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureWithBitsWithValueView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureWithBitsWithValue::MinSizeInBytes(); +} +namespace BitsWithValue { + +} // namespace BitsWithValue + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericBitsWithValueView::a() + const { + + if ( has_a().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(16LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBitsWithValueView::has_a() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericBitsWithValueView::b() + const { + + if ( has_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(16LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(16LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 16>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericBitsWithValueView::has_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericBitsWithValueView::EmbossReservedVirtualSumView +GenericBitsWithValueView::sum() const { + return + typename GenericBitsWithValueView::EmbossReservedVirtualSumView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericBitsWithValueView::has_sum() const { + return ::emboss::support::Maybe(true); +} + + +namespace BitsWithValue { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace BitsWithValue + +template +inline constexpr ::std::int32_t +GenericBitsWithValueView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return BitsWithValue::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericBitsWithValueView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return BitsWithValue::IntrinsicSizeInBits(); +} + +namespace BitsWithValue { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace BitsWithValue + +template +inline constexpr ::std::int32_t +GenericBitsWithValueView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return BitsWithValue::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericBitsWithValueView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return BitsWithValue::MaxSizeInBits(); +} + +namespace BitsWithValue { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(32LL)).ValueOrDefault(); +} +} // namespace BitsWithValue + +template +inline constexpr ::std::int32_t +GenericBitsWithValueView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return BitsWithValue::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericBitsWithValueView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return BitsWithValue::MinSizeInBits(); +} +namespace StructureUsingForeignConstants { + +} // namespace StructureUsingForeignConstants + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + + GenericStructureUsingForeignConstantsView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(10LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 10>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<32, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericStructureUsingForeignConstantsView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +namespace StructureUsingForeignConstants { +inline constexpr ::std::int32_t one_hundred() { + return ::emboss::support::Maybe(static_cast(100LL)).ValueOrDefault(); +} +} // namespace StructureUsingForeignConstants + +template +inline constexpr ::std::int32_t +GenericStructureUsingForeignConstantsView::EmbossReservedVirtualOneHundredView::Read() { + return StructureUsingForeignConstants::one_hundred(); +} + +template +inline constexpr ::std::int32_t +GenericStructureUsingForeignConstantsView< + Storage>::EmbossReservedVirtualOneHundredView::UncheckedRead() { + return StructureUsingForeignConstants::one_hundred(); +} + +namespace StructureUsingForeignConstants { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(14LL)).ValueOrDefault(); +} +} // namespace StructureUsingForeignConstants + +template +inline constexpr ::std::int32_t +GenericStructureUsingForeignConstantsView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return StructureUsingForeignConstants::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureUsingForeignConstantsView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return StructureUsingForeignConstants::IntrinsicSizeInBytes(); +} + +namespace StructureUsingForeignConstants { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(14LL)).ValueOrDefault(); +} +} // namespace StructureUsingForeignConstants + +template +inline constexpr ::std::int32_t +GenericStructureUsingForeignConstantsView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return StructureUsingForeignConstants::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureUsingForeignConstantsView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return StructureUsingForeignConstants::MaxSizeInBytes(); +} + +namespace StructureUsingForeignConstants { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(14LL)).ValueOrDefault(); +} +} // namespace StructureUsingForeignConstants + +template +inline constexpr ::std::int32_t +GenericStructureUsingForeignConstantsView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return StructureUsingForeignConstants::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericStructureUsingForeignConstantsView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return StructureUsingForeignConstants::MinSizeInBytes(); +} +namespace SubfieldOfAlias { +namespace Header { + +} // namespace Header + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericHeaderView::size() + const { + + if ( has_size().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericHeaderView::has_size() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + + GenericHeaderView::message_id() + const { + + if ( has_message_id().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(2LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +( + backing_ + .template GetOffsetStorage<0, + 2>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<16, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 16>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericHeaderView::has_message_id() const { + return ::emboss::support::Maybe(true); +} + + +namespace Header { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Header + +template +inline constexpr ::std::int32_t +GenericHeaderView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return Header::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericHeaderView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return Header::IntrinsicSizeInBytes(); +} + +namespace Header { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Header + +template +inline constexpr ::std::int32_t +GenericHeaderView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return Header::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericHeaderView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return Header::MaxSizeInBytes(); +} + +namespace Header { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace Header + +template +inline constexpr ::std::int32_t +GenericHeaderView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return Header::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericHeaderView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return Header::MinSizeInBytes(); +} + +} // namespace SubfieldOfAlias + + +template +inline typename ::emboss::test::SubfieldOfAlias::GenericHeaderView> + + GenericSubfieldOfAliasView::header() + const { + + if ( has_header().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::SubfieldOfAlias::GenericHeaderView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::SubfieldOfAlias::GenericHeaderView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericSubfieldOfAliasView::has_header() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericSubfieldOfAliasView::has_h() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericSubfieldOfAliasView::has_size() const { + return ::emboss::support::Maybe(true); +} + + +namespace SubfieldOfAlias { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace SubfieldOfAlias + +template +inline constexpr ::std::int32_t +GenericSubfieldOfAliasView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return SubfieldOfAlias::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSubfieldOfAliasView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return SubfieldOfAlias::IntrinsicSizeInBytes(); +} + +namespace SubfieldOfAlias { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace SubfieldOfAlias + +template +inline constexpr ::std::int32_t +GenericSubfieldOfAliasView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return SubfieldOfAlias::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSubfieldOfAliasView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return SubfieldOfAlias::MaxSizeInBytes(); +} + +namespace SubfieldOfAlias { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(4LL)).ValueOrDefault(); +} +} // namespace SubfieldOfAlias + +template +inline constexpr ::std::int32_t +GenericSubfieldOfAliasView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return SubfieldOfAlias::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericSubfieldOfAliasView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return SubfieldOfAlias::MinSizeInBytes(); +} +namespace RestrictedAlias { + +} // namespace RestrictedAlias + + +template +inline typename ::emboss::test::GenericBitsWithValueView>, 32>> + + GenericRestrictedAliasView::a_b() + const { + + if ( has_a_b().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericBitsWithValueView>, 32>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericBitsWithValueView>, 32>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRestrictedAliasView::has_a_b() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericRestrictedAliasView::alias_switch() + const { + + if ( has_alias_switch().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRestrictedAliasView::has_alias_switch() const { + return ::emboss::support::Maybe(true); +} + + +template +inline ::emboss::support::Maybe +GenericRestrictedAliasView::has_a_b_alias() const { + return ::emboss::support::GreaterThan((alias_switch().Ok() ? ::emboss::support::Maybe(static_cast(alias_switch().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); +} + + +namespace RestrictedAlias { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(5LL)).ValueOrDefault(); +} +} // namespace RestrictedAlias + +template +inline constexpr ::std::int32_t +GenericRestrictedAliasView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return RestrictedAlias::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRestrictedAliasView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return RestrictedAlias::IntrinsicSizeInBytes(); +} + +namespace RestrictedAlias { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(5LL)).ValueOrDefault(); +} +} // namespace RestrictedAlias + +template +inline constexpr ::std::int32_t +GenericRestrictedAliasView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return RestrictedAlias::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRestrictedAliasView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return RestrictedAlias::MaxSizeInBytes(); +} + +namespace RestrictedAlias { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(5LL)).ValueOrDefault(); +} +} // namespace RestrictedAlias + +template +inline constexpr ::std::int32_t +GenericRestrictedAliasView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return RestrictedAlias::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericRestrictedAliasView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return RestrictedAlias::MinSizeInBytes(); +} +namespace HasField { +namespace X { + +} // namespace X + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericXView::v() + const { + + if ( has_v().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericXView::has_v() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericXView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericXView::has_y() const { + return ::emboss::support::GreaterThan((v().Ok() ? ::emboss::support::Maybe(static_cast(v().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); +} + + +template +inline typename GenericXView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericXView::IntrinsicSizeInBytes() const { + return + typename GenericXView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericXView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace X { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace X + +template +inline constexpr ::std::int32_t +GenericXView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return X::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericXView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return X::MaxSizeInBytes(); +} + +namespace X { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace X + +template +inline constexpr ::std::int32_t +GenericXView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return X::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericXView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return X::MinSizeInBytes(); +} + +} // namespace HasField + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericHasFieldView::z() + const { + + if ( has_z().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericHasFieldView::has_z() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::HasField::GenericXView> + + GenericHasFieldView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(2LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::HasField::GenericXView> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::HasField::GenericXView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericHasFieldView::has_x() const { + return ::emboss::support::GreaterThan((z().Ok() ? ::emboss::support::Maybe(static_cast(z().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(10LL))); +} + + +template +inline ::emboss::support::Maybe +GenericHasFieldView::has_y() const { + return x().has_y(); +} + + +template +inline typename GenericHasFieldView::EmbossReservedVirtualXHasYView +GenericHasFieldView::x_has_y() const { + return + typename GenericHasFieldView::EmbossReservedVirtualXHasYView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericHasFieldView::has_x_has_y() const { + return has_x(); +} + + +template +inline typename GenericHasFieldView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericHasFieldView::IntrinsicSizeInBytes() const { + return + typename GenericHasFieldView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericHasFieldView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace HasField { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(3LL)).ValueOrDefault(); +} +} // namespace HasField + +template +inline constexpr ::std::int32_t +GenericHasFieldView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return HasField::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericHasFieldView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return HasField::MaxSizeInBytes(); +} + +namespace HasField { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace HasField + +template +inline constexpr ::std::int32_t +GenericHasFieldView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return HasField::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericHasFieldView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return HasField::MinSizeInBytes(); +} +namespace VirtualUnconditionallyUsesConditional { + +} // namespace VirtualUnconditionallyUsesConditional + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericVirtualUnconditionallyUsesConditionalView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericVirtualUnconditionallyUsesConditionalView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericVirtualUnconditionallyUsesConditionalView::xc() + const { + + if ( has_xc().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(1LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 1>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericVirtualUnconditionallyUsesConditionalView::has_xc() const { + return ::emboss::support::Equal((x().Ok() ? ::emboss::support::Maybe(static_cast(x().UncheckedRead())) : ::emboss::support::Maybe()), ::emboss::support::Maybe(static_cast(0LL))); +} + + +template +inline typename GenericVirtualUnconditionallyUsesConditionalView::EmbossReservedVirtualXNorXcView +GenericVirtualUnconditionallyUsesConditionalView::x_nor_xc() const { + return + typename GenericVirtualUnconditionallyUsesConditionalView::EmbossReservedVirtualXNorXcView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericVirtualUnconditionallyUsesConditionalView::has_x_nor_xc() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericVirtualUnconditionallyUsesConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView +GenericVirtualUnconditionallyUsesConditionalView::IntrinsicSizeInBytes() const { + return + typename GenericVirtualUnconditionallyUsesConditionalView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericVirtualUnconditionallyUsesConditionalView::has_IntrinsicSizeInBytes() const { + return ::emboss::support::Maybe(true); +} + + +namespace VirtualUnconditionallyUsesConditional { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(2LL)).ValueOrDefault(); +} +} // namespace VirtualUnconditionallyUsesConditional + +template +inline constexpr ::std::int32_t +GenericVirtualUnconditionallyUsesConditionalView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return VirtualUnconditionallyUsesConditional::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericVirtualUnconditionallyUsesConditionalView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return VirtualUnconditionallyUsesConditional::MaxSizeInBytes(); +} + +namespace VirtualUnconditionallyUsesConditional { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace VirtualUnconditionallyUsesConditional + +template +inline constexpr ::std::int32_t +GenericVirtualUnconditionallyUsesConditionalView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return VirtualUnconditionallyUsesConditional::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericVirtualUnconditionallyUsesConditionalView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return VirtualUnconditionallyUsesConditional::MinSizeInBytes(); +} +namespace UsesSize { +namespace R { + +} // namespace R + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + + GenericRView::q() + const { + + if ( has_q().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(8LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename Storage::template OffsetStorageType> + +(); +} + +template +inline ::emboss::support::Maybe +GenericRView::has_q() const { + return ::emboss::support::Maybe(true); +} + + +namespace R { +inline constexpr ::std::int32_t IntrinsicSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace R + +template +inline constexpr ::std::int32_t +GenericRView::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::Read() { + return R::IntrinsicSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericRView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBitsView::UncheckedRead() { + return R::IntrinsicSizeInBits(); +} + +template +inline typename GenericRView::EmbossReservedVirtualQPlusBitSizeView +GenericRView::q_plus_bit_size() const { + return + typename GenericRView::EmbossReservedVirtualQPlusBitSizeView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericRView::has_q_plus_bit_size() const { + return ::emboss::support::Maybe(true); +} + + +namespace R { +inline constexpr ::std::int32_t MaxSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace R + +template +inline constexpr ::std::int32_t +GenericRView::EmbossReservedDollarVirtualMaxSizeInBitsView::Read() { + return R::MaxSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericRView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBitsView::UncheckedRead() { + return R::MaxSizeInBits(); +} + +namespace R { +inline constexpr ::std::int32_t MinSizeInBits() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace R + +template +inline constexpr ::std::int32_t +GenericRView::EmbossReservedDollarVirtualMinSizeInBitsView::Read() { + return R::MinSizeInBits(); +} + +template +inline constexpr ::std::int32_t +GenericRView< + Storage>::EmbossReservedDollarVirtualMinSizeInBitsView::UncheckedRead() { + return R::MinSizeInBits(); +} + +} // namespace UsesSize + + +template +inline typename ::emboss::test::UsesSize::GenericRView>, 8>> + + GenericUsesSizeView::r() + const { + + if ( has_r().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::UsesSize::GenericRView>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::UsesSize::GenericRView>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericUsesSizeView::has_r() const { + return ::emboss::support::Maybe(true); +} + + +namespace UsesSize { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace UsesSize + +template +inline constexpr ::std::int32_t +GenericUsesSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return UsesSize::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUsesSizeView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return UsesSize::IntrinsicSizeInBytes(); +} + +template +inline typename GenericUsesSizeView::EmbossReservedVirtualRQPlusByteSizeView +GenericUsesSizeView::r_q_plus_byte_size() const { + return + typename GenericUsesSizeView::EmbossReservedVirtualRQPlusByteSizeView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericUsesSizeView::has_r_q_plus_byte_size() const { + return ::emboss::support::Maybe(true); +} + + +namespace UsesSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace UsesSize + +template +inline constexpr ::std::int32_t +GenericUsesSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return UsesSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUsesSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return UsesSize::MaxSizeInBytes(); +} + +namespace UsesSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace UsesSize + +template +inline constexpr ::std::int32_t +GenericUsesSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return UsesSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUsesSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return UsesSize::MinSizeInBytes(); +} +namespace UsesExternalSize { + +} // namespace UsesExternalSize + + +template +inline typename ::emboss::test::GenericStructureWithConstantsView> + + GenericUsesExternalSizeView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericStructureWithConstantsView> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericStructureWithConstantsView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericUsesExternalSizeView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename ::emboss::test::GenericStructureWithConstantsView> + + GenericUsesExternalSizeView::y() + const { + + if ( has_y().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(4LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(4LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::test::GenericStructureWithConstantsView> + +( + backing_ + .template GetOffsetStorage<0, + 4>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::test::GenericStructureWithConstantsView> + +(); +} + +template +inline ::emboss::support::Maybe +GenericUsesExternalSizeView::has_y() const { + return ::emboss::support::Maybe(true); +} + + +namespace UsesExternalSize { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace UsesExternalSize + +template +inline constexpr ::std::int32_t +GenericUsesExternalSizeView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return UsesExternalSize::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUsesExternalSizeView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return UsesExternalSize::IntrinsicSizeInBytes(); +} + +namespace UsesExternalSize { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace UsesExternalSize + +template +inline constexpr ::std::int32_t +GenericUsesExternalSizeView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return UsesExternalSize::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUsesExternalSizeView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return UsesExternalSize::MaxSizeInBytes(); +} + +namespace UsesExternalSize { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(8LL)).ValueOrDefault(); +} +} // namespace UsesExternalSize + +template +inline constexpr ::std::int32_t +GenericUsesExternalSizeView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return UsesExternalSize::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericUsesExternalSizeView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return UsesExternalSize::MinSizeInBytes(); +} +namespace ImplicitWriteBack { + +} // namespace ImplicitWriteBack + + +template +inline typename ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + + GenericImplicitWriteBackView::x() + const { + + if ( has_x().ValueOr(false)) { + + auto emboss_reserved_local_size = ::emboss::support::Maybe(static_cast(1LL)); + auto emboss_reserved_local_offset = ::emboss::support::Maybe(static_cast(0LL)); + if (emboss_reserved_local_size.Known() && + emboss_reserved_local_size.ValueOr(0) >= 0 && + emboss_reserved_local_offset.Known() && + emboss_reserved_local_offset.ValueOr(0) >= 0) { + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +( + backing_ + .template GetOffsetStorage<0, + 0>( + emboss_reserved_local_offset.ValueOrDefault(), + emboss_reserved_local_size.ValueOrDefault())); + } + } + return ::emboss::prelude::UIntView< + /**/ ::emboss::support::FixedSizeViewParameters<8, ::emboss::support::AllValuesAreOk>, + typename ::emboss::support::BitBlock>, 8>> + +(); +} + +template +inline ::emboss::support::Maybe +GenericImplicitWriteBackView::has_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericImplicitWriteBackView::EmbossReservedVirtualXPlusTenView +GenericImplicitWriteBackView::x_plus_ten() const { + return + typename GenericImplicitWriteBackView::EmbossReservedVirtualXPlusTenView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericImplicitWriteBackView::has_x_plus_ten() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericImplicitWriteBackView::EmbossReservedVirtualTenPlusXView +GenericImplicitWriteBackView::ten_plus_x() const { + return + typename GenericImplicitWriteBackView::EmbossReservedVirtualTenPlusXView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericImplicitWriteBackView::has_ten_plus_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericImplicitWriteBackView::EmbossReservedVirtualXMinusTenView +GenericImplicitWriteBackView::x_minus_ten() const { + return + typename GenericImplicitWriteBackView::EmbossReservedVirtualXMinusTenView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericImplicitWriteBackView::has_x_minus_ten() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericImplicitWriteBackView::EmbossReservedVirtualTenMinusXView +GenericImplicitWriteBackView::ten_minus_x() const { + return + typename GenericImplicitWriteBackView::EmbossReservedVirtualTenMinusXView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericImplicitWriteBackView::has_ten_minus_x() const { + return ::emboss::support::Maybe(true); +} + + +template +inline typename GenericImplicitWriteBackView::EmbossReservedVirtualTenMinusXPlusTenView +GenericImplicitWriteBackView::ten_minus_x_plus_ten() const { + return + typename GenericImplicitWriteBackView::EmbossReservedVirtualTenMinusXPlusTenView( + *this); +} + +template +inline ::emboss::support::Maybe +GenericImplicitWriteBackView::has_ten_minus_x_plus_ten() const { + return ::emboss::support::Maybe(true); +} + + +namespace ImplicitWriteBack { +inline constexpr ::std::int32_t IntrinsicSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ImplicitWriteBack + +template +inline constexpr ::std::int32_t +GenericImplicitWriteBackView::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::Read() { + return ImplicitWriteBack::IntrinsicSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericImplicitWriteBackView< + Storage>::EmbossReservedDollarVirtualIntrinsicSizeInBytesView::UncheckedRead() { + return ImplicitWriteBack::IntrinsicSizeInBytes(); +} + +namespace ImplicitWriteBack { +inline constexpr ::std::int32_t MaxSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ImplicitWriteBack + +template +inline constexpr ::std::int32_t +GenericImplicitWriteBackView::EmbossReservedDollarVirtualMaxSizeInBytesView::Read() { + return ImplicitWriteBack::MaxSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericImplicitWriteBackView< + Storage>::EmbossReservedDollarVirtualMaxSizeInBytesView::UncheckedRead() { + return ImplicitWriteBack::MaxSizeInBytes(); +} + +namespace ImplicitWriteBack { +inline constexpr ::std::int32_t MinSizeInBytes() { + return ::emboss::support::Maybe(static_cast(1LL)).ValueOrDefault(); +} +} // namespace ImplicitWriteBack + +template +inline constexpr ::std::int32_t +GenericImplicitWriteBackView::EmbossReservedDollarVirtualMinSizeInBytesView::Read() { + return ImplicitWriteBack::MinSizeInBytes(); +} + +template +inline constexpr ::std::int32_t +GenericImplicitWriteBackView< + Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { + return ImplicitWriteBack::MinSizeInBytes(); +} + + + +} // namespace test + + + +} // namespace emboss + + + +/* NOLINTEND */ + +#endif // TESTDATA_VIRTUAL_FIELD_EMB_H_ +