From 6da044154c3ec60beeb8b87f43d514d8b54b63dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 6 Dec 2025 02:52:36 +0000 Subject: [PATCH 1/3] Initial plan From ecd87581dd74c127311eb852b7c20ad66f6e1ad1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 6 Dec 2025 03:12:24 +0000 Subject: [PATCH 2/3] Add static IntrinsicSizeInBytes(parameters) for structs with parameter-dependent size Co-authored-by: AaronWebster <3766083+AaronWebster@users.noreply.github.com> --- .../back_end/cpp/generated_code_templates | 12 + compiler/back_end/cpp/header_generator.py | 233 +- .../back_end/cpp/testcode/parameters_test.cc | 19 + testdata/golden_cpp/testdata/parameters.emb.h | 10763 ++++++++++++++++ testdata/parameters.emb.h | 10744 +++++++++++++++ 5 files changed, 21759 insertions(+), 12 deletions(-) create mode 100644 testdata/golden_cpp/testdata/parameters.emb.h create mode 100644 testdata/parameters.emb.h diff --git a/compiler/back_end/cpp/generated_code_templates b/compiler/back_end/cpp/generated_code_templates index e8f7c46..470a00b 100644 --- a/compiler/back_end/cpp/generated_code_templates +++ b/compiler/back_end/cpp/generated_code_templates @@ -388,6 +388,18 @@ ${write_fields} bool SizeIsKnown() const { return IntrinsicSizeIn${units}().Ok(); } +// ** static_size_from_parameters_declaration ** /////////////////////////////// + static constexpr ::std::size_t IntrinsicSizeIn${units}(${parameters}); + +// ** static_size_from_parameters_definition ** //////////////////////////////// +namespace ${parent_type} { +inline constexpr ::std::size_t IntrinsicSizeIn${units}(${parameters}) { +${subexpressions} + return static_cast((${read_value}).ValueOrDefault()); +} +} // namespace ${parent_type} + + // ** ok_method_test ** //////////////////////////////////////////////////////// // If we don't have enough information to determine whether ${field} is // present in the structure, then structure.Ok() should be false. diff --git a/compiler/back_end/cpp/header_generator.py b/compiler/back_end/cpp/header_generator.py index 5860bc8..39ead49 100644 --- a/compiler/back_end/cpp/header_generator.py +++ b/compiler/back_end/cpp/header_generator.py @@ -768,6 +768,104 @@ def render_field(self, expression, ir, subexpressions): ) +def _expression_only_depends_on_parameters(expression, parameter_names): + """Checks if an expression only depends on parameters (not fields). + + Arguments: + expression: The expression to check. + parameter_names: A set of parameter names that are valid dependencies. + + Returns: + True if the expression only depends on constants and the given parameters, + False if it depends on any fields. + """ + expression = ir_data_utils.reader(expression) + + # Constant expressions are fine + if expression.type.which_type == "integer": + if expression.type.integer.modulus == "infinity": + return True + elif expression.type.which_type == "boolean": + if expression.type.boolean.has_field("value"): + return True + elif expression.type.which_type == "enumeration": + if expression.type.enumeration.has_field("value"): + return True + + # Check the expression kind + if expression.which_expression == "constant": + return True + elif expression.which_expression == "constant_reference": + return True + elif expression.which_expression == "boolean_constant": + return True + elif expression.which_expression == "field_reference": + # Field references can be parameters if they reference a parameter field. + # Parameters are represented as field_references with a single-element path + # where the field name matches a parameter name. + path = expression.field_reference.path + if len(path) == 1: + field_name = path[0].canonical_name.object_path[-1] + if field_name in parameter_names: + return True + return False + elif expression.which_expression == "builtin_reference": + # Check if this is a parameter reference + name = expression.builtin_reference.canonical_name.object_path[-1] + return name in parameter_names + elif expression.which_expression == "function": + # Recursively check all arguments + for arg in expression.function.args: + if not _expression_only_depends_on_parameters(arg, parameter_names): + return False + return True + elif expression.which_expression is None: + return True + + return False + + +class _StaticParameterFieldRenderer(object): + """Renderer for expressions in static parameterized functions. + + This renderer is used to generate code for expressions that only depend on + parameters, where the parameters are passed as function arguments rather + than accessed through a view. + """ + + def __init__(self, parameter_names, ir): + """Initialize the renderer. + + Arguments: + parameter_names: A set of parameter names. + ir: The IR for type lookups. + """ + self._parameter_names = parameter_names + self._ir = ir + + def render_existence(self, expression, subexpressions): + # Parameters always exist + del expression, subexpressions # Unused + return _maybe_type("bool") + "(true)" + + def render_field(self, expression, ir, subexpressions): + # For static parameter functions, field references that point to parameters + # should be rendered as direct variable access. + path = expression.field_reference.path + if len(path) == 1: + field_name = path[0].canonical_name.object_path[-1] + if field_name in self._parameter_names: + expression_cpp_type = _cpp_basic_type_for_expression(expression, ir) + return "{}({})".format(_maybe_type(expression_cpp_type), field_name) + # This shouldn't happen as we filtered expressions to only those that + # depend on parameters + assert False, ( + "Non-parameter field reference in static parameter expression: {}".format( + expression + ) + ) + + class _SubexpressionStore(object): """Holder for subexpressions to be assigned to local variables.""" @@ -849,16 +947,22 @@ def _render_expression(expression, ir, field_reader=None, subexpressions=None): result = _render_builtin_operation(expression, ir, field_reader, subexpressions) elif expression.which_expression == "field_reference": result = field_reader.render_field(expression, ir, subexpressions) - elif ( - expression.which_expression == "builtin_reference" - and expression.builtin_reference.canonical_name.object_path[-1] - == "$logical_value" - ): - return _ExpressionResult( - _maybe_type("decltype(emboss_reserved_local_value)") - + "(emboss_reserved_local_value)", - False, - ) + elif expression.which_expression == "builtin_reference": + name = expression.builtin_reference.canonical_name.object_path[-1] + if name == "$logical_value": + return _ExpressionResult( + _maybe_type("decltype(emboss_reserved_local_value)") + + "(emboss_reserved_local_value)", + False, + ) + elif isinstance(field_reader, _StaticParameterFieldRenderer): + # For static parameter functions, render parameter as direct variable + expression_cpp_type = _cpp_basic_type_for_expression(expression, ir) + result = "{}({})".format(_maybe_type(expression_cpp_type), name) + else: + # This shouldn't happen - non-logical-value builtin references should + # be handled by type checking + result = None # Any of the constant expression types should have been handled in the # previous section. @@ -1232,6 +1336,105 @@ def _render_size_method(fields, ir): assert False, "Expected a $size_in_bits or $size_in_bytes field." +def _generate_static_size_from_parameters(type_ir, ir): + """Generates a static IntrinsicSizeInBytes(params) function if applicable. + + For structs where the size depends only on parameters (not on field values), + generates a static function that computes the size from parameters alone. + + Arguments: + type_ir: The IR for the struct definition. + ir: The full IR; used for type lookups. + + Returns: + A tuple of (declaration, definition) strings, or ("", "") if not applicable. + """ + # Only applicable if the struct has parameters + if not type_ir.runtime_parameter: + return "", "" + + # Find the size field ($size_in_bits or $size_in_bytes) + size_field = None + for field in type_ir.structure.field: + if field.name.name.text in ("$size_in_bits", "$size_in_bytes"): + size_field = field + break + + if size_field is None: + return "", "" + + # Check if the size expression already is constant (no need for parameterized version) + if ( + _render_expression(size_field.read_transform, ir).is_constant + and _render_expression(size_field.existence_condition, ir).is_constant + ): + return "", "" + + # Get the set of parameter names + parameter_names = set() + for param in type_ir.runtime_parameter: + parameter_names.add(param.name.name.text) + + # Check if the size expression only depends on parameters + if not _expression_only_depends_on_parameters( + size_field.read_transform, parameter_names + ): + return "", "" + + # Also check existence condition + if not _expression_only_depends_on_parameters( + size_field.existence_condition, parameter_names + ): + return "", "" + + # Generate the static function + type_name = type_ir.name.name.text + units = "Bits" if size_field.name.name.text == "$size_in_bits" else "Bytes" + + # Build parameter list + param_list = [] + for param in type_ir.runtime_parameter: + param_type = _cpp_basic_type_for_expression_type(param.type, ir) + param_name = param.name.name.text + param_list.append("{} {}".format(param_type, param_name)) + + parameters = ", ".join(param_list) + + # Render the expression with the static parameter renderer + static_field_reader = _StaticParameterFieldRenderer(parameter_names, ir) + subexpressions = _SubexpressionStore("emboss_reserved_local_subexpr_") + read_value = _render_expression( + size_field.read_transform, + ir, + field_reader=static_field_reader, + subexpressions=subexpressions, + ) + + # Build subexpressions string + subexpr_str = "".join( + [ + " const auto {} = {};\n".format(subexpr_name, subexpr) + for subexpr_name, subexpr in subexpressions.subexprs() + ] + ) + + declaration = code_template.format_template( + _TEMPLATES.static_size_from_parameters_declaration, + units=units, + parameters=parameters, + ) + definition = code_template.format_template( + _TEMPLATES.static_size_from_parameters_definition, + parent_type=type_name, + units=units, + parameters=parameters, + subexpressions=subexpr_str, + read_value=read_value.rendered, + ) + + return declaration, definition + + def _visibility_for_field(field_ir): """Returns the C++ visibility for field_ir within its parent view.""" # Generally, the Google style guide for hand-written C++ forbids having @@ -1490,13 +1693,19 @@ def _generate_structure_definition(type_ir, ir, config: Config): else: text_stream_methods = "" + # Generate static IntrinsicSizeInBytes(params) if size only depends on parameters + static_size_declaration, static_size_definition = ( + _generate_static_size_from_parameters(type_ir, ir) + ) + class_forward_declarations = code_template.format_template( _TEMPLATES.structure_view_declaration, name=type_name ) class_bodies = code_template.format_template( _TEMPLATES.structure_view_class, name=type_ir.name.canonical_name.object_path[-1], - size_method=_render_size_method(type_ir.structure.field, ir), + size_method=_render_size_method(type_ir.structure.field, ir) + + static_size_declaration, field_method_declarations="".join(field_method_declarations), field_ok_checks="\n".join(ok_method_clauses), parameter_ok_checks="\n".join(parameter_checks), @@ -1514,7 +1723,7 @@ def _generate_structure_definition(type_ir, ir, config: Config): initialize_parameters_initialized_true=(initialize_parameters_initialized_true), units=units, ) - method_definitions = "\n".join(field_method_definitions) + method_definitions = "\n".join(field_method_definitions) + static_size_definition early_virtual_field_types = "\n".join(virtual_field_type_definitions) all_field_helper_type_definitions = "\n".join(field_helper_type_definitions) return ( diff --git a/compiler/back_end/cpp/testcode/parameters_test.cc b/compiler/back_end/cpp/testcode/parameters_test.cc index fd7d53c..80e3064 100644 --- a/compiler/back_end/cpp/testcode/parameters_test.cc +++ b/compiler/back_end/cpp/testcode/parameters_test.cc @@ -93,6 +93,25 @@ TEST(Axes, VirtualUsingParameter) { EXPECT_EQ(3, view.axis_count_plus_one().Read()); } +TEST(Axes, StaticIntrinsicSizeInBytesFromParameters) { + // Test the static IntrinsicSizeInBytes function that takes parameters directly + // For Axes struct, the size is axes * 4 bytes + EXPECT_EQ(0U, Axes::IntrinsicSizeInBytes(0)); + EXPECT_EQ(4U, Axes::IntrinsicSizeInBytes(1)); + EXPECT_EQ(8U, Axes::IntrinsicSizeInBytes(2)); + EXPECT_EQ(12U, Axes::IntrinsicSizeInBytes(3)); + EXPECT_EQ(16U, Axes::IntrinsicSizeInBytes(4)); + EXPECT_EQ(40U, Axes::IntrinsicSizeInBytes(10)); + + // Verify static function matches instance method + ::std::array values = {1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0}; + auto view = MakeAxesView(2, &values); + EXPECT_EQ(view.SizeInBytes(), Axes::IntrinsicSizeInBytes(2)); + + auto view3 = MakeAxesView(3, &values); + EXPECT_EQ(view3.SizeInBytes(), Axes::IntrinsicSizeInBytes(3)); +} + TEST(AxesEnvelope, FieldPassedAsParameter) { ::std::array values = {2, 0, 0, 0, 0x80, 0, 100, 0, 0}; auto view = MakeAxesEnvelopeView(&values); diff --git a/testdata/golden_cpp/testdata/parameters.emb.h b/testdata/golden_cpp/testdata/parameters.emb.h new file mode 100644 index 0000000..4c299bb --- /dev/null +++ b/testdata/golden_cpp/testdata/parameters.emb.h @@ -0,0 +1,10763 @@ +/** + * 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(); } + + static constexpr ::std::size_t IntrinsicSizeInBytes(::std::int32_t axes); + + + 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 Axes { +inline constexpr ::std::size_t IntrinsicSizeInBytes(::std::int32_t axes) { + const auto emboss_reserved_local_subexpr_1 = ::emboss::support::Maybe(axes); + const auto emboss_reserved_local_subexpr_2 = ::emboss::support::Product(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(0LL)), 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::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(0LL))); + 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::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(2LL))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Choice(emboss_reserved_local_subexpr_9, ::emboss::support::Maybe(static_cast(12LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6, emboss_reserved_local_subexpr_8, emboss_reserved_local_subexpr_10); + + return static_cast((emboss_reserved_local_subexpr_11).ValueOrDefault()); +} +} // namespace Axes + +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/parameters.emb.h b/testdata/parameters.emb.h new file mode 100644 index 0000000..d60f164 --- /dev/null +++ b/testdata/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_ + From fbc6014f2c8a3c4c5e8304673014eae8c63e3176 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 6 Dec 2025 03:13:20 +0000 Subject: [PATCH 3/3] Fix golden file path and clean up spurious files Co-authored-by: AaronWebster <3766083+AaronWebster@users.noreply.github.com> --- testdata/golden_cpp/parameters.emb.h | 19 + testdata/golden_cpp/testdata/parameters.emb.h | 10763 ---------------- testdata/parameters.emb.h | 10744 --------------- 3 files changed, 19 insertions(+), 21507 deletions(-) delete mode 100644 testdata/golden_cpp/testdata/parameters.emb.h delete mode 100644 testdata/parameters.emb.h diff --git a/testdata/golden_cpp/parameters.emb.h b/testdata/golden_cpp/parameters.emb.h index d60f164..4c299bb 100644 --- a/testdata/golden_cpp/parameters.emb.h +++ b/testdata/golden_cpp/parameters.emb.h @@ -1176,6 +1176,7 @@ if (!parameters_initialized_) return false; } bool SizeIsKnown() const { return IntrinsicSizeInBytes().Ok(); } + static constexpr ::std::size_t IntrinsicSizeInBytes(::std::int32_t axes); template @@ -9039,6 +9040,24 @@ GenericAxesView< Storage>::EmbossReservedDollarVirtualMinSizeInBytesView::UncheckedRead() { return Axes::MinSizeInBytes(); } +namespace Axes { +inline constexpr ::std::size_t IntrinsicSizeInBytes(::std::int32_t axes) { + const auto emboss_reserved_local_subexpr_1 = ::emboss::support::Maybe(axes); + const auto emboss_reserved_local_subexpr_2 = ::emboss::support::Product(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(4LL))); + const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(0LL)), 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::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(0LL))); + 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::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(1LL))); + const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_9 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(2LL))); + const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Choice(emboss_reserved_local_subexpr_9, ::emboss::support::Maybe(static_cast(12LL)), ::emboss::support::Maybe(static_cast(0LL))); + const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6, emboss_reserved_local_subexpr_8, emboss_reserved_local_subexpr_10); + + return static_cast((emboss_reserved_local_subexpr_11).ValueOrDefault()); +} +} // namespace Axes + namespace AxisPair { } // namespace AxisPair diff --git a/testdata/golden_cpp/testdata/parameters.emb.h b/testdata/golden_cpp/testdata/parameters.emb.h deleted file mode 100644 index 4c299bb..0000000 --- a/testdata/golden_cpp/testdata/parameters.emb.h +++ /dev/null @@ -1,10763 +0,0 @@ -/** - * 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(); } - - static constexpr ::std::size_t IntrinsicSizeInBytes(::std::int32_t axes); - - - 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 Axes { -inline constexpr ::std::size_t IntrinsicSizeInBytes(::std::int32_t axes) { - const auto emboss_reserved_local_subexpr_1 = ::emboss::support::Maybe(axes); - const auto emboss_reserved_local_subexpr_2 = ::emboss::support::Product(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(4LL))); - const auto emboss_reserved_local_subexpr_3 = ::emboss::support::Sum(::emboss::support::Maybe(static_cast(0LL)), 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::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(0LL))); - 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::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(1LL))); - const auto emboss_reserved_local_subexpr_8 = ::emboss::support::Choice(emboss_reserved_local_subexpr_7, ::emboss::support::Maybe(static_cast(8LL)), ::emboss::support::Maybe(static_cast(0LL))); - const auto emboss_reserved_local_subexpr_9 = ::emboss::support::GreaterThan(emboss_reserved_local_subexpr_1, ::emboss::support::Maybe(static_cast(2LL))); - const auto emboss_reserved_local_subexpr_10 = ::emboss::support::Choice(emboss_reserved_local_subexpr_9, ::emboss::support::Maybe(static_cast(12LL)), ::emboss::support::Maybe(static_cast(0LL))); - const auto emboss_reserved_local_subexpr_11 = ::emboss::support::Maximum(::emboss::support::Maybe(static_cast(0LL)), emboss_reserved_local_subexpr_4, emboss_reserved_local_subexpr_6, emboss_reserved_local_subexpr_8, emboss_reserved_local_subexpr_10); - - return static_cast((emboss_reserved_local_subexpr_11).ValueOrDefault()); -} -} // namespace Axes - -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/parameters.emb.h b/testdata/parameters.emb.h deleted file mode 100644 index d60f164..0000000 --- a/testdata/parameters.emb.h +++ /dev/null @@ -1,10744 +0,0 @@ -/** - * 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_ -